Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Error during JS execution

未關閉
#712 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
java, javascript
領域
backend

研究方向

The report identifies the external XUI script and the HtmlUnit JavaScript parser, but does not name a repository file or test. Start by checking how HtmlUnit parses this script and whether its JavaScript compatibility settings cover the reserved word class. Done means reproducing the reported failure and adding a regression test that verifies the script executes without this exception.

由索引模型根據 Issue 內容生成。

描述

js-engine

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

主要語言
JavaScript
星號
952
分支
183
平均合併
2 天 1 小時
30 天內合併 PR
1

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

HtmlUnit/htmlunit 的其他 Issue

查看 HtmlUnit/htmlunit 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。