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

Solved
Highlighted
New Member
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. 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
38 6 9

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.

0 Likes
Highlighted
New Member
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.

0 Likes
Highlighted
New Member
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

0 Likes
Highlighted
Shopify Staff
Shopify Staff
38 6 9

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.

0 Likes