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

browserInstance null causes an NPE in Sauce On Demand plugin 1.154

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: sauce-ondemand-plugin
    • Labels:
    • Environment:
      Jenkins 2.9 running on Red Hat Enterprise Linux Server release 6.7 (Santiago)
    • Similar Issues:

      Description

      Sauce on Demand plugin version 1.154
      Jenkins 2.9

      We intermittently see a “java.lang.NullPointerException” using Sauce On Demand when running a browser test using a Build Flow as trigger, which causes the tunnel creation to fail, so naturally the browser test never executes. We were never able to reproduce this error when triggering the browser test manually so we added some debug statement to src/main/java/hudson/plugins/sauce_ondemand/SauceEnvironmentUtil.java (https://github.com/imuchnik/sauce-ondemand-plugin) and waited for the problem to resurface. We examined the output log and noticed this:

      browserInstance null
      ERROR outputting environment variable
      java.lang.NullPointerException

      It appears that in some circumstances browserInstance is null, an NPE is thrown and Sauce On Demand fails to create a tunnel and the Jenkins job subsequently fails.

      We have the environmental variables output inside a try/catch block starting here (https://github.com/imuchnik/sauce-ondemand-plugin/blob/30dd383db64398f5980f6f37689bfd0d6ba08cca/src/main/java/hudson/plugins/sauce_ondemand/SauceEnvironmentUtil.java#L67) and we allow the job to continue even though browserInstance is null, as it appears that if we catch and swallow the NPE the browser test executes without problem from that point forward.

        Attachments

          Activity

          Hide
          halkeye Gavin Mogan added a comment -

          Hi Orlando Soto

          Thanks for the great bug report. I'm going to try and get this prioritized before the next release.

          How critical is it for you. Can you wait a couple weeks for the next release?

          Show
          halkeye Gavin Mogan added a comment - Hi Orlando Soto Thanks for the great bug report. I'm going to try and get this prioritized before the next release. How critical is it for you. Can you wait a couple weeks for the next release?
          Hide
          orlandosoto Orlando Soto added a comment -

          Thanks Gavin Mogan! yes, we can wait a couple weeks for the next release

          Show
          orlandosoto Orlando Soto added a comment - Thanks Gavin Mogan ! yes, we can wait a couple weeks for the next release
          Hide
          halkeye Gavin Mogan added a comment -

          Hey Orlando Soto

          I just merged a bunch of code to the main jenkins plugin repo
          I think your stuff got fixed by the bug fixes i've been working on.

          Do you want to try the latest build? https://jenkins.ci.cloudbees.com/job/plugins/job/sauce-ondemand-plugin/340/org.jenkins-ci.plugins$sauce-ondemand/

          Unless any bugs is found, we should be doing a release sometime next week.

          Show
          halkeye Gavin Mogan added a comment - Hey Orlando Soto I just merged a bunch of code to the main jenkins plugin repo I think your stuff got fixed by the bug fixes i've been working on. Do you want to try the latest build? https://jenkins.ci.cloudbees.com/job/plugins/job/sauce-ondemand-plugin/340/org.jenkins-ci.plugins$sauce-ondemand/ Unless any bugs is found, we should be doing a release sometime next week.
          Hide
          orlandosoto Orlando Soto added a comment -

          thanks Gavin Mogan we have uploaded the latest build and will continue to monitor our logs and report back

          Show
          orlandosoto Orlando Soto added a comment - thanks Gavin Mogan we have uploaded the latest build and will continue to monitor our logs and report back

            People

            Assignee:
            halkeye Gavin Mogan
            Reporter:
            orlandosoto Orlando Soto
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: