What's your biggest current challenge? Have your say in Community Polls along the right column.

App Bridge v4 prevent installing the app

App Bridge v4 prevent installing the app

maksp-ls
Shopify Partner
1 0 0

I'm trying to migrate my Shopify app (in Next.js) to App Bridge v4.

 

I place the HTML tags in _document.js and they succesfully load the script. Unfortunately, I can't install the app while the script is present. It displays 404 page.

 

 

        <meta
          name="shopify-api-key"
          content={process.env.NEXT_PUBLIC_SHOPIFY_API_KEY}
        />
        <script src="https://cdn.shopify.com/shopifycloud/app-bridge.js"></script>

 

 

Once I remove the script, I am able to install the app, but of course the auth doesn't work. Once the app is installed and I add the script back, the auth and the app work.

 

So basicaly the script tag breaks the app Installation part.

Reply 1 (1)

Shopsta
Shopify Partner
5 0 0

We had same issue with Docker  when deploying and fix was to add api key directly to content="KEY HERE"

New age Landing page builder with free plan.