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

Improper Encoding of Sync Status

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      When SCM-Sync has failed to sync properly, and is showing the page footer prompting to "Click here" to clear the logs of failures.
      Jenkins 2.150
      All browsers
    • Similar Issues:

      Description

      All the HTML tags within the lowest layer of <span> were HTML encoded, so rather than being interpreted as tags, they were interpreted as plain text. This broke the link to clear the log.

        Attachments

          Activity

          Hide
          timmyson Tim Foster added a comment - - edited

          Turns out I did save a copy of the HTML in question:

          <span style="color:gray">SCM Sync status : <img src="/static/a4fc8faf/images/16x16/error.png" alt="" width="16" height="16">
          &lt;br&gt;Tue Nov 06 04:07:06 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Tue Nov 06 04:07:14 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Tue Nov 06 04:08:34 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Tue Nov 06 04:08:42 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Wed Nov 07 20:28:19 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Wed Nov 07 20:28:26 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;&lt;br/&gt;To remove this message, please &lt;a href='#' onclick='javascript:removeLog();'&gt;click here&lt;/a&gt;
          </span>

          I needed to edit the DOM and replace all the > and < with > and <.

           

           

           

          Show
          timmyson Tim Foster added a comment - - edited Turns out I did save a copy of the HTML in question: <span style="color:gray">SCM Sync status : <img src="/static/a4fc8faf/images/16x16/error.png" alt="" width="16" height="16"> &lt;br&gt;Tue Nov 06 04:07:06 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Tue Nov 06 04:07:14 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Tue Nov 06 04:08:34 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Tue Nov 06 04:08:42 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Wed Nov 07 20:28:19 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;Wed Nov 07 20:28:26 GMT 2018 : Checkout /var/lib/jenkins/scm-sync-configuration/checkoutConfiguration&lt;br/&gt;&lt;br/&gt;To remove this message, please &lt;a href='#' onclick='javascript:removeLog();'&gt;click here&lt;/a&gt; </span> I needed to edit the DOM and replace all the > and < with > and <.      
          Hide
          ctataryn Craig Tataryn added a comment - - edited

          Tim Foster This only happens when something "goes wrong" with the sync correct?  I had this happen to me when I deleted a job. For some reason SCM Sync couldn't deleted it from git and I had the garbled status message appear at the bottom of the page.

          My temporary work-around for this was to open developer tools in my browser and go to the console and type:

          window.removeLog()
          Show
          ctataryn Craig Tataryn added a comment - - edited Tim Foster This only happens when something "goes wrong" with the sync correct?  I had this happen to me when I deleted a job. For some reason SCM Sync couldn't deleted it from git and I had the garbled status message appear at the bottom of the page. My temporary work-around for this was to open developer tools in my browser and go to the console and type: window.removeLog()
          Hide
          ericthieme Eric Thieme added a comment -

          +1

          Hi, I have this problem since a few weeks and it would really help if I could purge it again. Thanks for your time.

          Show
          ericthieme Eric Thieme added a comment - +1 Hi, I have this problem since a few weeks and it would really help if I could purge it again. Thanks for your time.
          Hide
          simonmartineaugv Simon Martineau added a comment -

          Hi, this issue makes my jenkins instance completely unusable as the messages take about 90% of the page. There is no scroll bar so I can't access the part of the Jenkins web page that is hidden by the messages. The only way I can access it is by zooming out, making it impossible to read.

           

          Craig Tataryn: How can I access the "developer tool" console you refer to in your comment?

          Is it possible to clear the logs from the groovy script console?

          Show
          simonmartineaugv Simon Martineau added a comment - Hi, this issue makes my jenkins instance completely unusable as the messages take about 90% of the page. There is no scroll bar so I can't access the part of the Jenkins web page that is hidden by the messages. The only way I can access it is by zooming out, making it impossible to read.   Craig Tataryn : How can I access the "developer tool" console you refer to in your comment? Is it possible to clear the logs from the groovy script console?
          Hide
          simonmartineaugv Simon Martineau added a comment -

          Raising the priority as for now my Jenkins instance is completely unusable (see previous comment). 

          Show
          simonmartineaugv Simon Martineau added a comment - Raising the priority as for now my Jenkins instance is completely unusable (see previous comment). 
          Hide
          simonmartineaugv Simon Martineau added a comment -

          I finally understood the workaround described by Craig Tataryn. I will add details for noobs like me who would need a more detailed explanation.

          1- Go to your jenkins instance with google chrome

          2- Open chrome javascript console (Ctrl + Shift + J)

          3- Type "removeLog()", [ENTER]

          It should remove all logs.

          Lowering priority to minor as there is a documented workaround.

          Show
          simonmartineaugv Simon Martineau added a comment - I finally understood the workaround described by Craig Tataryn . I will add details for noobs like me who would need a more detailed explanation. 1- Go to your jenkins instance with google chrome 2- Open chrome javascript console (Ctrl + Shift + J) 3- Type "removeLog()", [ENTER] It should remove all logs. Lowering priority to minor as there is a documented workaround.
          Hide
          vtraida Vadym Traida added a comment -

          Craig Tataryn

          +1 

          thank you! 

          Show
          vtraida Vadym Traida added a comment - Craig Tataryn +1  thank you! 
          Hide
          ericthieme Eric Thieme added a comment -

          Hi Craig Rodrigues, do you have any further information why this issue is a won't fix? Is it a duplicate or not a bug in the plugin itself?

          Show
          ericthieme Eric Thieme added a comment - Hi Craig Rodrigues , do you have any further information why this issue is a won't fix? Is it a duplicate or not a bug in the plugin itself?
          Hide
          timmyson Tim Foster added a comment -

          Craig Rodrigues why is this a Won't Fix? There are half a dozen complaints here about this, and there are other users in my organization that are experiencing this.

          Show
          timmyson Tim Foster added a comment - Craig Rodrigues why is this a Won't Fix? There are half a dozen complaints here about this, and there are other users in my organization that are experiencing this.
          Hide
          iamrewt Ryan Taylor added a comment -

          I am encountering this issue as well.

          This should be reopened. Users should not be required to open their console to be able to view the page correctly.

          Show
          iamrewt Ryan Taylor added a comment - I am encountering this issue as well. This should be reopened. Users should not be required to open their console to be able to view the page correctly.
          Hide
          dpmarley David Marley added a comment -

          I echo previous commenters here. The fact that there is an (awkward) workaround involving typing into the browser console doesn't seem like a sound basis for closing issue as "Won't fix".

          Show
          dpmarley David Marley added a comment - I echo previous commenters here. The fact that there is an (awkward) workaround involving typing into the browser console doesn't seem like a sound basis for closing issue as "Won't fix".
          Hide
          vtraida Vadym Traida added a comment - - edited

          reproduced again , please fix it.

           

          Show
          vtraida Vadym Traida added a comment - - edited reproduced again , please fix it.  
          Hide
          iamrewt Ryan Taylor added a comment -

          Commenting again in hopes of gaining some traction on this issue. While the application doesn't break, nearly anytime I navigate to Jenkins I need to manually clear the logs. The frequency of this issue makes it cumbersome to work in Jenkins.

           

          Show
          iamrewt Ryan Taylor added a comment - Commenting again in hopes of gaining some traction on this issue. While the application doesn't break, nearly anytime I navigate to Jenkins I need to manually clear the logs. The frequency of this issue makes it cumbersome to work in Jenkins.  
          Hide
          timmyson Tim Foster added a comment -

          Hear, hear. I just deployed a new machine and it's still supremely annoying.

          Show
          timmyson Tim Foster added a comment - Hear, hear. I just deployed a new machine and it's still supremely annoying.
          Hide
          dpmarley David Marley added a comment -

          Checking in again - any action on this issue? 6+ months of having to enter 'removeLog();' in the console just to make Jenkins UI usable is starting to get pretty old. If no action yet, any chance of it getting some attention soon given that this is a user-facing UI issue?

          Show
          dpmarley David Marley added a comment - Checking in again - any action on this issue? 6+ months of having to enter 'removeLog();' in the console just to make Jenkins UI usable is starting to get pretty old. If no action yet, any chance of it getting some attention soon given that this is a user-facing UI issue?
          Show
          gbburkhardt Glenn Burkhardt added a comment - Also reported here:  https://github.com/jenkinsci/scm-sync-configuration-plugin/issues/68

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            timmyson Tim Foster
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated: