Non-Embedded app still redirects to Shopify

Solved
Excursionist
16 0 0

I switched my Schopify-cli created app to be a non-embedded app by disabling it in the partners app settings as described here:https://help.shopify.com/en/api/embedded-apps/app-extensions/shopify-admin/embed-in-shopify-admin

 

After doing that and re-installing the app on my development store, it now opens in a new tab. However after the page has loaded in a new tab it jumps back to Shopify and displays like an embedded app. How can I fix this so it stays in its own tab? My app is bare-bones created from the Shopify-cli.

 

I want to switch it to a non-embedded app to be able to debug the app, based on this thread: https://community.shopify.com/c/Shopify-APIs-SDKs/How-to-debug-Shopify-react-app/m-p/602282#M40801

0 Likes
Highlighted

Success.

Are you using AppBridge/Polaris? It usually will do a redirect unless specified otherwise: https://github.com/Shopify/shopify-app-node/blob/master/pages/_app.js#L26

 

I usually put:

forceRedirect: process.env.NODE_ENV === "production"

on the App Bridge which basically means only redirect when in production mode so that dev mode loads app in a different window outside of the admin.

Check out Store Recon on the app store.
1 Like
Excursionist
16 0 0

Thank you! That was it. I missed that parameter.

0 Likes