Shopify / shopify-app-template-node

MIT License
860 stars 393 forks source link

Blank Page Displayed in Shopify Admin for App Deployed on Dedicated Server #1307

Closed devlogi closed 2 months ago

devlogi commented 8 months ago

I have successfully deployed a Shopify application on a dedicated server. However, when accessing the application through Shopify, it displays a blank page without showing any content. Interestingly, if I inspect the Shopify admin iframe and directly open the source link in a browser, the application functions correctly, displaying all expected content.

Environment

Shopify App and Related Dependencies:
    @shopify/app: 3.50.0
    @shopify/app-bridge-types: ^0.0.3
    @shopify/cli: 3.50.0
    @shopify/polaris: ^12.0.0
    @shopify/shopify-api: ^8.0.2
    @shopify/shopify-app-remix: ^2.0.0
    @shopify/shopify-app-session-storage-prisma: ^2.0.0
Node Version: v20.5.1
Operating System: Ubuntu 20.04.6 LTS

Error Message

I encountered the following error message:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://online-store-web.shopifyapps.com/') does not match the recipient window's origin ('https://admin.shopify.com/').

Additional Information

The app is hosted on a subdomain. I suspect the issue might be related to the configuration settings of the app or the server, particularly concerning CORS or iframe settings.