Focuses on API authentication, access scopes, and permission management.
We are getting test-develoment-agency360.myshopify.com refused to connect in incognito window.
In the Shopify admin.
See Screenshot
If i check console window. it's showing Refused to frame 'https://test-develoment-agency360.myshopify.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'".
it's working fine on normal window.
And also if we open URL directly it's working fine.
Not able to understand what was issue and how to fix it. can you please help me?
Hi Agency-360,
The error message you're seeing is related to the Content Security Policy set by Shopify. The frame-ancestors 'none' directive indicates that the content cannot be embedded inside an <iframe>
from any origin. However, the behavior you're observing, where it works in a regular window but not in incognito, suggests that there might be other factors at play.
Here's a few things you can test to potentially resolve the issue:
1. Browser Extensions:
Extensions can sometimes modify or interfere with the behavior of web pages. Since extensions are usually disabled in incognito mode (unless explicitly allowed), this could be a factor. Ensure that no browser extensions are causing the issue.
2. Shopify App Bridge:
If you're developing a Shopify embedded app, ensure you're using the Shopify App Bridge. It provides a way to embed your app seamlessly inside the Shopify admin interface, handling issues related to embedding and CSP.
3. App Setup in Shopify Partners Dashboard:
Ensure that your app is set up as an "embedded app" in the Shopify Partners Dashboard. If it's not set as embedded, Shopify might block it from being loaded inside an iframe in the Shopify admin.
4. Third-party Cookies:
Incognito mode in some browsers can block third-party cookies by default. Since Shopify uses third-party cookies for embedded apps, this could be causing the issue. Check the browser settings to see if third-party cookies are blocked in incognito mode.
5. Check for Service Workers:
Service workers can behave differently in incognito mode. If your app uses service workers, ensure they're not causing the issue.
Hope this helps!
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Same issue our app.
We are also having the same issue.