Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64568

Can't save job configuration: JSONObject["hudson-triggers-TimerTrigger"] is not a JSONObject

      After upgrading Jenkins to 2.264 or higher I am unable to save any job configuration that uses a "Build periodically" trigger. If I modify an existing job with such a trigger or create a new job and include such a trigger and try to save, the following exception shows up and the configuration is not saved:

      JSONObject["hudson-triggers-TimerTrigger"] is not a JSONObject.

      Stack trace and Jenkins log for "doConfigSubmit" attached.

      Steps to reproduce:

      • Create New Item -> Freestyle project
      • Select checkbox "Build periodically" in section Build Triggers
      • Enter any schedule, e. g. "@mignight" or "H 1 * * *"
      • Click save -> ERROR

      As far as I know both freestyle project and periodic trigger are part of core Jenkins and not of any plugin, but I am not completely sure about that. If I should provide a list of installed plugins or check for any specific one, please let me know.

      I reproduced this bug with Jenkins 2.264, 2.269 and the latest version 2.274. Downgrading to 2.263 resolves it.

        1. TimerTrigger_StackTrace.txt
          9 kB
          Inga
        2. TimerTrigger_Log.txt
          12 kB
          Inga
        3. plugins.txt
          2 kB
          Inga
        4. image-2021-01-10-12-54-41-223.png
          79 kB
          Maor

          [JENKINS-64568] Can't save job configuration: JSONObject["hudson-triggers-TimerTrigger"] is not a JSONObject

          Inga created issue -
          Inga made changes -
          Description Original: After upgrading Jenkins to 2.264 or higher I am unable to save any job configuration that uses a "Build periodically" trigger. If I modify an existing job with such a trigger or create a new job and include such a trigger and try to save, the following exception shows up and the configuration is not saved:

          JSONObject["hudson-triggers-TimerTrigger"] is not a JSONObject.

          Stack trace and Jenkins log for "doConfigSubmit" attached.

          Steps to reproduce:
           * Create New Item -> Freestyle project
           * Select checkbox "Build periodically" in section Build Triggers
           * Enter any schedule, e. g. "@mignight" or "H 1 * * *"
           * Click save -> ERROR

          As far as I know both freestyle project and periodic trigger are part of core Jenkins and not of any plugin, but I am not completely sure about that. If I should provide a least of installed plugins or check for any specific one, please let me know.

          I reproduced this bug with Jenkins 2.264, 2.269 and the latest version 2.274. Downgrading to 2.263 resolves it.
          New: After upgrading Jenkins to 2.264 or higher I am unable to save any job configuration that uses a "Build periodically" trigger. If I modify an existing job with such a trigger or create a new job and include such a trigger and try to save, the following exception shows up and the configuration is not saved:

          JSONObject["hudson-triggers-TimerTrigger"] is not a JSONObject.

          Stack trace and Jenkins log for "doConfigSubmit" attached.

          Steps to reproduce:
           * Create New Item -> Freestyle project
           * Select checkbox "Build periodically" in section Build Triggers
           * Enter any schedule, e. g. "@mignight" or "H 1 * * *"
           * Click save -> ERROR

          As far as I know both freestyle project and periodic trigger are part of core Jenkins and not of any plugin, but I am not completely sure about that. If I should provide a list of installed plugins or check for any specific one, please let me know.

          I reproduced this bug with Jenkins 2.264, 2.269 and the latest version 2.274. Downgrading to 2.263 resolves it.
          Tim Jacomb made changes -
          Labels New: tables-to-divs-regression
          Tim Jacomb made changes -
          Component/s New: _unsorted [ 19622 ]
          Component/s Original: core [ 15593 ]

          Tim Jacomb added a comment -

          Hi please provide a list of plugins, following the instructions in https://www.jenkins.io/doc/developer/views/table-to-div-migration/#some-plugins-are-known-to-be-broken

          JENKINS_HOST=username:password@myhost.com:port
          curl -sSL "http://$JENKINS_HOST/pluginManager/api/xml?depth=1&xpath=/*/*/shortName|/*/*/version&wrapper=plugins" | perl -pe 's/.*?<shortName>([\w-]+).*?<version>([^<]+)()(<\/\w+>)+/\1 \2\n/g'| sed 's/ /:/' | cut -d ':' -f 1 | sort > plugins.txt
          

          Tim Jacomb added a comment - Hi please provide a list of plugins, following the instructions in https://www.jenkins.io/doc/developer/views/table-to-div-migration/#some-plugins-are-known-to-be-broken JENKINS_HOST=username:password@myhost.com:port curl -sSL "http: //$JENKINS_HOST/pluginManager/api/xml?depth=1&xpath= /*/*/ shortName| /*/*/ version&wrapper=plugins" | perl -pe 's/.*?<shortName>([\w-]+).*?<version>([^<]+)()(<\/\w+>)+/\1 \2\n/g' | sed 's/ /:/' | cut -d ':' -f 1 | sort > plugins.txt
          Inga made changes -
          Attachment New: plugins.txt [ 53776 ]

          Inga added a comment -

          Hi Tim, I attached the list of installed plugins. I also disabled the plugins in batches and re-enabled them and it looks like github and gitlab-plugin cause my issue.

          In detail:

          • Disabled github, github-branch-source, github-organization-folder and gitlab-plugin -> no error
          • Disabled github, github-branch-source, github-organization but not gitlab-plugin -> error
          • Disabled gitlab-plugin but not github, github-branch-source and github-organization -> error

          I don't think we use github currently, but we do use webhooks from gitlab to Jenkins, which I believe are provided by gitlab-plugin.

          Inga added a comment - Hi Tim, I attached the list of installed plugins. I also disabled the plugins in batches and re-enabled them and it looks like github and gitlab-plugin cause my issue. In detail: Disabled github, github-branch-source, github-organization-folder and gitlab-plugin -> no error Disabled github, github-branch-source, github-organization but not gitlab-plugin -> error Disabled gitlab-plugin but not github, github-branch-source and github-organization -> error I don't think we use github currently, but we do use webhooks from gitlab to Jenkins, which I believe are provided by gitlab-plugin.

          Tim Jacomb added a comment -

          I believe both those plugins are fixed on master but not released, you could try build them from source and upload your custom version?

          Tim Jacomb added a comment - I believe both those plugins are fixed on master but not released, you could try build them from source and upload your custom version?
          Maor made changes -
          Attachment New: image-2021-01-10-12-54-41-223.png [ 53787 ]

          Maor added a comment -

          We also have the same issue (can't save 'Build periodically with parameters' configuration) when using Active choice parameter plugin.
          Jobs without a parameters from that type are ok.
           
          When adding an Active choice parameter to the job configuration as try to save, we got this:

          Current jenkins version:  2.274
          All of our plugin been updated to the latest version includes the active choice parameter plugin
           
           

          Maor added a comment - We also have the same issue (can't save 'Build periodically with parameters' configuration) when using Active choice parameter plugin. Jobs without a parameters from that type are ok.   When adding an Active choice parameter to the job configuration as try to save, we got this: Current jenkins version:  2.274 All of our plugin been updated to the latest version includes the active choice parameter plugin    

            Unassigned Unassigned
            iquatuor Inga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: