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

Continue to get [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens] after upgrade to 280

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • token-macro-plugin
    • None
    • 285.vff7645a_56ff0

      related to issues

      https://issues.jenkins.io/browse/JENKINS-67862

      https://issues.jenkins.io/browse/JENKINS-67873

       

      Upgraded the Token Macro jenkins plugin to 280.v97a_82642793c but still encountering the error reported in these tickets.

       

      Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Don't run]
      Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Fail the build]
      Build step 'Conditional steps (multiple)' changed build result to FAILURE
      Build step 'Conditional steps (multiple)' marked build as failure

       

       

      Prior to v277 these jobs ran without issue.

      It may be related to the specific syntax in my conditional statement - with is a string beginning with a $.

      See the attached screenshot for details.

       

       

       

       

       

        1. ExampleCondition2.png
          ExampleCondition2.png
          28 kB
        2. PluginVersion.png
          PluginVersion.png
          20 kB
        3. no_bug.png
          no_bug.png
          12 kB
        4. bug.png
          bug.png
          12 kB
        5. TokenMacroConditional.png
          TokenMacroConditional.png
          55 kB

          [JENKINS-67916] Continue to get [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens] after upgrade to 280

          Brendan Farrell created issue -
          Brendan Farrell made changes -
          Description Original: related to issues

          https://issues.jenkins.io/browse/JENKINS-67862

          https://issues.jenkins.io/browse/JENKINS-67873

           

          Upgraded the Token Macro jenkins plugin to 280 but still encountering the error reported in these tickets.

           

          ```

          Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Don't run]
          Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Fail the build]
          Build step 'Conditional steps (multiple)' changed build result to FAILURE
          Build step 'Conditional steps (multiple)' marked build as failure

          ```

           

          Prior to v277 these jobs ran without issue.

           

          It may be related to the specific syntax in my conditional statement - with is a string beginning with a $.

           

          !TokenMacroConditional.png

           

           

           
          New: related to issues

          https://issues.jenkins.io/browse/JENKINS-67862

          https://issues.jenkins.io/browse/JENKINS-67873

           

          Upgraded the Token Macro jenkins plugin to {{280.v97a_82642793c}} but still encountering the error reported in these tickets.

           

          {{Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Don't run]}}
          {{ Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Fail the build]}}
          {{ Build step 'Conditional steps (multiple)' changed build result to FAILURE}}
          {{ Build step 'Conditional steps (multiple)' marked build as failure}}

           

           

          Prior to v277 these jobs ran without issue.

          It may be related to the specific syntax in my conditional statement - with is a string beginning with a $.

          See the attached screenshot for details.

           

           

           

           

           
          Brendan Farrell made changes -
          Description Original: related to issues

          https://issues.jenkins.io/browse/JENKINS-67862

          https://issues.jenkins.io/browse/JENKINS-67873

           

          Upgraded the Token Macro jenkins plugin to {{280.v97a_82642793c}} but still encountering the error reported in these tickets.

           

          {{Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Don't run]}}
          {{ Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Fail the build]}}
          {{ Build step 'Conditional steps (multiple)' changed build result to FAILURE}}
          {{ Build step 'Conditional steps (multiple)' marked build as failure}}

           

           

          Prior to v277 these jobs ran without issue.

          It may be related to the specific syntax in my conditional statement - with is a string beginning with a $.

          See the attached screenshot for details.

           

           

           

           

           
          New: related to issues

          https://issues.jenkins.io/browse/JENKINS-67862

          https://issues.jenkins.io/browse/JENKINS-67873

           

          Upgraded the Token Macro jenkins plugin to {{280.v97a_82642793c}} but still encountering the error reported in these tickets.

           
          {quote}Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Don't run]
          Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Error processing tokens], action = [Fail the build]
          Build step 'Conditional steps (multiple)' changed build result to FAILURE
          Build step 'Conditional steps (multiple)' marked build as failure
          {quote}
           

           

          Prior to v277 these jobs ran without issue.

          It may be related to the specific syntax in my conditional statement - with is a string beginning with a $.

          See the attached screenshot for details.

           

           

           

           

           
          Brendan Farrell made changes -
          Link New: This issue blocks JENKINS-67862 [ JENKINS-67862 ]
          Brendan Farrell made changes -
          Link Original: This issue blocks JENKINS-67862 [ JENKINS-67862 ]
          Brendan Farrell made changes -
          Link New: This issue relates to JENKINS-67862 [ JENKINS-67862 ]
          Rafa made changes -
          Attachment New: bug.png [ 57369 ]
          Rafa made changes -
          Attachment New: no_bug.png [ 57370 ]

          Rafa added a comment -

          We are suffering the same bug as in 277, with the same stacktrace reported by Boon Elschenbroich in https://issues.jenkins.io/browse/JENKINS-67862 

          The bug is risen when we call a parameterized managed script and one of the parameters is referring a variable without braces.

          note: we have other parameterized managed scripts referring variables without braces but only this particular one is rising the exception, AFAWK at the time of this comment.

          Workaround:

          Add braces to the variable

          Rafa added a comment - We are suffering the same bug as in 277, with the same stacktrace reported by Boon Elschenbroich in https://issues.jenkins.io/browse/JENKINS-67862   The bug is risen when we call a parameterized managed script and one of the parameters is referring a variable without braces. note: we have other parameterized managed scripts referring variables without braces but only this particular one is rising the exception, AFAWK at the time of this comment. Workaround : Add braces to the variable

          Brendan Farrell added a comment - - edited

          Thanks for the info.

           

          In my case string 1 is a parameter value which should be substituted (token_response) and string 2 is a text string - which also contains $, but should not be substituted.

           

          token_response=Bearer ${$.get_authorisation.response.body.token}

           

          If $token_response equals "Bearer ${$.get_authorisation.response.body.token}" execute command A, if $token_response equals something else execute command B.

          Perhaps i need some escape characters in the string2 text box (\ before the $??).

          Brendan Farrell added a comment - - edited Thanks for the info.   In my case string 1 is a parameter value which should be substituted (token_response) and string 2 is a text string - which also contains $, but should not be substituted.   token_response=Bearer ${$.get_authorisation.response.body.token }   If $token_response equals "Bearer ${$.get_authorisation.response.body.token}" execute command A, if $token_response equals something else execute command B. Perhaps i need some escape characters in the string2 text box (\ before the $??).

            slide_o_mix Alex Earl
            brendanf Brendan Farrell
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: