Old HTMLUnit version bundled with Jenkins Test Harness

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Old HTMLUnit version bundled with Jenkins Test Harness

Ulli Hafner
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...

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/648345C8-8E3B-4F2A-A551-FFF3682E576B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Old HTMLUnit version bundled with Jenkins Test Harness

Oleg Nenashev
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

On Wednesday, May 2, 2018 at 12:39:27 AM UTC+2, Ullrich Hafner wrote:
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=[<a href="https://code.jquery.com/jquery-3.3.1.min.js" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.jquery.com%2Fjquery-3.3.1.min.js\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNETNYlvf77RFexwX3dVqN5Fya0QhQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.jquery.com%2Fjquery-3.3.1.min.js\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNETNYlvf77RFexwX3dVqN5Fya0QhQ&#39;;return true;">https://code.jquery.com/jquery-3.3.1.min.js] message=[TypeError: Cannot find function createHTMLDocument in object [object DOMImplementation]. (<a href="https://code.jquery.com/jquery-3.3.1.min.js#2" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.jquery.com%2Fjquery-3.3.1.min.js%232\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQKDdJPSL8XPgp1Nk3SWhLdMxTTQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.jquery.com%2Fjquery-3.3.1.min.js%232\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQKDdJPSL8XPgp1Nk3SWhLdMxTTQ&#39;;return true;">https://code.jquery.com/jquery-3.3.1.min.js#2)
]
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot find function createHTMLDocument in object [object DOMImplementation]. (<a href="https://code.jquery.com/jquery-3.3.1.min.js#2" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.jquery.com%2Fjquery-3.3.1.min.js%232\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQKDdJPSL8XPgp1Nk3SWhLdMxTTQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fcode.jquery.com%2Fjquery-3.3.1.min.js%232\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQKDdJPSL8XPgp1Nk3SWhLdMxTTQ&#39;;return true;">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...

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Old HTMLUnit version bundled with Jenkins Test Harness

Ulli Hafner
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?

Am 02.05.2018 um 09:47 schrieb Oleg Nenashev <[hidden email]>:

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

On Wednesday, May 2, 2018 at 12:39:27 AM UTC+2, Ullrich Hafner wrote:
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...

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/AAEE2A34-2C3E-41B8-865E-740084352EA9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Old HTMLUnit version bundled with Jenkins Test Harness

Ulli Hafner
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? 

Am 03.05.2018 um 22:37 schrieb Ullrich Hafner <[hidden email]>:

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?

Am 02.05.2018 um 09:47 schrieb Oleg Nenashev <[hidden email]>:

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

On Wednesday, May 2, 2018 at 12:39:27 AM UTC+2, Ullrich Hafner wrote:
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...

--
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 [hidden email].
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.


--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/D02F21B3-5CC1-4D97-B714-1C20E9991B68%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc (540 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Old HTMLUnit version bundled with Jenkins Test Harness

Jesse Glick-4
On Thu, May 3, 2018 at 4:56 PM, Ullrich Hafner <[hidden email]> 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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2MGcmC%2B__Y1v7z4C9qjRbsvT7bEVPS1Tmz90OeLkyxyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Old HTMLUnit version bundled with Jenkins Test Harness

Ulli Hafner
Ok, thanks! I filed a PR:

https://github.com/jenkinsci/jenkins-test-harness/pull/103

> Am 03.05.2018 um 23:01 schrieb Jesse Glick <[hidden email]>:
>
> On Thu, May 3, 2018 at 4:56 PM, Ullrich Hafner <[hidden email]> 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.
>
> --
> 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 [hidden email].
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2MGcmC%2B__Y1v7z4C9qjRbsvT7bEVPS1Tmz90OeLkyxyQ%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/11E616A0-A851-4DD8-8B5E-7F26DBB91E64%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc (540 bytes) Download Attachment