HtmlUnit / htmlunit

HtmlUnit is a "GUI-Less browser for Java programs".
https://www.htmlunit.org
Apache License 2.0
858 stars 170 forks source link

Error during JS execution #712

Open Terratros opened 7 months ago

Terratros commented 7 months ago

We are getting the following error:

SCHWERWIEGEND: Error during JavaScript execution ======= EXCEPTION START ======== Exception class=[org.htmlunit.corejs.javascript.EvaluatorException] org.htmlunit.ScriptException: identifier is a reserved word: class (https://.../auth/XUI/7.6437ffa8fa.js#1) at org.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:1003) at org.htmlunit.corejs.javascript.Context.call(Context.java:581) at org.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:481) at org.htmlunit.javascript.HtmlUnitContextFactory.callSecured(HtmlUnitContextFactory.java:347) at org.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:833) at org.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:799) at org.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:1) at org.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1156) at org.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1028) at org.htmlunit.html.ScriptElementSupport.executeScriptIfNeeded(ScriptElementSupport.java:193) at org.htmlunit.html.ScriptElementSupport$1.execute(ScriptElementSupport.java:117) at org.htmlunit.javascript.JavaScriptEngine.doProcessPostponedActions(JavaScriptEngine.java:1051) at org.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:998) at org.htmlunit.corejs.javascript.Context.call(Context.java:581) at org.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:481) at org.htmlunit.javascript.HtmlUnitContextFactory.callSecured(HtmlUnitContextFactory.java:347) at org.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:930) at org.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:903) at org.htmlunit.html.HtmlPage.executeJavaScriptFunction(HtmlPage.java:2599) at org.htmlunit.html.HtmlPage.executeJavaScriptFunction(HtmlPage.java:2592) at org.htmlunit.javascript.background.JavaScriptFunctionJob.runJavaScript(JavaScriptFunctionJob.java:56) at org.htmlunit.javascript.background.JavaScriptExecutionJob.run(JavaScriptExecutionJob.java:100) at org.htmlunit.javascript.background.JavaScriptJobManagerImpl.runSingleJob(JavaScriptJobManagerImpl.java:433) at org.htmlunit.javascript.background.DefaultJavaScriptExecutor.run(DefaultJavaScriptExecutor.java:156) at java.lang.Thread.run(Thread.java:748) Caused by: org.htmlunit.corejs.javascript.EvaluatorException: identifier is a reserved word: class (https://.../auth/XUI/7.6437ffa8fa.js#1) at org.htmlunit.javascript.HtmlUnitContextFactory$HtmlUnitErrorReporter.error(HtmlUnitContextFactory.java:431) at org.htmlunit.corejs.javascript.Parser.addError(Parser.java:257) at org.htmlunit.corejs.javascript.Parser.reportError(Parser.java:336) at org.htmlunit.corejs.javascript.Parser.reportError(Parser.java:327) at org.htmlunit.corejs.javascript.Parser.primaryExpr(Parser.java:3155) at org.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2721) at org.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2624) at org.htmlunit.corejs.javascript.Parser.expExpr(Parser.java:2544) at org.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2527) at org.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2513) at org.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2496) at org.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2474) at org.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2450) at org.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2441) at org.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2432) at org.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2423) at org.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2414) at org.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2405) at org.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2372) at org.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2330) at org.htmlunit.corejs.javascript.Parser.expr(Parser.java:2309) at org.htmlunit.corejs.javascript.Parser.statementHelper(Parser.java:1255) at org.htmlunit.corejs.javascript.Parser.statement(Parser.java:1110) at org.htmlunit.corejs.javascript.Parser.parseFunctionBody(Parser.java:735) at org.htmlunit.corejs.javascript.Parser.function(Parser.java:914) at org.htmlunit.corejs.javascript.Parser.function(Parser.java:848) at org.htmlunit.corejs.javascript.Parser.primaryExpr(Parser.java:3091) at org.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2721) at org.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2624) at org.htmlunit.corejs.javascript.Parser.expExpr(Parser.java:2544) at org.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2527) at org.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2513) at org.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2496) at org.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2474) at org.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2450) at org.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2441) at org.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2432) at org.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2423) at org.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2414) at org.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2405) at org.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2372) at org.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2330) at org.htmlunit.corejs.javascript.Parser.plainProperty(Parser.java:3661) at org.htmlunit.corejs.javascript.Parser.objectLiteral(Parser.java:3558) at org.htmlunit.corejs.javascript.Parser.primaryExpr(Parser.java:3099) at org.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2721) at org.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2624) at org.htmlunit.corejs.javascript.Parser.expExpr(Parser.java:2544) at org.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2527) at org.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2513) at org.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2496) at org.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2474) at org.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2450) at org.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2441) at org.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2432) at org.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2423) at org.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2414) at org.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2405) at org.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2372) at org.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2330) at org.htmlunit.corejs.javascript.Parser.arrayLiteral(Parser.java:3281) at org.htmlunit.corejs.javascript.Parser.primaryExpr(Parser.java:3095) at org.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2721) at org.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2624) at org.htmlunit.corejs.javascript.Parser.expExpr(Parser.java:2544) at org.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2527) at org.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2513) at org.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2496) at org.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2474) at org.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2450) at org.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2441) at org.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2432) at org.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2423) at org.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2414) at org.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2405) at org.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2372) at org.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2330) at org.htmlunit.corejs.javascript.Parser.argumentList(Parser.java:2692) at org.htmlunit.corejs.javascript.Parser.memberExprTail(Parser.java:2836) at org.htmlunit.corejs.javascript.Parser.memberExpr(Parser.java:2756) at org.htmlunit.corejs.javascript.Parser.unaryExpr(Parser.java:2624) at org.htmlunit.corejs.javascript.Parser.expExpr(Parser.java:2544) at org.htmlunit.corejs.javascript.Parser.mulExpr(Parser.java:2527) at org.htmlunit.corejs.javascript.Parser.addExpr(Parser.java:2513) at org.htmlunit.corejs.javascript.Parser.shiftExpr(Parser.java:2496) at org.htmlunit.corejs.javascript.Parser.relExpr(Parser.java:2474) at org.htmlunit.corejs.javascript.Parser.eqExpr(Parser.java:2450) at org.htmlunit.corejs.javascript.Parser.bitAndExpr(Parser.java:2441) at org.htmlunit.corejs.javascript.Parser.bitXorExpr(Parser.java:2432) at org.htmlunit.corejs.javascript.Parser.bitOrExpr(Parser.java:2423) at org.htmlunit.corejs.javascript.Parser.andExpr(Parser.java:2414) at org.htmlunit.corejs.javascript.Parser.orExpr(Parser.java:2405) at org.htmlunit.corejs.javascript.Parser.condExpr(Parser.java:2372) at org.htmlunit.corejs.javascript.Parser.assignExpr(Parser.java:2330) at org.htmlunit.corejs.javascript.Parser.expr(Parser.java:2309) at org.htmlunit.corejs.javascript.Parser.statementHelper(Parser.java:1255) at org.htmlunit.corejs.javascript.Parser.statement(Parser.java:1110) at org.htmlunit.corejs.javascript.Parser.parse(Parser.java:631) at org.htmlunit.corejs.javascript.Parser.parse(Parser.java:561) at org.htmlunit.corejs.javascript.Context.parse(Context.java:2540) at org.htmlunit.corejs.javascript.Context.compileImpl(Context.java:2471) at org.htmlunit.corejs.javascript.Context.compileString(Context.java:1439) at org.htmlunit.javascript.HtmlUnitContextFactory$TimeoutContext.compileString(HtmlUnitContextFactory.java:218) at org.htmlunit.corejs.javascript.Context.compileString(Context.java:1427) at org.htmlunit.javascript.JavaScriptEngine$1.doRun(JavaScriptEngine.java:824) at org.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:986) ... 24 more

rbri commented 5 months ago

see #755