phonegap / phonegap-template-react-hot-loader

PhoneGap Template using React, ES2015, Webpack, and hot module reloading
MIT License
79 stars 21 forks source link

Content Security Policy creates issues with gap://ready frame #4

Closed jonbot closed 8 years ago

jonbot commented 8 years ago

Was having trouble trying to figure out why Cordova plugins would not load with this template. In some cases, with the File plugin, deviceready would not even fire.

Hooked my emulator up to the Safari web inspector and saw that the app is throwing this a few times per second:

Refused to load frame 'gap://ready' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'frame-src' was not explicitly set, so 'default-src' is used as a fallback.

screen shot 2016-05-03 at 4 56 49 pm

W/o the file plugin added to the app, I still get the error, but deviceready fires.

If I comment out the CSP in index.html, everything runs fine (but insecure).

devgeeks commented 8 years ago

Ugh. Thanks. I'll get that fixed up.