I am developing a shopify app in express nodejs. I have created installation process of app successfully in express nodejs. After app installation, When I have opened the app then I have getting an error of iframe in shopify admin section. Here’s the screen shot:-
Also, it said ‘Requests to the server have been blocked by an extension’.
This issue comes into Google chrome browser. I have also checked in firefox browser. In firefox, it will works fine and shows me two warning that are:-
1. Content Security Policy: Directive ‘child-src’ has been deprecated.
Please use directive ‘worker-src’ to control workers, or directive
‘frame-src’ to control frames respectively.
2. Content Security Policy: Ignoring ‘x-frame-options’ because of ‘frame-ancestors’ directive.
Mainly, it is not working on google chrome.
Please help me regarding this.
Thanks !!!
2
Answers
You need to include app.js provided by shopify if you haven’t included it yet.
In your head section of html, add this
Source
This issue also happens to me and the problem was, I added new scopes for fulfillment but not reinstalled the app.
Reinstalling the app
Manually authenticate the app using window.location.
Shopify tries to authenticate the app every time when you open it but if Shopify finds any new scope within the app which is not present within the store, it gives you this kind of error.
Mostly the authentication happens with following
and it looks similar to this
Open the above URL within the browser with actual values in the URL
Whenever you open the app, Shopify tries to use the above like to verify each entity provided in the above link.