• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • image-gallery-plugin
    • MacOS 10.10.5
      Jenkins 1.634
      image gallery plugin 1.2

      Our configuration uses this plugin on archived artifacts. In the configuration, we don't define an image width.

      In latest build, the images are displayed correctly (full size).
      In previous builds, the images are not visible; inspecting the page source code shows that image width is set to "0".

      <h2>Screenshots</h2>
      <a href="artifact/reports/iPad/Test_AddFavoriteContact/20151030_161534.368//Screen_Error.jpeg" title="reports/iPad/Test_AddFavoriteContact/20151030_161534.368//Screen_Error.jpeg" class="gallery"><img src="artifact/reports/iPad/Test_AddFavoriteContact/20151030_161534.368//Screen_Error.jpeg" width="0" title="Image 0" /></a>
      

      Changing the size in the source code (using Chrome inspector, for example) brings back the images.

        1. imageWidth.patch
          0.9 kB
        2. no_work.jpg
          no_work.jpg
          233 kB
        3. works.jpg
          works.jpg
          278 kB

          [JENKINS-31364] Image width is set to "0" in previous builds

          fdubuisson: I think previous builds (that occurred when version 1.2 was installed) will still have this problem.

          But I just tested it now with v1.3, and multiple builds of my image gallery job now all show the correct width.

          Christopher Orr added a comment - fdubuisson : I think previous builds (that occurred when version 1.2 was installed) will still have this problem. But I just tested it now with v1.3, and multiple builds of my image gallery job now all show the correct width.

          orrc The v1.3 is installed since last week and we got many builds in the meantime, all with the issue.
          It looks like there is something wrong with our environment but I've no idea of what it is.

          Frédéric Dubuisson added a comment - orrc The v1.3 is installed since last week and we got many builds in the meantime, all with the issue. It looks like there is something wrong with our environment but I've no idea of what it is.

          I finally found the source issue. There is still one place in the code that does not handle correctly the "imageWidth/imageWidthText" transition.
          With the attached patch, the issue is no more present, even in old builds.

          Frédéric Dubuisson added a comment - I finally found the source issue. There is still one place in the code that does not handle correctly the "imageWidth/imageWidthText" transition. With the attached patch, the issue is no more present, even in old builds.

          Hi fdubuisson, patch applied in https://github.com/biouno/image-gallery-plugin/commit/d17880bb9a308d7818687c82134b9ceed9f37155 (forgot to use JENKINS-31364 in the commit message, sorry).

          Feel free to review the commit. Will close the ticket when releasing 1.4 (next weeks).

          Thank you for the patch.
          Bruno

          Bruno P. Kinoshita added a comment - Hi fdubuisson , patch applied in https://github.com/biouno/image-gallery-plugin/commit/d17880bb9a308d7818687c82134b9ceed9f37155 (forgot to use JENKINS-31364 in the commit message, sorry). Feel free to review the commit. Will close the ticket when releasing 1.4 (next weeks). Thank you for the patch. Bruno

          Alex Gray added a comment -

          I'm using 1.4 and I am getting bit by this too. It seems it's hit or miss. Sometimes the width shows 0, sometimes it shows 400 (which is the width that I have it set to). I can't really tell the difference on when it works and when it doesn't. The console output is the same, and there are no logs in Jenkins to indicate anything went wrong.

          Alex Gray added a comment - I'm using 1.4 and I am getting bit by this too. It seems it's hit or miss. Sometimes the width shows 0, sometimes it shows 400 (which is the width that I have it set to). I can't really tell the difference on when it works and when it doesn't. The console output is the same, and there are no logs in Jenkins to indicate anything went wrong.

          Hi Alex,

          Are you able to consistently reproduce the issue? I have some spare time in this development cycle, and in case there is a simple way to test and reproduce it, I can include this issue and give it a try

          Cheers
          Bruno

          Bruno P. Kinoshita added a comment - Hi Alex, Are you able to consistently reproduce the issue? I have some spare time in this development cycle, and in case there is a simple way to test and reproduce it, I can include this issue and give it a try Cheers Bruno

          Alex Gray added a comment -

          Thanks!!! I will try to reproduce it this morning and hopefully it IS reproducible! If so, I'll attach the image files and job config.xml

          Alex Gray added a comment - Thanks!!! I will try to reproduce it this morning and hopefully it IS reproducible! If so, I'll attach the image files and job config.xml

          Alex Gray added a comment -

          Dang. I've been trying all morning to reproduce and no luck. I'm using the EXACT same images in 2 jobs: one works, one doesn't.
          The only difference is that the one that does NOT work has extra "things" on that page, like unit test results, code coverage, etc. etc.

          I'm attaching a screenshot of what I mean. I'll try to create a dummy job that has those dummy widgets too...

          Alex Gray added a comment - Dang. I've been trying all morning to reproduce and no luck. I'm using the EXACT same images in 2 jobs: one works, one doesn't. The only difference is that the one that does NOT work has extra "things" on that page, like unit test results, code coverage, etc. etc. I'm attaching a screenshot of what I mean. I'll try to create a dummy job that has those dummy widgets too...

          Hi Alex,

          I know how you feel. I am working on Image Gallery and Active Choices, before jumping to TAP plug-in before x-mas. For Active Choices I have spent a fair amount of the last days just trying to reproduce issues with no luck. That's why I first asked here if you could reproduce it

          But I think I know what could be happening.

          I bet you have a job that was created with an older version of the plug-in. Then we fixed the issue, and are probably not properly handling backward compatibility, and Java serialization.

          If you really want to reproduce it now, you would need to start a blank Jenkins with an older version of the plug-in (one before the bug was fixed), run the job at least once to have the gallery configuration persisted on disk. Then finally you just update the plug-in, re-run the job, and you should see the bug.

          Bruno P. Kinoshita added a comment - Hi Alex, I know how you feel. I am working on Image Gallery and Active Choices, before jumping to TAP plug-in before x-mas. For Active Choices I have spent a fair amount of the last days just trying to reproduce issues with no luck. That's why I first asked here if you could reproduce it But I think I know what could be happening. I bet you have a job that was created with an older version of the plug-in. Then we fixed the issue, and are probably not properly handling backward compatibility, and Java serialization. If you really want to reproduce it now, you would need to start a blank Jenkins with an older version of the plug-in (one before the bug was fixed), run the job at least once to have the gallery configuration persisted on disk. Then finally you just update the plug-in, re-run the job, and you should see the bug.

          This bug still seems to be an issue in Jenkins 2.89.2 with plugin 1.4

          Steffen Breitbach added a comment - This bug still seems to be an issue in Jenkins 2.89.2 with plugin 1.4

            kinow Bruno P. Kinoshita
            fdubuisson Frédéric Dubuisson
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: