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

Parsing of output xml failed from robot plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • robot-plugin
    • None
    • 2.1.2

      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

          [JENKINS-62359] Parsing of output xml failed from robot plugin

          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

          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

          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?

           

          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?  

          Aleksi Simell added a comment -

          Hi everybody!

          Sorry for the delay in answering. These tickets are automatically assinged to jpiironen, who no longer works at our company, so I haven't got updates on newly created/updated tickets. Trying to fix this by assigning these to me.

          hpaavola's comment seems to be very likely. I'll need to check into this. In the meantime, can yuejunjie hpaavola or joaoppcastelo provide an example xml file I could test this on?

          Aleksi Simell added a comment - Hi everybody! Sorry for the delay in answering. These tickets are automatically assinged to jpiironen , who no longer works at our company, so I haven't got updates on newly created/updated tickets. Trying to fix this by assigning these to me. hpaavola 's comment seems to be very likely. I'll need to check into this. In the meantime, can yuejunjie   hpaavola or joaoppcastelo provide an example xml file I could test this on?

          Aleksi Simell added a comment -

          There's actually a PR pending on this: https://github.com/jenkinsci/robot-plugin/pull/31. There's some issues with breaking unit tests, but once those are sorted, this should be fixed.

          Aleksi Simell added a comment - There's actually a PR pending on this: https://github.com/jenkinsci/robot-plugin/pull/31.  There's some issues with breaking unit tests, but once those are sorted, this should be fixed.

          Aleksi Simell added a comment -

          PR merged. Fix will be available in next release.

          Aleksi Simell added a comment - PR merged. Fix will be available in next release.

          Dener Kraus added a comment -

          Hello, please could someone help me on that. It's happening this issue in my environment as description on Github issue that I opened some days ago: https://github.com/robotframework/robotframework/issues/4386

           

          This issue is being caught in a build of test cases for a website that mainly uses "seleniumlibrary" along with some tests by CLI using "sshlibrary" at the end of the build which takes around 12h the report generation always fails after finishing all compilation that is very annoying as you can see the error message bellow. So please, could someone help on this issue?

          Environment:
          OS where Jenkins, python and plugins has been installed: Ubuntu Desktop 20.04
          Jenkins 2.346.1

          Robot Framework plugin 3.2.0
          robotframework 4.1
          robotframework-pythonlibcore 3.0.0
          robotframework-requests 0.9.1
          robotframework-seleniumlibrary 5.1.3
          robotframework-sshlibrary 3.7.0

          We saw an old bug that seems to be the same issue going back to this latest robot plugin version: https://issues.jenkins.io/browse/JENKINS-62359

          The report generation is failing Always with bellow error messages:

          16:03:31 Robot results publisher started...
          16:03:31 -Parsing output xml:
          16:04:44 Failed!
          16:04:44 java.io.IOException: Parsing of output xml failed!
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:102)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:52)
          16:04:44 at hudson.FilePath.act(FilePath.java:1200)
          16:04:44 at hudson.FilePath.act(FilePath.java:1183)
          16:04:44 at hudson.plugins.robot.RobotParser.parse(RobotParser.java:48)
          16:04:44 at hudson.plugins.robot.RobotPublisher.parse(RobotPublisher.java:245)
          16:04:44 at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:267)
          16:04:44 at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
          16:04:44 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79)
          16:04:44 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
          16:04:44 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:816)
          16:04:44 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:765)
          16:04:44 at hudson.model.Build$BuildExecution.post2(Build.java:179)
          16:04:44 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:709)
          16:04:44 at hudson.model.Run.execute(Run.java:1922)
          16:04:44 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
          16:04:44 at hudson.model.ResourceController.execute(ResourceController.java:101)
          16:04:44 at hudson.model.Executor.run(Executor.java:442)
          16:04:44 Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[9043286,41397]
          16:04:44 Message: JAXP00010004: The accumulated size of entities is "50.000.001" that exceeded the "50.000.000" limit set by "FEATURE_SECURE_PROCESSING".
          16:04:44 at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:652)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processArgs(RobotParser.java:519)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:475)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processTest(RobotParser.java:302)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:153)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.parseResult(RobotParser.java:121)
          16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:97)
          16:04:44 ... 17 more
          16:04:44 Build step 'Publish Robot Framework test results' changed build result to FAILURE

          Dener Kraus added a comment - Hello, please could someone help me on that. It's happening this issue in my environment as description on Github issue that I opened some days ago: https://github.com/robotframework/robotframework/issues/4386   This issue is being caught in a build of test cases for a website that mainly uses "seleniumlibrary" along with some tests by CLI using "sshlibrary" at the end of the build which takes around 12h the report generation always fails after finishing all compilation that is very annoying as you can see the error message bellow. So please, could someone help on this issue? Environment: OS where Jenkins, python and plugins has been installed: Ubuntu Desktop 20.04 Jenkins 2.346.1 Robot Framework plugin 3.2.0 robotframework 4.1 robotframework-pythonlibcore 3.0.0 robotframework-requests 0.9.1 robotframework-seleniumlibrary 5.1.3 robotframework-sshlibrary 3.7.0 We saw an old bug that seems to be the same issue going back to this latest robot plugin version:  https://issues.jenkins.io/browse/JENKINS-62359 The report generation is failing Always with bellow error messages: 16:03:31 Robot results publisher started... 16:03:31 -Parsing output xml: 16:04:44 Failed! 16:04:44 java.io.IOException: Parsing of output xml failed! 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:102) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:52) 16:04:44 at hudson.FilePath.act(FilePath.java:1200) 16:04:44 at hudson.FilePath.act(FilePath.java:1183) 16:04:44 at hudson.plugins.robot.RobotParser.parse(RobotParser.java:48) 16:04:44 at hudson.plugins.robot.RobotPublisher.parse(RobotPublisher.java:245) 16:04:44 at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:267) 16:04:44 at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123) 16:04:44 at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:79) 16:04:44 at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) 16:04:44 at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:816) 16:04:44 at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:765) 16:04:44 at hudson.model.Build$BuildExecution.post2(Build.java:179) 16:04:44 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:709) 16:04:44 at hudson.model.Run.execute(Run.java:1922) 16:04:44 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) 16:04:44 at hudson.model.ResourceController.execute(ResourceController.java:101) 16:04:44 at hudson.model.Executor.run(Executor.java:442) 16:04:44 Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col] : [9043286,41397] 16:04:44 Message: JAXP00010004: The accumulated size of entities is "50.000.001" that exceeded the "50.000.000" limit set by "FEATURE_SECURE_PROCESSING". 16:04:44 at java.xml/com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:652) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processArgs(RobotParser.java:519) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:475) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processKeyword(RobotParser.java:482) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processTest(RobotParser.java:302) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:153) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.processSuite(RobotParser.java:151) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.parseResult(RobotParser.java:121) 16:04:44 at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:97) 16:04:44 ... 17 more 16:04:44 Build step 'Publish Robot Framework test results' changed build result to FAILURE

          Aleksi Simell added a comment -

          It looks like (as Pekka Klärck also figured in the RF issue tracker) that your output.xml file too large to be handled by the plugin.

          A quick Google search gave me this stackoverflow issue, which gives a solution of adding
          -DentityExpansionLimit=2147480000 -DtotalEntitySizeLimit=2147480000 -Djdk.xml.totalEntitySizeLimit=2147480000 to your Java arguments when you start Jenkins (see instructions for example here)

          Aleksi Simell added a comment - It looks like (as Pekka Klärck also figured in the RF issue tracker) that your output.xml file too large to be handled by the plugin. A quick Google search gave me this stackoverflow issue , which gives a solution of adding -DentityExpansionLimit=2147480000 -DtotalEntitySizeLimit=2147480000 -Djdk.xml.totalEntitySizeLimit=2147480000 to your Java arguments when you start Jenkins (see instructions for example here )

          Dener Kraus added a comment -

          Thank you a lot aleksisimell for helping me out on that, I really appreciate it. I added the arguments in the Java Jenkins command and then tomorrow I'll give you guys a feedback if it really fixed the issue, because the builds are expending 12h to finish and then generate the output.xml.

          Dener Kraus added a comment - Thank you a lot aleksisimell for helping me out on that, I really appreciate it. I added the arguments in the Java Jenkins command and then tomorrow I'll give you guys a feedback if it really fixed the issue, because the builds are expending 12h to finish and then generate the output.xml.

          Dener Kraus added a comment -

          No issues in the last builds. Thank you a lot!

          Dener Kraus added a comment - No issues in the last builds. Thank you a lot!

            aleksisimell Aleksi Simell
            yuejunjie yue junjie
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: