Solved

App Bridge redirections not working for (dev app in draft stage) / (custom app)?

junoyu
Visitor
3 0 0

Unlike things working as in reviewed dev app / production app,

for (dev app in draft stage) / (custom app) , even app bridge is init with the correct api_key & shopify domain,

it seems appbridge redirections being fired are ignored silently. 

Accepted Solution (1)

iain-campbell
Shopify Staff (Retired)
54 9 23

This is an accepted solution.

App Bridge doesn't treat draft/custom apps differently. Try double checking that the app’s URL matches the URL set in Partners Dashboard under 'App Setup'? If it's different, App Bridge will ignore all actions from the app as a security measure.

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 4 (4)

iain-campbell
Shopify Staff (Retired)
54 9 23

This is an accepted solution.

App Bridge doesn't treat draft/custom apps differently. Try double checking that the app’s URL matches the URL set in Partners Dashboard under 'App Setup'? If it's different, App Bridge will ignore all actions from the app as a security measure.

To learn more visit the Shopify Help Center or the Community Blog.

junoyu
Visitor
3 0 0

Thanks for your reply, but can you please clarify what do you mean by URL here?

Per previous & existing usage experience in production, as long as the site is inside shopify iframe and having initiated appBridge with correct params in

var app = createApp({
apiKey: 'API key from Shopify Partner Dashboard',
shopOrigin: shopOrigin
});

One should be able to fire appBridge actions(even after redirected away in later link clickings)  

It doesn't seem all shopify apps are running as Single Page Application that having URL constantly same as "App URL" throughout all visits. 

Thanks.

junoyu
Visitor
3 0 0

The culprit was the http/https with dev environment 'App Url' though. Without https, install can still proceed but it will fail for invoking appBridge inside iframe

iain-campbell
Shopify Staff (Retired)
54 9 23

can you please clarify what do you mean by URL here?

Sorry, should have said domain, not URL. The protocol (ie https) and the domain (ie shopify.com) need to match the app’s configuration in Partners Dashboard. The rest of the URL can change, ie you can navigate to any path on that domain.

To learn more visit the Shopify Help Center or the Community Blog.