Shopify / shopify-app-bridge

https://shopify.dev/docs/api/app-bridge
82 stars 9 forks source link

APP::ERROR::PERMISSION while loading app inside Shopify app. #380

Open sushansht opened 2 weeks ago

sushansht commented 2 weeks ago

Describe the bug

We have a shopify embedded app running with no issues in browsers but we have faced some issue while loading embedded app on Shopify app. When debugging using webview using chrome://inspect we have found APP::ERROR::PERMISSION error. we could not replicate the issue in browser looks like we are unable to redirect user for OAuth with Shopify. It happens while installing app from from Shopify app or when we redirect user to get access token.

To Reproduce

Steps to reproduce the behaviour:

  1. Launch the app from Shopify app.
  2. Click on install app.
  3. See error

If applicable, add screenshots to help explain your problem. on inspect we have found this error on console:

From native: {type: 'APP::ERROR::PERMISSION', group: 'Error', payload: {…}} group : "Error" payload : action : payload : apiClientId : "xxxxxx" apiKey : "xxxxxxxxxxxxxxxxxxxxxxxx" appId : "gid://shopify/App/xxxxx" handle : "app-name" name : "App Name" shopId : "gid://shopify/Shop/xxxxxxxxx" url : "https://appurl/?embedded=1&hmac=xxxxxxxxxxxx&host=xxxxxxxxx&id_token=xxxx.xxxxxx.xxxx&locale=en&session=xxxxxx&shop=storename.myshopify.com&timestamp=xxxxxx" [[Prototype]] : Object type : "APICLIENT::LOAD" [[Prototype]] : Object message : "Action is not permitted" type : "APP::ERROR::PERMISSION" [[Prototype]] : Object type : "APP::ERROR::PERMISSION" [[Prototype]] : Object

Expected behaviour

I would expect that the user is redirected to shopify for session and return token in callback url

Packages and versions

List the relevant packages you’re using, and their versions. For example:

Platform