tntim96 / JSCover

JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage
GNU General Public License v2.0
399 stars 84 forks source link

Facing Issue with JSCOver proxy mode #260

Closed mayankdevapplift closed 7 years ago

mayankdevapplift commented 7 years ago

Hi

I am trying to get code coverage using JSCover with selenium automated but the server responds back with Internal Server error 500 while it loads fine when there is no proxy on browser. Below is the response stacktrace

java.lang.IllegalStateException: Unknown precedence for EXPR_RESULT at com.google.javascript.jscomp.NodeUtil.precedence(NodeUtil.java:1632) at com.google.javascript.jscomp.CodeGenerator.precedence(CodeGenerator.java:1264) at com.google.javascript.jscomp.CodeGenerator.opRequiresParentheses(CodeGenerator.java:1579) at com.google.javascript.jscomp.CodeGenerator.addExpr(CodeGenerator.java:1556) at com.google.javascript.jscomp.CodeGenerator.addArrayList(CodeGenerator.java:1666) at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:281) at com.google.javascript.jscomp.CodeGenerator.addExpr(CodeGenerator.java:1561) at com.google.javascript.jscomp.CodeGenerator.addList(CodeGenerator.java:1608) at com.google.javascript.jscomp.CodeGenerator.addList(CodeGenerator.java:1593) at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:821) at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:934) at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:638) at com.google.javascript.jscomp.CodeGenerator.add(CodeGenerator.java:106) at com.google.javascript.jscomp.CodePrinter.toSource(CodePrinter.java:875) at com.google.javascript.jscomp.CodePrinter.access$300(CodePrinter.java:42) at com.google.javascript.jscomp.CodePrinter$Builder.build(CodePrinter.java:821) at jscover.instrument.SourceProcessor.instrumentSource(SourceProcessor.java:475) at jscover.instrument.SourceProcessor.processSourceWithoutHeader(SourceProcessor.java:435) at jscover.instrument.SourceProcessor.processSource(SourceProcessor.java:423) at jscover.instrument.SourceProcessor.processSourceForServer(SourceProcessor.java:411) at jscover.instrument.InstrumenterService.instrumentJSForProxyServer(InstrumenterService.java:374) at jscover.server.InstrumentingRequestHandler.handleGet(InstrumentingRequestHandler.java:466) at jscover.server.HttpServer.run(HttpServer.java:416)

Tried with --js-version 6 and 5

tntim96 commented 7 years ago

Can you provide the JavaScript snippet that is causing the problem (and command line options).

mayankdevapplift commented 7 years ago

This is the file which is causing the issue main.tar.gz

tntim96 commented 7 years ago

I think I've fixed it. Can you build from source to test or use the latest 2.0.2-SNAPSHOT?

mayankdevapplift commented 7 years ago

This fixes the problem . Thanks a lot

tntim96 commented 7 years ago

Thanks. Will do a release in the next day or two.

tntim96 commented 7 years ago

Have released 2.0.2