Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Re: Trouble Embedding App: Opening in New Tab Instead of Embedded in Shopify Admin

Solved

Trouble Embedding App: Opening in New Tab Instead of Embedded in Shopify Admin

thesunilyadav
Shopify Partner
9 1 2

Hi there,

I've recently created a Shopify embedded app that functions flawlessly in local and staging environments. When accessed from the Shopify admin, it opens in the same tab, as expected. However, after migrating the same codebase to a production app, which was originally a non-embedded app, I enabled the embedded configuration in the partner account.

Now, every time I launch the app in any store, it opens in a new tab alongside the current tab. I want to prevent it from opening in a new tab, and in the current tab, there's a banner indicating '{APP_NAME} will open in a new tab.

thesunilyadav_0-1704361320440.png

 

Upon investigating, I've noticed that the current tab admin host is admin.shopify.com, while the app opens in a new tab with the host myshopify.com (with params ?force_legacy_domain=1).

I followed the suggested criteria to adapt to the new admin domain, as outlined in this GitHub issue: Link to GitHub Issue.

My app is developed using React.js for the front-end and Laravel for the backend. I've utilized the laravel-shopify package to build the Shopify app, which inherently supports CSP for the new admin host.

Despite fulfilling all the requirements and following best practices, the issue persists in the production app. It's perplexing that the same codebase and app-side configuration do not function correctly in the production environment.

I'm seeking urgent assistance to resolve this matter. Any help or insights would be highly appreciated.

Thank you.

Accepted Solution (1)

thesunilyadav
Shopify Partner
9 1 2

This is an accepted solution.

[UPDATE]
Hi there,

The issue was resolved after a conversation with Shopify Support. It turned out to be a caching problem on Shopify's side.
I recommend reaching out to Shopify Support if you encounter a similar issue.
I hope this information is helpful.

View solution in original post

Replies 4 (4)

geoffrey-syncx
Shopify Partner
5 0 1

I also having the exact same issue, anyone can give a guideline on this?

921Kiyo
Shopify Partner
19 0 3

I am having the same issue. Did you end up fixing it?

Maureen-1969
Visitor
1 0 1

I don't know if this relates exactly to your problem (maybe it will help others) but I was having the same issue testing a new Shopify (unpublished) theme in which it was opening a new tab on our current live site and Shopify admin, every time I wanted to navigate to a new page. The fix for me was in the test theme, simply uncheck the "show vendor" box under the featured collection.

Maureen1969_0-1718038650473.png

 

thesunilyadav
Shopify Partner
9 1 2

This is an accepted solution.

[UPDATE]
Hi there,

The issue was resolved after a conversation with Shopify Support. It turned out to be a caching problem on Shopify's side.
I recommend reaching out to Shopify Support if you encounter a similar issue.
I hope this information is helpful.