Skip to content

[JENKINS-65585] incompatability between FormSubmission and HTMLUnit post Jenkins 2.289 #12032

Closed

Description

@jenkins-infra-bot

Several plugins have failing tests when using new versions of core (e.g. `mvn test -Djenkins.version=2.289`) and they seem to follow a simiular pattern

calling HTMLUnit's `click` to submit a form is resulting in Jenkins erroring with something like

  15.170 [id=94]WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://localhost:64686/jenkins/job/testFolder/support/generateAndDownload
net.sf.json.JSONException: A JSONObject text must begin with '{' at character 1 of init
at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:499)
at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:919)
...

which subsequently causes the test to fail.

On the surface this appears to be an incompatability between HTMLUnit and Jenkins bumping to the latest HTMLUnit seemed to make no difference.

So far observed the issue in

  • support-core
  • ldap
  • ssh-slaves
  • pipeline-input-step

Originally reported by teilo, imported from: incompatability between FormSubmission and HTMLUnit post Jenkins 2.289
  • status: Closed
  • priority: Major
  • component(s): core, jenkins-test-harness
  • label(s): 2.289.2-fixed
  • resolution: Fixed
  • resolved: 2021-05-25T20:51:52+00:00
  • votes: 1
  • watchers: 5
  • imported: 2025-11-24
Raw content of original issue

Several plugins have failing tests when using new versions of core (e.g. `mvn test -Djenkins.version=2.289`) and they seem to follow a simiular pattern

calling HTMLUnit's `click` to submit a form is resulting in Jenkins erroring with something like

  15.170 [id=94]        WARNING o.e.j.s.h.ContextHandler$Context#log: Error while serving http://localhost:64686/jenkins/job/testFolder/support/generateAndDownload
net.sf.json.JSONException: A JSONObject text must begin with '{' at character 1 of init
        at net.sf.json.util.JSONTokener.syntaxError(JSONTokener.java:499)
        at net.sf.json.JSONObject._fromJSONTokener(JSONObject.java:919)
...

which subsequently causes the test to fail.

On the surface this appears to be an incompatability between HTMLUnit and Jenkins bumping to the latest HTMLUnit seemed to make no difference.

So far observed the issue in

  • support-core
  • ldap
  • ssh-slaves
  • pipeline-input-step

Activity

  1. jenkins-infra-bot commented on May 10, 2021

    @jenkins-infra-bot
    Author
    raihaan:

    This should be the issue that is breaking pipeline-input and pipeline-model-definition as well.

    Possibly related: #5405

  2. jenkins-infra-bot commented on May 10, 2021

    @jenkins-infra-bot
    Author
    teilo:

    discussion in #5405 (comment) and forward

  3. jenkins-infra-bot commented on May 10, 2021

    @jenkins-infra-bot
    Author
    tom_gl:

    I've shared some findings and experiments here: #5479

  4. jenkins-infra-bot commented on May 18, 2021

    @jenkins-infra-bot
    Author
    markewaite:
    • Original comment link
    • Raw content of original comment:

      I believe the change also caused the save of a matrix job to never return. I'm able to save the specific matrix project in Jenkins 2.288 but not in 2.289 through 2.293.

      When I revert the non-trusted submit event change, then I am able to save it with 2.289-SNAPSHOT.

      The change in PR-5479 from tom_gl in a Jenkins 2.294 snapshot build did not resolve the issue I saw when saving a matrix job. See [JENKINS-53462] Stop using deprecated submit events #5405 (comment) for details

    I believe the change also caused the save of a matrix job to never return. I'm able to save the specific matrix project in Jenkins 2.288 but not in 2.289 through 2.293.

    When I revert the non-trusted submit event change, then I am able to save it with 2.289-SNAPSHOT.

    The change in PR-5479 from tom_gl in a Jenkins 2.294 snapshot build did not resolve the issue I saw when saving a matrix job. See #5405 (comment) for details

  5. jenkins-infra-bot commented on May 25, 2021

    @jenkins-infra-bot
    Author
    tom_gl:
    • Original comment link
    • Raw content of original comment:

      PR-5479, fixing failing HtmlUnit tests as well as some jobs configuration not saving, is merged. Should be released in 2.296 next week.

      Hopefully it can then be included in LTS 2.289.2 (with a revert of the revert of JENKINS-53462 / PR-5405).

    PR-5479, fixing failing HtmlUnit tests as well as some jobs configuration not saving, is merged. Should be released in 2.296 next week.

    Hopefully it can then be included in LTS 2.289.2 (with a revert of the revert of JENKINS-53462 / PR-5405).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions