When running shopify app dev
with a Remix-based embedded app and clicking the preview link (e.g., /admin/oauth/redirect_from_cli?...
), Shopify attempts to redirect to the embedded admin app view at:
bash
CopyEdit
https://admin.shopify.com/store/{store-name}/apps/{app-handle}
However, if the app is not yet installed, instead of prompting the merchant with the install authorization screen (OAuth), Shopify directly opens the embedded app iframe, expecting a valid session.
In this case, the app fails to load and the admin displays:
“There’s no page at this address”
This occurs because the app was not installed, and no valid session exists, but Shopify proceeds to open the embedded app anyway — expecting that session handling and redirection to the /auth
install flow will be triggered.
However, in the Remix app, the OAuth handler authenticate.admin(request)
returns an HTTP 302 redirect response to /auth
, which must be thrown or returned directly from the loader.
The issue arises when this response is caught and returned as data in a try/catch
block — Remix does not treat it as a redirect, so the browser receives no install prompt, and Shopify ends up rendering a blank iframe in the admin.
As a result:
- OAuth never completes
- The app is not installed
- Shopify can’t load the embedded app → leading to a 404 error inside admin
This is caused entirely by improper redirect handling in the Remix loader logic.