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

Starting from 2.8.4 I get "Cannot read properties of null (reading 'toString')"

      Starting from 2.8.4 I get this error on initialization of active choice cascade

      Uncaught (in promise) TypeError: Cannot read properties of null (reading 'toString')
          at e.getElementValue (UnoChoice.js:1:1615)
          at u (UnoChoice.js:1:7682)
          at l.getReferencedParametersAsText (UnoChoice.js:1:8682)
          at s.<anonymous> (UnoChoice.js:1:13433)
          at s.update (UnoChoice.js:1:3508)
          at UnoChoice.js:1:4958
          at _invokeIgnored (UnoChoice.js:1:2225)
          at Object.<anonymous> (UnoChoice.js:1:4202)
          at Object.renderDynamicRenderParameter (UnoChoice.js:1:3508)
      

      I have

      • isMultiTenant - Check Boxes
      • configuration - Single Select - Referenced isMultiTenant (using isMultiTenant.toBoolean())
      • selectedConfiguration - Formatted Hidden HTML - Referenced configuration
      Updating cascade of parameter [ configuration ] ...
      UnoChoice.js:1 Values retrieved from Referenced Parameters: isMultiTenant=
      UnoChoice.js:1 Calling Java server code to update HTML elements...
      UnoChoice.js:1 Updating cascade of parameter [ selectedConfiguration ] ...
      UnoChoice.js:1 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'toString')
      

        1. Scriptler2.groovy
          0.3 kB
        2. Scriptler3.groovy
          0.3 kB
        3. Scriptler4.groovy
          0.0 kB
        4. Scriptler5.groovy
          0.0 kB
        5. Scriptler6.groovy
          0.1 kB
        6. Scriptler7.groovy
          0.1 kB
        7. Jenkinsfile
          0.9 kB
        8. Scriptler1.groovy
          0.0 kB
        9. config.xml
          5 kB
        10. Screenshot 2024-11-26 at 21.14.29.png
          Screenshot 2024-11-26 at 21.14.29.png
          786 kB
        11. Untitled.png
          Untitled.png
          888 kB

          [JENKINS-73922] Starting from 2.8.4 I get "Cannot read properties of null (reading 'toString')"

          Any observations on this?

          Jiří Skřivánek added a comment - Any observations on this?

          Is this already fixed?

          Jiří Skřivánek added a comment - Is this already fixed?

          Rumen added a comment - - edited

          Same here by trying with few CascadeChoiceParameters ...
          Praying for fix ....

          Rumen added a comment - - edited Same here by trying with few CascadeChoiceParameters ... Praying for fix ....

          Jinsu added a comment -

          We had to fallback from 2.8.5 to 2.8.3...

          Praying for fix too

          Jinsu added a comment - We had to fallback from 2.8.5 to 2.8.3... Praying for fix too

          Anyone willing to fix this?

          Jiří Skřivánek added a comment - Anyone willing to fix this?

          Hi, I've synced the code, now going through issues. We had quite a fix regressions in the last updates. Looks like both were done to match new requirements in the Jenkins API for plugins (things for security, or improvements in the JS code).

          But issues like this one, without a simple step by step set of instructions to reproduce go down into the backlog. If others want it fixed sooner, it'd be easier if 1) someone provided a pull request for review or 2) someone provided a step by step (ELI5, is OK) or a config.xml of the job configuration (screenshots help, thanks, but I'd still need to spend time thinking how to reproduce, if I didn't miss something, etc., whereas with other issues that include better instructions I can just start working on the issue much faster).

          A third option is that I noticed there seems to be some duplicated issues, so maybe somebody else reported the same problem in another issue but with the steps to reproduce it, in which case this could get fixed there, but we'd still need someone to test & confirm it.

          Cheers

          Bruno P. Kinoshita added a comment - Hi, I've synced the code, now going through issues. We had quite a fix regressions in the last updates. Looks like both were done to match new requirements in the Jenkins API for plugins (things for security, or improvements in the JS code). But issues like this one, without a simple step by step set of instructions to reproduce go down into the backlog. If others want it fixed sooner, it'd be easier if 1) someone provided a pull request for review or 2) someone provided a step by step (ELI5, is OK) or a config.xml of the job configuration (screenshots help, thanks, but I'd still need to spend time thinking how to reproduce, if I didn't miss something, etc., whereas with other issues that include better instructions I can just start working on the issue much faster). A third option is that I noticed there seems to be some duplicated issues, so maybe somebody else reported the same problem in another issue but with the steps to reproduce it, in which case this could get fixed there, but we'd still need someone to test & confirm it. Cheers

          I attached a simple job config. Just "Build with Parameters" and you see

          Uncaught (in promise) TypeError: this.getSelectValues(...) is null
              getElementValue http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              u http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              getReferencedParametersAsText http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              update http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              _async http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              t http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              _invokeIgnored http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              t http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              _async http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1
              <anonymous> http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/DynamicReferenceParameter/dynamic-reference-parameter.js:11
              <anonymous> http://localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/DynamicReferenceParameter/dynamic-reference-parameter.js:7
          

          Jiří Skřivánek added a comment - I attached a simple job config. Just "Build with Parameters" and you see Uncaught (in promise) TypeError: this .getSelectValues(...) is null getElementValue http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 u http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 getReferencedParametersAsText http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 update http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 _async http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 t http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 _invokeIgnored http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 t http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 _async http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/stapler/unochoice/UnoChoice.js:1 <anonymous> http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/DynamicReferenceParameter/dynamic-reference-parameter.js:11 <anonymous> http: //localhost:8080/adjuncts/51c663ec/org/biouno/unochoice/DynamicReferenceParameter/dynamic-reference-parameter.js:7

          Leonardo added a comment -

          Hi kinow

          I was having the same issue after upgrading to 2.8.4. Then I downgraded it to 2.8.3 and it worked again.

          PFA the scenario that stopped to work when I upgraded to 2.8.4.

          The param2 keeps loading, nothing appears into the param3, and if I switch the value of the param1 then it reworks.

          Jenkinsfile

          Scriptler1.groovy

          Scriptler2.groovy

          Scriptler3.groovy

          Scriptler4.groovy

          Scriptler5.groovy

          Scriptler6.groovy

          Scriptler7.groovy

          Let me know if you need some clarification on that.

          Thanks!

           

          Leonardo added a comment - Hi kinow I was having the same issue after upgrading to 2.8.4. Then I downgraded it to 2.8.3 and it worked again. PFA the scenario that stopped to work when I upgraded to 2.8.4. The param2  keeps loading, nothing appears into the  param3 , and if I switch the value of the param1  then it reworks. Jenkinsfile Scriptler1.groovy Scriptler2.groovy Scriptler3.groovy Scriptler4.groovy Scriptler5.groovy Scriptler6.groovy Scriptler7.groovy Let me know if you need some clarification on that. Thanks!  

            kinow Bruno P. Kinoshita
            jiri_skrivanek Jiří Skřivánek
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: