]
Konstantin Marmalyukov resolved JBIDE-20757.
--------------------------------------------
Resolution: Partially Completed
Resolving as Partly completed because the only thing that we can do now is document it. PR
for FAQ is applied.
In general, this issue is covered by JBIDE-20771
Livereload does not work with CordovaSim on default THYM project
----------------------------------------------------------------
Key: JBIDE-20757
URL:
https://issues.jboss.org/browse/JBIDE-20757
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: aerogear-hybrid, cordovasim, livereload, upstream
Affects Versions: 4.3.0.CR1
Reporter: Ilya Buziuk
Assignee: Konstantin Marmalyukov
Fix For: 4.3.1.Beta2
Steps to reproduce:
1) create default THYM project
2) enable Livereload server
3) run THYM project on CordovaSim
4) edit index.html and save changes
ERROR: refresh is not happening on Cordovasim
In order to make it work one nee to remove the following meta tag from index.html:
{code}
<meta http-equiv="Content-Security-Policy" content="default-src
'self' data: gap:
https://ssl.gstatic.com 'unsafe-eval'; style-src
'self' 'unsafe-inline'; media-src *">
{code}
Livereload doesn't work with new THYM projects due to new cordova-white-list plugin
security policy -
https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#...
. The following error prevent script loading
{code}
Refused to load the script 'http://localhost:35729/livereload.js' because it
violates the following Content Security Policy directive: "default-src 'self'
data: gap:
https://ssl.gstatic.com 'unsafe-eval'". Note that
'script-src' was not explicitly set, so 'default-src' is used as a
fallback.
{code}
BTW, We are not the only one affected by this changes -
http://forum.ionicframework.com/t/solution-for-livereload-problems-with-n...