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

Jenkins 2.277.1 Job with build parameter configuration is not saving

      Hi,

      I have pipeline job, trying to add the build parameter for the job, when  edit the job and click save button, I can see parameter goes to the Jenkins, but it not getting saved. 

      From the network trace I see ‘hudson-model-ParametersDefinitionProperty’ value goes to server.

       How to troubleshoot this issue?

      attaching job json file and plugin list on my system.

      {    "description""",    "stapler-class-bag": [        "true",        "true"    ],    "hudson-plugins-jira-JiraProjectProperty": {        "siteName": "https://jira-example.com/"    },    "hudson-plugins-buildblocker-BuildBlockerProperty": {        "useBuildBlocker": false,        "blockingJobs": "",        "blockLevel": "global",        "scanQueueFor": "disabled"    },    "jenkins-model-BuildDiscarderProperty": {        "specified": false,        "": "0",        "strategy": {            "daysToKeepStr": "",            "numToKeepStr": "",            "artifactDaysToKeepStr": "",            "artifactNumToKeepStr": "",            "stapler-class<span class="code-quote">": "hudson.tasks.LogRotator",            "$class<span class="code-quote">": "hudson.tasks.LogRotator"        }    },    "org-jenkinsci-plugins-workflow-job-properties-DisableConcurrentBuildsJobProperty": {        "specified": false    },    "org-jenkinsci-plugins-workflow-job-properties-DisableResumeJobProperty": {        "specified": false    },    "com-coravy-hudson-plugins-github-GithubProjectProperty": {},    "com-dabsquared-gitlabjenkins-connection-GitLabConnectionProperty": {        "gitLabConnection": "https://gitlab-example.com/",        "useAlternativeCredential": false,        "includeUser": "false",        "jobCredentialId": ""    },    "hudson-plugins-copyartifact-CopyArtifactPermissionProperty": {},    "se-diabol-jenkins-pipeline-PipelineProperty": {        "enabled": false,        "stageName": "",        "taskName": "",        "descriptionTemplate": ""    },    "org-jenkinsci-plugins-workflow-job-properties-DurabilityHintJobProperty": {        "specified": false,        "hint": "MAX_SURVIVABILITY"    },    "org-jenkinsci-plugins-pipeline-modeldefinition-properties-PreserveStashesJobProperty": {        "specified": false,        "buildCount": "1"    },    "hudson-model-ParametersDefinitionProperty": {        "specified": true,        "parameterDefinitions": {            "name": "one",            "defaultValue": false,            "description": "",            "stapler-class<span class="code-quote">": "hudson.model.BooleanParameterDefinition",            "$class<span class="code-quote">": "hudson.model.BooleanParameterDefinition"        }    },    "jenkins-branch-RateLimitBranchProperty$JobPropertyImpl": {},    "org-jenkinsci-plugins-envinject-EnvInjectJobProperty": {        "on": false,        "keepJenkinsSystemVariables": true,        "keepBuildVariables": true,        "overrideBuildParameters": false,        "info": {            "propertiesFilePath": "",            "propertiesContent": "",            "scriptFilePath": "",            "scriptContent": "",            "secureGroovyScript": {                "script": "",                "sandbox": false            },            "loadFilesFromMaster": false        }    },    "hudson-plugins-tfs-TeamPRPushTrigger": false,    "jobContext": "Jenkins PR build",    "targetBranches": "*/master",    "hudson-plugins-promoted_builds-PromotionTrigger": false,    "jobName": "",    "process": "",    "org-jfrog-hudson-trigger-ArtifactoryTrigger": false,    "": [        "ART",        "0"    ],    "details": {        "artifactoryName": "ART",        "stapler-class<span class="code-quote">": "org.jfrog.hudson.ServerDetails"    },    "spec": "",    "paths": "",    "com-cloudbees-jenkins-GitHubPushTrigger": false,    "hudson-triggers-SCMTrigger": false,    "scmpoll_spec": "",    "ignorePostCommitHooks": false,    "disable": false,    "hasCustomQuietPeriod": false,    "quiet_period": "5",    "pseudoRemoteTrigger": false,    "authToken": "",    "displayNameOrNull": "",    "definition": {        "script": "",        "": [            "try sample Pipeline...",            "\u0001\u0001"        ],        "sandbox": true,        "stapler-class<span class="code-quote">": "org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition",        "$class<span class="code-quote">": "org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition"    },    "core:apply": "",    "Jenkins-Crumb": ""}
      

       

      Thanks

          [JENKINS-65579] Jenkins 2.277.1 Job with build parameter configuration is not saving

          VivaLaPanda added a comment -

          I'm having this issue as well. I tried uninstalling all deprecated plugins as mentioned in JENKINS-64072, and then I tried rolling back the latest Jenkins update. Neither have worked.

          VivaLaPanda added a comment - I'm having this issue as well. I tried uninstalling all deprecated plugins as mentioned in JENKINS-64072 , and then I tried rolling back the latest Jenkins update. Neither have worked.

          VivaLaPanda added a comment -

          Disabling the TFS plugin appears to fix this, but that's not really a long term fix...

          VivaLaPanda added a comment - Disabling the TFS plugin appears to fix this, but that's not really a long term fix...

          VivaLaPanda added a comment -

          So I've figured out a fix for this. It's like a two line modification in hudson-behavior.js, but I can't just edit the war file because it breaks the manifest. Any advice on how to modfiy the war file to edit that js file would be great. I've tried just removing jenkins.fs/jenkins.rsa and then wiping that file entry from the MANIFEST (as indicated https://issues.jenkins.io/browse/JENKINS-25153), but I get a "no main manifest attribute" error from Jenkins

          VivaLaPanda added a comment - So I've figured out a fix for this. It's like a two line modification in hudson-behavior.js, but I can't just edit the war file because it breaks the manifest. Any advice on how to modfiy the war file to edit that js file would be great. I've tried just removing jenkins.fs/jenkins.rsa and then wiping that file entry from the MANIFEST (as indicated https://issues.jenkins.io/browse/JENKINS-25153 ), but I get a "no main manifest attribute" error from Jenkins

          VivaLaPanda added a comment -

          I've created a patch that fixes this. I'll submit it as a PR if I get around to it. Basically part of the config page frontend js has an error and just catching that error seems to fix the issue.

          Just add a try/catch to line ~1550 of hudson-behavior.js (the call to applyNameRefHelper(x.firstChild,null,id. If you consume and log those errors you should be good.

          Issue is because of this random character that the tfs plugin outputs, which breaks the js behavior: 

           

          P.S. kubectl if you trust me enough to run it, here's a patched WAR: https://drive.google.com/file/d/12ioJnHEnhv39vTrP6g6cS1Vg9LkHXaHm/view?usp=sharing

          VivaLaPanda added a comment - I've created a patch that fixes this. I'll submit it as a PR if I get around to it. Basically part of the config page frontend js has an error and just catching that error seems to fix the issue. Just add a try/catch to line ~1550 of hudson-behavior.js (the call to applyNameRefHelper(x.firstChild,null,id . If you consume and log those errors you should be good. Issue is because of this random character that the tfs plugin outputs, which breaks the js behavior:    P.S. kubectl  if you trust me enough to run it, here's a patched WAR:  https://drive.google.com/file/d/12ioJnHEnhv39vTrP6g6cS1Vg9LkHXaHm/view?usp=sharing

          software added a comment -

          VivaLa, Thanks for the patch. let me test this and update you the status.

          software added a comment - VivaLa, Thanks for the patch. let me test this and update you the status.

          software added a comment -

          This worked in firefox browser. looks like Chrome caches the javascript, its not pulling the new update. hope this gets into the main build soon.

          software added a comment - This worked in firefox browser. looks like Chrome caches the javascript, its not pulling the new update. hope this gets into the main build soon.

          VivaLaPanda added a comment -

          kubectl try opening chrome inspector (ctrl+shift+I), and then right clicking on the refresh button and clicking "empty cache and hard reload".

          That should force Chrome to redownload the JS

          VivaLaPanda added a comment - kubectl  try opening chrome inspector (ctrl+shift+I), and then right clicking on the refresh button and clicking "empty cache and hard reload". That should force Chrome to redownload the JS

            Unassigned Unassigned
            kubectl software
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: