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

Parsing of output xml failed from robot plugin

    Details

    • Similar Issues:

      Description

      When I got upgrade for robot plugin from R1.6.5 to R2.1.1,  I got some failed after robot running :
      Robot results publisher started...
      -Parsing output xml:
      Failed!
      java.io.IOException: Parsing of output xml failed!
      at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:104)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:54)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3069)
      at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      at hudson.remoting.Request$2.run(Request.java:369)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to 135.252.244.121
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1788)
      at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      at hudson.remoting.Channel.call(Channel.java:998)
      at hudson.FilePath.act(FilePath.java:1069)
      at hudson.FilePath.act(FilePath.java:1058)
      at hudson.plugins.robot.RobotParser.parse(RobotParser.java:49)
      at hudson.plugins.robot.RobotPublisher.parse(RobotPublisher.java:221)
      at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:243)
      at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      at hudson.model.Build$BuildExecution.post2(Build.java:186)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      at hudson.model.Run.execute(Run.java:1881)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:428)
      Caused by: javax.xml.stream.XMLStreamException: Could not find elements [arg] (at line: 3321 column: 1)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.xmlException(RobotParser.java:179)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.ignoreUntilStarts(RobotParser.java:217)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processTest(RobotParser.java:299)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:155)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:153)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:153)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:153)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.parseResult(RobotParser.java:123)
      at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:99)
      ... 10 more
      Build step 'Publish Robot Framework test results' changed build result to FAILURE
      Finished: FAILURE
       
      Page generated: 2020-5-20 上午11时33分15秒REST API[Jenkins ver. 2.222.3|https://jenkins.io/]
       

      same robot framwork and xml are working under R1.6.5, I see update information in 2.x.x:

      Robot Framework Plugin 2.0.1 disables external entity resolution for its XML parser

      I don't know whether the rootcause is came form XXE upgrading or not

       

      -----Updating------

      All of failuer are came from x86 system  (CentOS 32  2.6.32-431.el6.i686 and 32bit Robot)

      In x64 system , it's OK

        Attachments

          Activity

          Hide
          hpaavola Harri Paavola added a comment -

          At work we noticed the same thing after upgrading from 2.0.1 to 2.1.1. Parser fails then

          <arguments>
          </arguments>

          is found from the xml. I know roughly nothing about Java, but this looks like it expects arguments tag to have some content https://github.com/jenkinsci/robot-plugin/compare/robot-2.0.1...master#diff-9f7edc4450c08c471b1bcb2f264f1d09R299

          Show
          hpaavola Harri Paavola added a comment - At work we noticed the same thing after upgrading from 2.0.1 to 2.1.1. Parser fails then <arguments> </arguments> is found from the xml. I know roughly nothing about Java, but this looks like it expects arguments tag to have some content https://github.com/jenkinsci/robot-plugin/compare/robot-2.0.1...master#diff-9f7edc4450c08c471b1bcb2f264f1d09R299
          Hide
          joaoppcastelo João Castelo added a comment - - edited

          Hi!

          Any news about this? I'm having the same issue with robot 3.1.2, python 3.8 and Robot Framework plugin 2.1.1 And the PR doesn't have any activity since April  

           

          Update:

          We were running the tests on an Jenkins agent and on the logs we saw that information

          java.io.IOException: Parsing of output xml failed!
          	at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:104)
          	at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:54)
          	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3073)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
          	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
          	at hudson.remoting.Request$2.run(Request.java:369)
          	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          	at java.lang.Thread.run(Thread.java:748)
          	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to <agent name>
          

          We also saw that, for the same tests and application, the line reported on the error stack was different but around the same values. So we added stages on the agent to stash the robot files (log, output and report), and with a stage on the main jenkins server, unstash those files and process them. With that, we were able to process the robot files and "fix" the issue. We also specified exactly the files to be processed, instead of using wildcards.

          Don't know how this could be fixed on the plugin itself :-/ Increasing the timeout? Downloading the file to the main jenkins server before processing them?

           

          Show
          joaoppcastelo João Castelo added a comment - - edited Hi! Any news about this? I'm having the same issue with robot 3.1.2, python 3.8 and Robot Framework plugin 2.1.1 And the PR doesn't have any activity since April     Update: We were running the tests on an Jenkins agent and on the logs we saw that information java.io.IOException: Parsing of output xml failed! at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:104) at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:54) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3073) at hudson.remoting.UserRequest.perform(UserRequest.java:211) at hudson.remoting.UserRequest.perform(UserRequest.java:54) at hudson.remoting.Request$2.run(Request.java:369) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang. Thread .run( Thread .java:748) Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to <agent name> We also saw that, for the same tests and application, the line reported on the error stack was different but around the same values. So we added stages on the agent to stash the robot files (log, output and report), and with a stage on the main jenkins server, unstash those files and process them. With that, we were able to process the robot files and "fix" the issue. We also specified exactly the files to be processed, instead of using wildcards. Don't know how this could be fixed on the plugin itself :-/ Increasing the timeout? Downloading the file to the main jenkins server before processing them?  

            People

            • Assignee:
              jpiironen jpiironen
              Reporter:
              yuejunjie yue junjie
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: