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

getCauses()[0].getUser() not giving username after timeout in Pipeline

XMLWordPrintable

      Below code stopped working after updating plugins recently(pipeline API)

                          try {
                              timeout(time: 15, unit: 'MINUTES') {
                                  input message: 'Do you want to skip the Random wait ? Click on Proceed', submitter: 'username'
                              }
                          } catch (err) \{
                              def user = err.getCauses()[0].getUser()
                              if('SYSTEM' == user.toString()) { //timeout
                                  echo "Input timeout expired, continueing with the next stages"
                                  currentBuild.result = "SUCCESS"
                              } else \{
                                  echo "Input aborted by: [${user}]"
                                  currentBuild.result = "ABORTED"
                                  return
                              }
                          }
      

      Abort works, but after timeout it started throw below exceptions.

      Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 89493efb-8a18-4803-9e27-3e25c6ab1a74
      hudson.remoting.ProxyException: groovy.lang.MissingMethodException: No signature of method: org.jenkinsci.plugins.workflow.steps.FlowInterruptedException.getAt() is applicable for argument types: () values: []
      Possible solutions: getAt(java.lang.String), putAt(java.lang.String, java.lang.Object), wait(), grep(), wait(long), grep(java.lang.Object)
      at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:159)
      at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:178)
      at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:182)
      at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
      at org.jenkinsci.plugins.workflow.cps.LoggingInvoker.methodCall(LoggingInvoker.java:105)
      at WorkflowScript.run(WorkflowScript:14)
      at _{}cps.transform{}_(Native Method)
      at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:90)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:116)
      at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixName(FunctionCallBlock.java:80)
      at jdk.internal.reflect.GeneratedMethodAccessor180.invoke(Unknown Source)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.base/java.lang.reflect.Method.invoke(Unknown Source)
      at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
      at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
      at com.cloudbees.groovy.cps.Next.step(Next.java:83)
      at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:147)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:17)
      at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:49)
      at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:180)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:423)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:331)
      at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:295)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$wrap$4(CpsVmExecutorService.java:136)
      at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
      at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
      at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
      at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:68)
      at jenkins.util.ErrorLoggingExecutorService.lambda$wrap$0(ErrorLoggingExecutorService.java:51)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:53)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$1.call(CpsVmExecutorService.java:50)
      at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:136)
      at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:275)
      at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.lambda$categoryThreadFactory$0(CpsVmExecutorService.java:50)
      at java.base/java.lang.Thread.run(Unknown Source)
      Finished: FAILURE

        1. sample-pipeline.groovy
          0.9 kB
        2. run-jenkins.sh
          0.9 kB
        3. plugins.txt
          2 kB
        4. JENKINS-73194.zip
          35 kB

            Unassigned Unassigned
            basavarajmane Basavaraj
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: