Home
> Uncategorized > Refused to load gap://ready #Phonegap #Cordova #CSP
Refused to load gap://ready #Phonegap #Cordova #CSP
[Error] Refused to load gap://ready because it appears in neither the child-src directive nor the default-src directive of the Content Security Policy.
I noticed in an app I just updated, that the phonegap plugins were not working, (i.e. InAppBrowser), but deviceReady was getting called, so it it was ‘sort of’ working.
When I attached the remote debugger to the app from Safari I saw the error above in the console window being fired over and over again.
The fix was to relax the CSP in the index.html, by adding
<meta http-equiv=”Content-Security-Policy” content=”default-src ‘self’ gap://ready file://* *; style-src ‘self’ ‘unsafe-inline’; script-src ‘self’ ‘unsafe-inline’ ‘unsafe-eval'”>
You have to make sure you only have one CSP meta tag, as it will only use the first one.
Categories: Uncategorized
It’s not working dude
LikeLike
It’s not working
LikeLike
You are just using the wrong type of quotation marks there. It works great!
Try:
LikeLike
@yagydaev what have you done to fix it?
LikeLike