Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS error in execution page #685

Open
JamesLee66 opened this issue Dec 7, 2023 · 2 comments
Open

JS error in execution page #685

JamesLee66 opened this issue Dec 7, 2023 · 2 comments
Labels
js-engine Issues related to the js engine

Comments

@JamesLee66
Copy link

org.htmlunit.ScriptException: identifier is a reserved word: class (https://lf-cdn-tos.bytescm.com/obj/static/growth/douyin_ug/chunk/865.7b59e39c.js#2)
at org.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:1014)
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:844)
at org.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:810)
at org.htmlunit.javascript.JavaScriptEngine.compile(JavaScriptEngine.java:113)
at org.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:1152)
at org.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1024)
at org.htmlunit.html.ScriptElementSupport.executeScriptIfNeeded(ScriptElementSupport.java:194)
at org.htmlunit.html.ScriptElementSupport$1.execute(ScriptElementSupport.java:118)
at org.htmlunit.html.ScriptElementSupport.onAllChildrenAddedToPage(ScriptElementSupport.java:141)
at org.htmlunit.html.HtmlScript.onAllChildrenAddedToPage(HtmlScript.java:192)
at org.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement(HtmlUnitNekoDOMBuilder.java:599)
at org.htmlunit.cyberneko.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:411)
at org.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement(HtmlUnitNekoDOMBuilder.java:548)
at org.htmlunit.cyberneko.HTMLTagBalancer.callEndElement(HTMLTagBalancer.java:1270)
at org.htmlunit.cyberneko.HTMLTagBalancer.endElement(HTMLTagBalancer.java:1198)
at org.htmlunit.cyberneko.filters.DefaultFilter.endElement(DefaultFilter.java:201)
at org.htmlunit.cyberneko.filters.NamespaceBinder.endElement(NamespaceBinder.java:268)
at org.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanEndElement(HTMLScanner.java:2990)
at org.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan(HTMLScanner.java:1980)
at org.htmlunit.cyberneko.HTMLScanner.scanDocument(HTMLScanner.java:814)
at org.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:344)
at org.htmlunit.cyberneko.HTMLConfiguration.parse(HTMLConfiguration.java:302)
at org.htmlunit.cyberneko.xerces.parsers.XMLParser.parse(XMLParser.java:72)
at org.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.parse(HtmlUnitNekoDOMBuilder.java:842)
at org.htmlunit.html.parser.neko.HtmlUnitNekoHtmlParser.parse(HtmlUnitNekoHtmlParser.java:202)
at org.htmlunit.DefaultPageCreator.createHtmlPage(DefaultPageCreator.java:308)
at org.htmlunit.DefaultPageCreator.createPage(DefaultPageCreator.java:227)
at org.htmlunit.WebClient.loadWebResponseInto(WebClient.java:671)
at org.htmlunit.WebClient.loadWebResponseInto(WebClient.java:573)
at org.htmlunit.WebClient.getPage(WebClient.java:491)
at org.htmlunit.WebClient.getPage(WebClient.java:398)
at org.htmlunit.WebClient.getPage(WebClient.java:536)
at org.htmlunit.WebClient.getPage(WebClient.java:518)

@JamesLee66 JamesLee66 changed the title 执行页面中的JS报错 JS error in execution page Dec 7, 2023
@rbri
Copy link
Member

rbri commented Dec 11, 2023

@JamesLee66
Sorry but it looks like your are facing one of the major problems of Rhino - mozilla/rhino#835.
At the moment there is no solution for that. I have some plans to overcome this but these are only plans so far.

Your options are

@rbri
Copy link
Member

rbri commented Mar 27, 2024

see #755

@rbri rbri added the js-engine Issues related to the js engine label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
js-engine Issues related to the js engine
Projects
None yet
Development

No branches or pull requests

2 participants