Old HTMLUnit version bundled with Jenkins Test Harness

27 views
Skip to first unread message

Ullrich Hafner

unread,
May 1, 2018, 6:39:27 PM5/1/18
to Jenkins Developers
I stumbled again about an old patched version of a library that is included in Jenkins (Jenkins Test Harness module): org.jenkins-ci.main:jenkins-test-harness-htmlunit:2.18-1 The release is from 2015, it does not work with modern JS frameworks. Is there a simple workaround to replace it with a newer version?

With the 2015 version I get the following error when jquery is loading:

EcmaError: lineNumber=[2] column=[0] lineSource=[<no source>] name=[TypeError] sourceName=[https://code.jquery.com/jquery-3.3.1.min.js] message=[TypeError: Cannot find function createHTMLDocument in object [object DOMImplementation]. (https://code.jquery.com/jquery-3.3.1.min.js#2)
]
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function createHTMLDocument in object [object DOMImplementation]. (https://code.jquery.com/jquery-3.3.1.min.js#2)
at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:865)
at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:628)

I can deactivate JS, this helps at least to prevent the error. But I’m not sure what else is missing though...
signature.asc

Oleg Nenashev

unread,
May 2, 2018, 3:47:46 AM5/2/18
to Jenkins Developers
I would just update it in JTH if newer versions are [more-or-less] compatible. It is a development tool, so we can afford some breakages when plugin parent POM gets updated.

I do not remember why the fork was needed tho.

BR, Oleg

Ullrich Hafner

unread,
May 3, 2018, 4:38:03 PM5/3/18
to Jenkins Developers
Hmm, while trying to update I found some interesting files:

Did Tom already try that? And never finished it? Or what is the state of these changes?

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/0bdcab17-cd0a-4253-b71c-17afcbc8c96b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Ullrich Hafner

unread,
May 3, 2018, 4:56:53 PM5/3/18
to Jenkins Developers
I also found this old tread

and the corresponding PR:

The PR is marked as merged, however we still have the dependency to our forked HTMLUnit version. Any ideas? 
signature.asc

Jesse Glick

unread,
May 3, 2018, 5:01:40 PM5/3/18
to Jenkins Dev
On Thu, May 3, 2018 at 4:56 PM, Ullrich Hafner <ullrich...@gmail.com> wrote:
> we still have the dependency to our
> forked HTMLUnit version.

I guess it is

https://github.com/jenkinsci/jenkins-test-harness/blob/99b539155c625c7ef18747d58e126acad70226f2/pom.xml#L119-L120

you are referring to. The classes you pointed to were merely
_additions_ for compatibility and convenience.

You can see here

https://github.com/jenkinsci/jenkins-test-harness-htmlunit

that it is not really a fork, just a different Maven packaging. So you
should be able to update it by just editing the POM and releasing.

Ullrich Hafner

unread,
May 3, 2018, 6:30:41 PM5/3/18
to Jenkins Developers
Ok, thanks! I filed a PR:

https://github.com/jenkinsci/jenkins-test-harness/pull/103
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2MGcmC%2B__Y1v7z4C9qjRbsvT7bEVPS1Tmz90OeLkyxyQ%40mail.gmail.com.
signature.asc
Reply all
Reply to author
Forward
0 new messages