Closed MH1176 closed 4 years ago
There is an eval
in JSCover which I've just removed.
I've released it in the 2.0.10 SNAPSHOT if you'd like to test.
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
Or build the latest JAR yourself or download from here.
Let me know if that fixes your issue and I'll build a release.
So sorry, I‘m tried to build the project, it has some errors thrown in console. that doesn't matter, I'm pythoner, java debug capability is not good.
At the same time, your download link shows not found, so I hope to get a new after building download link.
Cannot resolve plugin org.apache.maven.plugins:maven-checkstyle-plugin:<unknown>
Cannot resolve plugin org.apache.maven.plugins:maven-gpg-plugin:<unknown>
Cannot resolve plugin org.apache.maven.plugins:maven-source-plugin:<unknown>
Cannot resolve plugin org.apache.maven.plugins:maven-javadoc-plugin:<unknown>
thanks!
At the same time, your download link shows not found
I've just updated the link. Please try again.
I've updated JSCover-all.js, chrome can useful by selenium WebDirver. however, from the desktop chrome icon open browser, still those errors. I’ve three js files, it throws three the same errors, just a different name.
from the desktop chrome icon open browser, still those errors
Maybe you need to clear the cache?
I cleaned the cache, and my browser is disabling cache mode. The same with other browsers(Firefox, Edge). I've tried to use chrome stealth mode, I can open the page, but can't refresh.
Well JSCover no longer serves the eval
. Could it be coming from elsewhere?
Well JSCover no longer serves the
eval
. Could it be coming from elsewhere?
I following the error stack in the generated file.
In the function jscoverage_parseCoverageJSON(data)
, has var key, json, the value is eval(‘(’ + data + ')');
console error from here throw.
Is it helpful?
I think I uploaded an older version. Please download and try again - sorry about that. I've tested this download and it's the right version.
There is an
eval
in JSCover which I've just removed.I've released it in the 2.0.10 SNAPSHOT if you'd like to test.
<repositories> <repository> <id>sonatype-nexus-snapshots</id> <name>Sonatype Nexus Snapshots</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories>
Or build the latest JAR yourself or download from here.
Let me know if that fixes your issue and I'll build a release.
I'm from here download jar again, this time, error 'unsafe-eval' is disappearing. But has a new issue, console shows Uncaught ReferenceError: angular is not defined
and cannot read property 'init' of undefined
Following the error stack is _$jscoverage['/lib.min.js'].branchDate['29'][451].init(4095,13);
Looks like you're trying to generate coverage on library files. Can you skip those?
http://tntim96.github.io/JSCover/manual/manual.xml#fileMode
--exclude=PATH
...or...
--exclude-reg=PATH
I use java -Dfile.encoding=UTF-8 -jar JSCover-all.jar -fs path1 path2
generate js file, is work.
If I addition argument --local-storage is thrown that errors.
and now, I want to know, if I do not add --local-storage, jscover will be count different page jscoverage?
I want to know, if I do not add --local-storage
...then the coverage data is lost on each page load
I want to know, if I do not add --local-storage
...then the coverage data is lost on each page load
so, if I wanna saved every page data, I only use --local-storage? or run jscoverage_serializeCoverageToJSON();
to save data when browser change address?
Correct
God, why do I make mistakes when I use --local-storage...
console shows
Uncaught ReferenceError: angular is not defined
andcannot read property 'init' of undefined
Following the error stack is_$jscoverage['/lib.min.js'].branchDate['29'][451].init(4095,13);
Have you tried excluding with
--exclude=PATH
...or...
--exclude-reg=PATH
e.g. --exclude=/lib.min.js
Yap, I'm tried, the command is java -Dfile.encoding=UTF-8 -jar JSCover-all.jar -fs --local-storage --exclude=./path1/1.js --exclude=./path1/2.js --exclude=./path1/3.js ./path1 ./path2
;
still Uncaught ReferenceError: angular is not defined and cannot read property 'init' of undefined
and
Following the error stack is _$jscoverage['/lib.min.js'].branchDate['29'][451].init(4095,13);
Did you mean to use --exclude=./path1/1.js
instead of --exclude=/path1/1.js
?
The code _$jscoverage['/lib.min.js'].branchDate['29'][451].init(4095,13);
shouldn't exist if it's been excluded.
Also, I've release v2.0.10 with the fix to the eval
JavaScript.
fine, I tried so many different ways, absolute path, relative path, but still those errors, I almost to give up. maybe should use another way to record.
Hi, Such as the title, my action as following:
I don't understand, my usage is right?
If I hope to use File Mode compiled js file in webserver, what should I do?
thank you for your time.