Modals sometimes does not load

Has anyone seen issues where modals don’t load correctly?

Unfortunately i haven’t been able to find a set of reproduction steps but this occasionally pops up and is fixed with a reload.

When opening a modal, the actual underlying src page is loaded as observed in the browsers network tab, and the following console error comes up.

when the page is reloaded, modal works correctly again.

Hey @Min_Liu, hope all’s well!

The error there makes me think that the admin/host origin information may not be available when the modal initializes. I’ve found a historical report with the same error and reload behaviour, but I’d like to confirm whether this is the same underlying issue.

Could you share:

  • Your App Bridge versions, or whether you’re using the current CDN script
  • Whether the modal uses src, path, or url
  • Browser/OS and how you entered the app before this occurs
  • Whether the app goes through any redirects before the modal opens

If you can share the app ID and a development store ID that would also help us investigate on our end. Reloading is the best temporary workaround for now, though I definitely get that this isn’t ideal. Hope to hear from you soon.

Hi Alan,

Yes i think that may be it, we’ve been doing some cleanup without UI and have recently removed the hosts parameter as i understand that’s no longer needed.

We’re using the latest app bridge hosted on CDN

https://cdn.shopify.com/shopifycloud/app-bridge.js

The app has redirected away from the initial landing URL after opening the app (so hosts querystring param has been removed)

Have only tested this on Chrome.

Can you PM me for the store and app ids?

Thanks

Min

Hey @Min_Liu - sending you a DM :slight_smile: