Skip to content

Fix integration tests because of unsupported HTMX in htmlunit #1749

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

Open
github-actions bot opened this issue Mar 17, 2025 · 1 comment
Open

Fix integration tests because of unsupported HTMX in htmlunit #1749

github-actions bot opened this issue Mar 17, 2025 · 1 comment
Labels
ADR/needed A decision has been made and it needs to be documented area/integration tests techdebt
Milestone

Comments

@github-actions
Copy link

The puzzle 1671-479aeb53 from #1671 has to be resolved:

mystamps/pom.xml

Line 1001 in 6315235

@todo #1671 Fix integration tests because of unsupported HTMX in htmlunit

Tech debt for: 6315235 (#1671)

@php-coder
Copy link
Owner

At this moment, loading of /series/{id} page fails with:

[ERROR] Error during JavaScript execution
com.gargoylesoftware.htmlunit.ScriptException: TypeError: redeclaration of const i. (http://127.0.0.1:8080/public/htmx/2.0.4/dist/htmx.min.js#1)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run (JavaScriptEngine.java:1001)
    at net.sourceforge.htmlunit.corejs.javascript.Context.call (Context.java:590)
    at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call (ContextFactory.java:484)
    at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured (HtmlUnitContextFactory.java:349)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile (JavaScriptEngine.java:830)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile (JavaScriptEngine.java:796)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile (JavaScriptEngine.java:118)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl (HtmlPage.java:1153)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile (HtmlPage.java:1024)
    at com.gargoylesoftware.htmlunit.html.ScriptElementSupport.executeScriptIfNeeded (ScriptElementSupport.java:196)
    at com.gargoylesoftware.htmlunit.html.ScriptElementSupport$1.execute (ScriptElementSupport.java:120)
    at com.gargoylesoftware.htmlunit.html.ScriptElementSupport.onAllChildrenAddedToPage (ScriptElementSupport.java:143)
    at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage (HtmlScript.java:191)
    at com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement (HtmlUnitNekoDOMBuilder.java:572)
    at net.sourceforge.htmlunit.xerces.parsers.AbstractSAXParser.endElement (AbstractSAXParser.java:451)
    at com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement (HtmlUnitNekoDOMBuilder.java:517)
    at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.callEndElement (HTMLTagBalancer.java:1242)
    at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.endElement (HTMLTagBalancer.java:1169)
    at net.sourceforge.htmlunit.cyberneko.filters.DefaultFilter.endElement (DefaultFilter.java:218)
    at net.sourceforge.htmlunit.cyberneko.filters.NamespaceBinder.endElement (NamespaceBinder.java:310)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanEndElement (HTMLScanner.java:3145)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan (HTMLScanner.java:2091)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner.scanDocument (HTMLScanner.java:918)
    at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse (HTMLConfiguration.java:367)
    at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse (HTMLConfiguration.java:318)
    at net.sourceforge.htmlunit.xerces.parsers.XMLParser.parse (XMLParser.java:80)
    at com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.parse (HtmlUnitNekoDOMBuilder.java:773)
    at com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoHtmlParser.parse (HtmlUnitNekoHtmlParser.java:204)
    at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage (DefaultPageCreator.java:299)
    at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage (DefaultPageCreator.java:219)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto (WebClient.java:669)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto (WebClient.java:571)
    at com.gargoylesoftware.htmlunit.WebClient.getPage (WebClient.java:489)
    at com.gargoylesoftware.htmlunit.WebClient.getPage (WebClient.java:396)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.get (HtmlUnitDriver.java:720)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$get$8 (HtmlUnitDriver.java:702)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$runAsync$0 (HtmlUnitDriver.java:448)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:750)
Caused by: net.sourceforge.htmlunit.corejs.javascript.EvaluatorException: TypeError: redeclaration of const i. (http://127.0.0.1:8080/public/htmx/2.0.4/dist/htmx.min.js#1)
    at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory$HtmlUnitErrorReporter.error (HtmlUnitContextFactory.java:435)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addError (Parser.java:257)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addError (Parser.java:235)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.defineSymbol (Parser.java:2252)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.variables (Parser.java:2159)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statementHelper (Parser.java:1197)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statement (Parser.java:1104)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statements (Parser.java:1063)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.block (Parser.java:1993)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statementHelper (Parser.java:1218)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statement (Parser.java:1104)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.getNextStatementAfterInlineComments (Parser.java:1458)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.ifStatement (Parser.java:1293)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statementHelper (Parser.java:1158)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statement (Parser.java:1104)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.ifStatement (Parser.java:1301)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statementHelper (Parser.java:1158)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statement (Parser.java:1104)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.parseFunctionBody (Parser.java:736)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.function (Parser.java:911)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.function (Parser.java:845)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.parseFunctionBody (Parser.java:733)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.function (Parser.java:911)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.function (Parser.java:845)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.primaryExpr (Parser.java:3081)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.memberExpr (Parser.java:2711)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.unaryExpr (Parser.java:2614)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.expExpr (Parser.java:2534)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.mulExpr (Parser.java:2517)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.addExpr (Parser.java:2503)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.shiftExpr (Parser.java:2486)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.relExpr (Parser.java:2464)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.eqExpr (Parser.java:2440)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitAndExpr (Parser.java:2431)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitXorExpr (Parser.java:2422)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.bitOrExpr (Parser.java:2413)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.andExpr (Parser.java:2404)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.orExpr (Parser.java:2395)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.condExpr (Parser.java:2362)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.assignExpr (Parser.java:2320)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.variables (Parser.java:2168)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statementHelper (Parser.java:1197)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.statement (Parser.java:1104)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.parse (Parser.java:632)
    at net.sourceforge.htmlunit.corejs.javascript.Parser.parse (Parser.java:562)
    at net.sourceforge.htmlunit.corejs.javascript.Context.parse (Context.java:2549)
    at net.sourceforge.htmlunit.corejs.javascript.Context.compileImpl (Context.java:2480)
    at net.sourceforge.htmlunit.corejs.javascript.Context.compileString (Context.java:1448)
    at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory$TimeoutContext.compileString (HtmlUnitContextFactory.java:221)
    at net.sourceforge.htmlunit.corejs.javascript.Context.compileString (Context.java:1436)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$1.doRun (JavaScriptEngine.java:821)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run (JavaScriptEngine.java:984)
    at net.sourceforge.htmlunit.corejs.javascript.Context.call (Context.java:590)
    at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call (ContextFactory.java:484)
    at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.callSecured (HtmlUnitContextFactory.java:349)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile (JavaScriptEngine.java:830)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile (JavaScriptEngine.java:796)
    at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.compile (JavaScriptEngine.java:118)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl (HtmlPage.java:1153)
    at com.gargoylesoftware.htmlunit.html.HtmlPage.loadExternalJavaScriptFile (HtmlPage.java:1024)
    at com.gargoylesoftware.htmlunit.html.ScriptElementSupport.executeScriptIfNeeded (ScriptElementSupport.java:196)
    at com.gargoylesoftware.htmlunit.html.ScriptElementSupport$1.execute (ScriptElementSupport.java:120)
    at com.gargoylesoftware.htmlunit.html.ScriptElementSupport.onAllChildrenAddedToPage (ScriptElementSupport.java:143)
    at com.gargoylesoftware.htmlunit.html.HtmlScript.onAllChildrenAddedToPage (HtmlScript.java:191)
    at com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement (HtmlUnitNekoDOMBuilder.java:572)
    at net.sourceforge.htmlunit.xerces.parsers.AbstractSAXParser.endElement (AbstractSAXParser.java:451)
    at com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.endElement (HtmlUnitNekoDOMBuilder.java:517)
    at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.callEndElement (HTMLTagBalancer.java:1242)
    at net.sourceforge.htmlunit.cyberneko.HTMLTagBalancer.endElement (HTMLTagBalancer.java:1169)
    at net.sourceforge.htmlunit.cyberneko.filters.DefaultFilter.endElement (DefaultFilter.java:218)
    at net.sourceforge.htmlunit.cyberneko.filters.NamespaceBinder.endElement (NamespaceBinder.java:310)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scanEndElement (HTMLScanner.java:3145)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner$ContentScanner.scan (HTMLScanner.java:2091)
    at net.sourceforge.htmlunit.cyberneko.HTMLScanner.scanDocument (HTMLScanner.java:918)
    at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse (HTMLConfiguration.java:367)
    at net.sourceforge.htmlunit.cyberneko.HTMLConfiguration.parse (HTMLConfiguration.java:318)
    at net.sourceforge.htmlunit.xerces.parsers.XMLParser.parse (XMLParser.java:80)
    at com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoDOMBuilder.parse (HtmlUnitNekoDOMBuilder.java:773)
    at com.gargoylesoftware.htmlunit.html.parser.neko.HtmlUnitNekoHtmlParser.parse (HtmlUnitNekoHtmlParser.java:204)
    at com.gargoylesoftware.htmlunit.DefaultPageCreator.createHtmlPage (DefaultPageCreator.java:299)
    at com.gargoylesoftware.htmlunit.DefaultPageCreator.createPage (DefaultPageCreator.java:219)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto (WebClient.java:669)
    at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto (WebClient.java:571)
    at com.gargoylesoftware.htmlunit.WebClient.getPage (WebClient.java:489)
    at com.gargoylesoftware.htmlunit.WebClient.getPage (WebClient.java:396)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.get (HtmlUnitDriver.java:720)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$get$8 (HtmlUnitDriver.java:702)
    at org.openqa.selenium.htmlunit.HtmlUnitDriver.lambda$runAsync$0 (HtmlUnitDriver.java:448)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    at java.lang.Thread.run (Thread.java:750)

@php-coder php-coder added the ADR/needed A decision has been made and it needs to be documented label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADR/needed A decision has been made and it needs to be documented area/integration tests techdebt
Projects
None yet
Development

No branches or pull requests

1 participant