How to debug oauth_error=application_cant_be_loaded_misconfigured

Recently I upgrade rails app that using shopify_app gem ver 9.0.4 to ver 18.1.3, for some weird reason, 3 user got problem when sign in to our app,

the behaviour is

  1. load our app with “login/?shop=xxx.myshopify.com

  2. redirect to same app with “login/?shop=xxx.myshopify.com

3, redirect to shopify admin with param “oauth_error=application_cant_be_loaded_misconfigured”

Anyone got any ideas of the reason of why this is happening?