Shopify:// deep link to the theme editor is causing a white page error

Short description of issue

Deep linking using window.open(“shopify://admin/themes/current/editor”, “_blank”) to the interface editor resulted in a white page error, pressing F5 should fix it.

Link to Shopify Store

https://admin.shopify.com/store/ft-xn1/themes/162164113431/editor

Reproduction steps

  • Open the deep link from within the app using window.open(url, “_blank”)
  • Click button → Open a new tab to the theme editor that’s showing a white page error, pressing F5 should fix it.

Additional info

This is a recent issue; everything was working perfectly fine before. Shopify suggested using window.open(url, “_top”), but this is not good for the user experience.

The question is:

Is this a bug?

Hi!

Yes, it’s clearly a bug (or an undocumented security policy change) related to the Frame-Ancestors headers or the admin’s Content Security Policy (CSP).

Basically, when you open a new tab with _blank, Shopify sometimes loses the session context or blocks the loading because it doesn’t recognize the origin as safe in a new tab, hence the blank page that fixes itself on refresh.

Their advice to use _top is a quick fix that ruins the UX, we agree.

A workaround that often helps:

Instead of the direct URL shopify://, try using a clean redirect URL or explicitly building your link with the theme’s id parameter (which you seem to already be doing).

Another option is to use App Bridge’s Redirect action rather than a native window.open; this forces Shopify to manage the tab’s lifecycle itself.

Let us know if you find a cleaner workaround; people are interested.

I tried going to Online store → edit theme → select template product, copy the URL and open a new tab → press enter, but it still happens occasionally. This is probably a Shopify issue.