Uncaught (in promise) Error: ?shopify-reload must be same-origin

Uncaught (in promise) Error: ?shopify-reload must be same-origin

jahilldev
Shopify Partner
24 1 3

Hi there,

 

I've been developing a custom app locally using the out-of-the-box Shopify CLI remix template.

 

It's now time to integrate the app into our clients store.

 

After updating the appUrl in the partners dashboard to reference the server it's hosted on, we're getting the following error in the console when trying to access the app in the store admin.

 

app-bridge.js:1 Uncaught (in promise) Error: ?shopify-reload must be same-origin (https://{storeName}.myshopify.com !== https://{appName}.ondigitalocean.app)

My app url env variable (e.g `SHOPIFY_APP_URL`) is set to the Shopify store domain, is this correct?

I'm not super sure how I go from the dev setup to production, and I can't seem to find any documentation on this.

 

Does anyone know the solution to this?

 

Many thanks in advance

Replies 2 (2)

jahilldev
Shopify Partner
24 1 3

Quick update, after changing the SHOPIFY_APP_URL env variable to point to the domain of my hosted app (https://{appName}.ondigitalocean.app), I'm now getting a 401 in the app's admin page:

The page contents now just says "
401 Unauthorized".

jahilldev
Shopify Partner
24 1 3

I think I've fixed it. The issue seemed to be the proxy url in the app setup was still pointing to the cloudflare domain, not the hosted one.

 

If you're seeing something similar, check all of the app urls are pointing to the right place!