Skip to content

HTMLUnit 4.19.0 and 4.20.0 report 'caller is not a function' in the Jenkins test harness #1064

@MarkEWaite

Description

@MarkEWaite

HTMLUnit 4.19.0 and 4.20.0 report that the caller is not a function for the sortable-drag-drop.js file.

A sample stack trace looks like this:

EcmaError: lineNumber=[115] column=[0] lineSource=[<no source>] name=[TypeError] sourceName=[https://localhost:44557/jenkins/static/c3b2c270/jsbundles/sortable-drag-drop.js] message=[TypeError: caller is not a function, it is object. (https://localhost:44557/jenkins/static/c3b2c270/jsbundles/sortable-drag-drop.js#115)]
org.htmlunit.ScriptException: TypeError: caller is not a function, it is object. (https://localhost:44557/jenkins/static/c3b2c270/jsbundles/sortable-drag-drop.js#115)
        at org.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:938)
        at org.htmlunit.corejs.javascript.Context.call(Context.java:636)
        at org.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:462)
        at org.htmlunit.javascript.HtmlUnitContextFactory.callSecured(HtmlUnitContextFactory.java:325)
        at org.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:785)
        at org.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:105)
        at org.htmlunit.html.HtmlPage.loadExternalJavaScriptFile(HtmlPage.java:1030)
        at org.htmlunit.html.ScriptElementSupport.executeScriptIfNeeded(ScriptElementSupport.java:185)

HTMLUnit 4.18.0 passes tests in the Jenkins test harness and is used widely in Jenkins.

The sortable-drop-drop.js source file does not have 115 lines. Line 115 of jsbundles/sortable-drag-drop.js in my Jenkins installation looks like this:

/******/                                        if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {

I assume that is something that is added by webpack. Any hints to suggest what we should investigate so that we can upgrade to HTMLUnit 4.20.0?

Related pull requests

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions