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

Improper Encoding of Sync Status

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • 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

    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

          timmyson Tim Foster created issue -
          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 <.

           

           

           

          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 <.      
          ctataryn Craig Tataryn added a comment - - edited

          timmyson 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()
          ctataryn Craig Tataryn added a comment - - edited timmyson 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()
          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.

          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.

          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.

           

          ctataryn: 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?

          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.   ctataryn : 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?

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

          simonmartineaugv Simon Martineau added a comment - Raising the priority as for now my Jenkins instance is completely unusable (see previous comment). 
          simonmartineaugv Simon Martineau made changes -
          Field Original Value New Value
          Priority Minor [ 4 ] Major [ 3 ]

          I finally understood the workaround described by ctataryn. 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.

          simonmartineaugv Simon Martineau added a comment - I finally understood the workaround described by ctataryn . 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.
          simonmartineaugv Simon Martineau made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          vtraida Vadym Traida added a comment -

          ctataryn

          +1 

          thank you! 

          vtraida Vadym Traida added a comment - ctataryn +1  thank you! 
          rodrigc Craig Rodrigues made changes -
          Assignee Craig Rodrigues [ rodrigc ]
          Resolution Won't Fix [ 2 ]
          Status Open [ 1 ] Closed [ 6 ]
          ericthieme Eric Thieme added a comment -

          Hi rodrigc, 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?

          ericthieme Eric Thieme added a comment - Hi rodrigc , 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?
          timmyson Tim Foster added a comment -

          rodrigc 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.

          timmyson Tim Foster added a comment - rodrigc 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.
          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.

          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.
          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".

          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".
          vtraida Vadym Traida added a comment - - edited

          reproduced again , please fix it.

           

          vtraida Vadym Traida added a comment - - edited reproduced again , please fix it.  
          vtraida Vadym Traida made changes -
          Resolution Won't Fix [ 2 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          vtraida Vadym Traida made changes -
          Comment [ Also reproduced again, please reopen and fix. ]
          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.

           

          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.  
          timmyson Tim Foster added a comment -

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

          timmyson Tim Foster added a comment - Hear, hear. I just deployed a new machine and it's still supremely annoying.
          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?

          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?
          gbburkhardt Glenn Burkhardt added a comment - Also reported here:  https://github.com/jenkinsci/scm-sync-configuration-plugin/issues/68

          People

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

            Dates

              Created:
              Updated: