Troubleshooting App Bridge CDN Error in PHP Integration

Topic summary

A developer is encountering an undefined error when accessing the App Bridge object after switching to Shopify’s official CDN for importing the library in a PHP integration.

Current Issue:

  • Using https://cdn.shopify.com/shopifycloud/app-bridge.js results in window['app-bridge'] returning undefined
  • The code includes proper meta tag with Shopify API key

Working Solution:

  • Currently using unpkg.com CDN links for both @shopify/app-bridge and @shopify/app-bridge-utils, which functions correctly

Status:

  • The issue remains unresolved
  • Another user has inquired whether a solution was found, indicating this may be a common problem
Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

I am facing an issue after importing the app bridge using the CDN, where when I access the appbridge object it is showing undefined.

The updated code which I used to import the app bridge is shown below:

The current one that I am using where the issue won’t occur is :-

Is there a way to fix this issue ?

did you ever get this resolved?