You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when trying to run QUnit tests via phantomjs and using JSCover in server mode (I'm fetching the 'http://localhost:9082/test.html', which contains the QUnit tests, via JSCover server) - phantomjs is giving "Refused to set unsafe header 'Content-Length'" in the console.
This makes sense because WebKit browsers refuse to allow this kind of a behavior since it poses a security risk.
The same thing happens when trying to run the 'http://localhost:9082/test.html' directly in Chrome browser.
I checked where this header is set and there are two places:
\src\main\resources\report.js:41
\src\main\resources\jscoverage.js:1270
I wonder why this is there and is there a way to remove it.
I tried to comment out these two lines and then re-compile and build the jars (with ant) and when I run the JSCover in server mode and try to access 'http://localhost:9082/jscoverage.html' I get the following exception:
java.lang.RuntimeException: Problem loading file: '/jscoverage.html'
at jscover.util.IoUtils.loadFromClassPath(IoUtils.java:446)
at jscover.util.IoService.generateJSCoverageHtml(IoService.java:397)
at jscover.server.InstrumentingRequestHandler.handleGet(InstrumentingRequestHandler.java:433)
at jscover.server.HttpServer.run(HttpServer.java:403)
Caused by: java.lang.NullPointerException
at java.io.Reader.(Reader.java:61)
at java.io.InputStreamReader.(InputStreamReader.java:96)
at jscover.util.IoUtils.toString(IoUtils.java:382)
at jscover.util.IoUtils.loadFromClassPath(IoUtils.java:444)
... 3 more
The text was updated successfully, but these errors were encountered:
Those lines are now removed in trunk. Are you able to build and test?
Problem loading file: '/jscoverage.html'
If you've built from an IDE, you'll have to copy the resources in directory to the classpath. The IntelliJ project files include ?*.properties;?*.xml;?*.gif;?*.png;?*.jpeg;?*.jpg;?*.html;?*.dtd;?*.tld;?*.ftl;?*.js;?*.css;?*.txt;?*.json;?*.MF. The Ant task jar-all will do all this for you to.
Hi,
when trying to run QUnit tests via phantomjs and using JSCover in server mode (I'm fetching the 'http://localhost:9082/test.html', which contains the QUnit tests, via JSCover server) - phantomjs is giving "Refused to set unsafe header 'Content-Length'" in the console.
This makes sense because WebKit browsers refuse to allow this kind of a behavior since it poses a security risk.
The same thing happens when trying to run the 'http://localhost:9082/test.html' directly in Chrome browser.
I checked where this header is set and there are two places:
I wonder why this is there and is there a way to remove it.
I tried to comment out these two lines and then re-compile and build the jars (with ant) and when I run the JSCover in server mode and try to access 'http://localhost:9082/jscoverage.html' I get the following exception:
java.lang.RuntimeException: Problem loading file: '/jscoverage.html'
at jscover.util.IoUtils.loadFromClassPath(IoUtils.java:446)
at jscover.util.IoService.generateJSCoverageHtml(IoService.java:397)
at jscover.server.InstrumentingRequestHandler.handleGet(InstrumentingRequestHandler.java:433)
at jscover.server.HttpServer.run(HttpServer.java:403)
Caused by: java.lang.NullPointerException
at java.io.Reader.(Reader.java:61)
at java.io.InputStreamReader.(InputStreamReader.java:96)
at jscover.util.IoUtils.toString(IoUtils.java:382)
at jscover.util.IoUtils.loadFromClassPath(IoUtils.java:444)
... 3 more
The text was updated successfully, but these errors were encountered: