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

Illegal base64 character in FileLogStorage$1.writeHtmlTo(FileLogStorage.java:203)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Critical
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      workflow-api-plugin 2.36

      Jenkins 2.222.3, workflow-api-plugin 2.40, splunk-devops 1.9.3, splunk-devops-extend 1.9.3
    • Similar Issues:

      Description

      sporadic console error

      java.lang.IllegalArgumentException: Illegal base64 character 5b
      	at java.util.Base64$Decoder.decode0(Base64.java:714)
      	at java.util.Base64$Decoder.decode(Base64.java:526)
      	at hudson.util.UnbufferedBase64InputStream.read(UnbufferedBase64InputStream.java:41)
      	at hudson.util.UnbufferedBase64InputStream.read(UnbufferedBase64InputStream.java:53)
      	at java.io.DataInputStream.readFully(DataInputStream.java:195)
      	at java.io.DataInputStream.readFully(DataInputStream.java:169)
      	at hudson.console.ConsoleNote.readFrom(ConsoleNote.java:248)
      	at hudson.console.ConsoleAnnotationOutputStream.eol(ConsoleAnnotationOutputStream.java:111)
      	at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
      	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
      	at java.io.FilterOutputStream.write(FilterOutputStream.java:77)
      	at org.jenkinsci.plugins.workflow.log.FileLogStorage$1$1.write(FileLogStorage.java:238)
      	at java.io.FilterOutputStream.write(FilterOutputStream.java:125)
      	at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:89)
      	at org.kohsuke.stapler.framework.io.LargeText$HeadMark.moveTo(LargeText.java:314)
      	at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:229)
      	at hudson.console.AnnotatedLargeText.writeRawLogTo(AnnotatedLargeText.java:168)
      	at org.jenkinsci.plugins.workflow.log.FileLogStorage$1.writeHtmlTo(FileLogStorage.java:203)
      	at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:147)
      	at org.kohsuke.stapler.framework.io.LargeText.doProgressText(LargeText.java:264)
      	at hudson.console.AnnotatedLargeText.doProgressiveHtml(AnnotatedLargeText.java:95)
      

        Attachments

          Issue Links

            Activity

            fengxx Ted Xiao created issue -
            mikeryan_tan Mike Ryan made changes -
            Field Original Value New Value
            Environment workflow-api-plugin 2.36 workflow-api-plugin 2.36

            Jenkins 2.222.3, workflow-api-plugin 2.40, splunk-devops 1.9.3, splunk-devops-extend 1.9.3
            mikeryan_tan Mike Ryan made changes -
            Component/s splunk-devops-plugin [ 21829 ]
            fengxx Ted Xiao made changes -
            Description sporadic console error
            {code}
            java.lang.IllegalArgumentException: Illegal base64 character 5b
            at java.util.Base64$Decoder.decode0(Base64.java:714)
            at java.util.Base64$Decoder.decode(Base64.java:526)
            at hudson.util.UnbufferedBase64InputStream.read(UnbufferedBase64InputStream.java:41)
            at hudson.util.UnbufferedBase64InputStream.read(UnbufferedBase64InputStream.java:53)
            at java.io.DataInputStream.readFully(DataInputStream.java:195)
            at java.io.DataInputStream.readFully(DataInputStream.java:169)
            at hudson.console.ConsoleNote.readFrom(ConsoleNote.java:248)
            at hudson.console.ConsoleAnnotationOutputStream.eol(ConsoleAnnotationOutputStream.java:111)
            at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
            at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
            at java.io.FilterOutputStream.write(FilterOutputStream.java:77)
            at org.jenkinsci.plugins.workflow.log.FileLogStorage$1$1.write(FileLogStorage.java:238)
            at java.io.FilterOutputStream.write(FilterOutputStream.java:125)
            at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:89)
            at org.kohsuke.stapler.framework.io.LargeText$HeadMark.moveTo(LargeText.java:314)
            at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:229)
            at hudson.console.AnnotatedLargeText.writeRawLogTo(AnnotatedLargeText.java:168)
            at org.jenkinsci.plugins.workflow.log.FileLogStorage$1.writeHtmlTo(FileLogStorage.java:203)
            at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:147)
            at org.kohsuke.stapler.framework.io.LargeText.doProgressText(LargeText.java:264)
            at hudson.console.AnnotatedLargeText.doProgressiveHtml(AnnotatedLargeText.java:95)
            {code}

            it is fine to view console text via /consoleText URL which is using
            {code}
             public void doConsoleText(StaplerRequest req, StaplerResponse rsp) throws IOException {
                    rsp.setContentType("text/plain;charset=UTF-8");
                    try (OutputStream os = rsp.getCompressedOutputStream(req)) {
                        writeLogTo(getLogText()::writeLogTo, os);
                    }
                }
            {code}

            suspect a bug in FileLogStorage writeHtmlTo method
            sporadic console error
            {code}
            java.lang.IllegalArgumentException: Illegal base64 character 5b
            at java.util.Base64$Decoder.decode0(Base64.java:714)
            at java.util.Base64$Decoder.decode(Base64.java:526)
            at hudson.util.UnbufferedBase64InputStream.read(UnbufferedBase64InputStream.java:41)
            at hudson.util.UnbufferedBase64InputStream.read(UnbufferedBase64InputStream.java:53)
            at java.io.DataInputStream.readFully(DataInputStream.java:195)
            at java.io.DataInputStream.readFully(DataInputStream.java:169)
            at hudson.console.ConsoleNote.readFrom(ConsoleNote.java:248)
            at hudson.console.ConsoleAnnotationOutputStream.eol(ConsoleAnnotationOutputStream.java:111)
            at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
            at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
            at java.io.FilterOutputStream.write(FilterOutputStream.java:77)
            at org.jenkinsci.plugins.workflow.log.FileLogStorage$1$1.write(FileLogStorage.java:238)
            at java.io.FilterOutputStream.write(FilterOutputStream.java:125)
            at org.apache.commons.io.output.ProxyOutputStream.write(ProxyOutputStream.java:89)
            at org.kohsuke.stapler.framework.io.LargeText$HeadMark.moveTo(LargeText.java:314)
            at org.kohsuke.stapler.framework.io.LargeText.writeLogTo(LargeText.java:229)
            at hudson.console.AnnotatedLargeText.writeRawLogTo(AnnotatedLargeText.java:168)
            at org.jenkinsci.plugins.workflow.log.FileLogStorage$1.writeHtmlTo(FileLogStorage.java:203)
            at hudson.console.AnnotatedLargeText.writeLogTo(AnnotatedLargeText.java:147)
            at org.kohsuke.stapler.framework.io.LargeText.doProgressText(LargeText.java:264)
            at hudson.console.AnnotatedLargeText.doProgressiveHtml(AnnotatedLargeText.java:95)
            {code}
            fengxx Ted Xiao made changes -
            Attachment log.gz [ 51437 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-62663 [ JENKINS-62663 ]
            mikeryan_tan Mike Ryan made changes -
            Link This issue relates to JENKINS-62985 [ JENKINS-62985 ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              fengxx Ted Xiao
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: