APP::ERROR::PERMISSION from AppBridge embed

Solved
AdrianNeatu
Shopify Partner
4 2 1

We are getting a lot of "APP::ERROR::PERMISSION" from AppBridge.

Here's an example of an error:

 

{
  "action": {
    "group": "WebVitals",
    "type": "APP::WEB_VITALS::TIME_TO_FIRST_BYTE",
    "payload": {
      "id": "v3-1666610876519-6214010517636",
      "metricName": "TTFB",
      "value": 840
    },
    "version": "3.4.2",
    "clientInterface": {
      "name": "@shopify/app-bridge-react",
      "version": "3.3.2"
    }
  },
  "message": "Action is not permitted",
  "type": "APP::ERROR::PERMISSION",
  "id": "v3-1666610876519-6214010517636"
}

 

It seems that this errors only happens on iOS devices - it looks like the Shopify mobile app webview. Below is an UserAgent example:

 

Mozilla/5.0 (iPhone; CPU iPhone OS 16_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Unframed Frameless Shopify Mobile/iOS/9.86.1 (iPhone13,4/com.jadedpixel.shopify/16.0.2) - Build 850

 

Any idea what we're doing wrong? Is it something on our side?

Accepted Solution (1)
AdrianNeatu
Shopify Partner
4 2 1

This is an accepted solution.

Thanks, however this wasn't the issue. After upgrading to the latest app-bridge version the error is gone. Seems like a small bug in the app-bridge library.

View solution in original post

Replies 3 (3)
fodane
Shopify Partner
3 0 0

Hey Adrian,

This error is generally seen when you ask for a collaborator request and don't ask for the permissions for products in it.

Now, if your app makes any API/GraphQL call to fetch Shopify Products, you will see this error.

So make sure you ask for access to products as well.

So this answer would help you.

AdrianNeatu
Shopify Partner
4 2 1

This is an accepted solution.

Thanks, however this wasn't the issue. After upgrading to the latest app-bridge version the error is gone. Seems like a small bug in the app-bridge library.

DiscountNinja
Shopify Partner
104 0 61

To summarize:
- When connecting as the admin / a staff member, the connected user needs to have the relevant access scopes (read_products) to be able to access products using the App Bridge
- However (and surprisingly), when connecting as a collaborator, the App Bridge additionally requires that the collaborator access permissions include access to the Products section as mentioned by @fodane above

Bart Coppens | Limoni Apps | Building apps for Shopify since 2016