Questions and discussions about using the Shopify CLI and Shopify-built libraries.
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.
Solved! Go to the solution
This is an accepted solution.
Hi junoyu,
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.
This is an accepted solution.
Hi junoyu,
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.
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.
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
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.