Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Re: Non-Embedded app still redirects to Shopify

Solved

Non-Embedded app still redirects to Shopify

PhilippW
Excursionist
17 0 2

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

Accepted Solution (1)

gilg
Shopify Partner
31 6 7

This is an accepted solution.

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.

I make Checkout Promotions on the app store. Native pre & post purchase upsells - used by over 1,800 merchants.

View solution in original post

Replies 2 (2)

gilg
Shopify Partner
31 6 7

This is an accepted solution.

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.

I make Checkout Promotions on the app store. Native pre & post purchase upsells - used by over 1,800 merchants.
PhilippW
Excursionist
17 0 2

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