The shopify global is not defined. This likely means the App Bridge script tag was not added correctly to this page

I am getting this error in Sentry very often and randomly.

I am just importing the app bridge as explained in the docs on my entry page.

<meta name="shopify-api-key" content="{{ config("shopify-app.api_key") }}" />
<script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>

Not sure why this is happening, what can I do to prevent it?

I am getting this error from all of my apps, and it is always very random. No one complains about this, but the error is being recoded in Sentry.

Is anyone else experiencing this issue, and any suggestions to avoid this error?

1 Like

We’re seeing the same thing on our end. The error pops up randomly in our logs, but no merchants have actually reported any issues or complained about it. It seems intermittent and doesn’t appear to affect functionality in any meaningful way. Would love to know if the Shopify team has any insight into what’s causing it.

Hi @farid

Thanks for flagging this error - it does appear to be an issue on our side, we’re investigating a fix for this. Will update here when there’s more to share.

1 Like

We see this sometimes but it’s usually when it takes a really long time for app-bridge.js to load. I assumed it was a temporary networking hiccup where they aren’t able to download the file from the Shopify CDN