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

Getting NullPointerException error when using Sauce OnDemand plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I installed the Sauce OnDemand plugin on Jenkins and setup SauceConnect in my Jenkins job for my Maven project. However, I am getting the following error on building the job

      Starting pre-build for Sauce Labs plugin

      ERROR: Processing failed due to a bug in the code. Please report this to jenkinsci-users@googlegroups.com
      java.lang.NullPointerException

      at hudson.plugins.sauce_ondemand.SauceOnDemandBuildWrapper.setUp(SauceOnDemandBuildWrapper.java:319)

      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:655)

      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)

      at hudson.model.Run.execute(Run.java:1738)

      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)

      at hudson.model.ResourceController.execute(ResourceController.java:98)

      at hudson.model.Executor.run(Executor.java:410)

        Attachments

          Activity

          Hide
          halkeye Gavin Mogan added a comment -

          I'll take a look as soon as online
          This is very odd though nothing near that code has changed recently

          What version of the plugin are you using?

          Show
          halkeye Gavin Mogan added a comment - I'll take a look as soon as online This is very odd though nothing near that code has changed recently What version of the plugin are you using?
          Hide
          halkeye Gavin Mogan added a comment -

          Ashish Sinha it looks like that line of code is about credentials

          When you setup your build, do you have credentials selected for sauce labs?

          I'll try to get it fixed so it does a better error message for this case, but for now I don't think its a blocker.

          Show
          halkeye Gavin Mogan added a comment - Ashish Sinha it looks like that line of code is about credentials When you setup your build, do you have credentials selected for sauce labs? I'll try to get it fixed so it does a better error message for this case, but for now I don't think its a blocker.
          Hide
          asinha31 Ashish Sinha added a comment -

          Thanks for the update.
          My Jenkins version is 2.1
          I was trying to setup the credentials but unable to do so because I couldn't find 'Sauce Labs' under Kind dropdown in Administration ->Credentials.

          I following the below steps for setting up Credentials:
          After the plugin has installed and Jenkins has restarted, go to the Administration page in Jenkins. Click Credentials. You can click an existing domain or click Add domain.
          Once in your domain of choice, click Add Credentials.
          Under Kind, select Sauce Labs.
          Enter the Username and API Access Key for your Sauce account.
          Click OK to save.

          Could you please help me resolve this, thanks.

          Show
          asinha31 Ashish Sinha added a comment - Thanks for the update. My Jenkins version is 2.1 I was trying to setup the credentials but unable to do so because I couldn't find 'Sauce Labs' under Kind dropdown in Administration ->Credentials. I following the below steps for setting up Credentials: After the plugin has installed and Jenkins has restarted, go to the Administration page in Jenkins. Click Credentials. You can click an existing domain or click Add domain. Once in your domain of choice, click Add Credentials. Under Kind, select Sauce Labs. Enter the Username and API Access Key for your Sauce account. Click OK to save. Could you please help me resolve this, thanks.
          Hide
          halkeye Gavin Mogan added a comment -

          Do you have that same UI?

          Is this a brand new install of the plugin from the update center? sauce on demand plugin 1.157 just came out

          Show
          halkeye Gavin Mogan added a comment - Do you have that same UI? Is this a brand new install of the plugin from the update center? sauce on demand plugin 1.157 just came out
          Hide
          asinha31 Ashish Sinha added a comment -

          Yes, I installed it today only and it is 1.157 version. I also got the Jenkins Server restarted just to make sure the plugin gets fully functional if required but still not able to see the 'Sauce Labs' option in Kind dropdown Credentials.

          Show
          asinha31 Ashish Sinha added a comment - Yes, I installed it today only and it is 1.157 version. I also got the Jenkins Server restarted just to make sure the plugin gets fully functional if required but still not able to see the 'Sauce Labs' option in Kind dropdown Credentials.
          Hide
          halkeye Gavin Mogan added a comment -

          This is really odd to me.

          This is what my global credentials looks like

          Do you at least have the username/password one? Maybe we are looking at different screens?

          Show
          halkeye Gavin Mogan added a comment - This is really odd to me. This is what my global credentials looks like Do you at least have the username/password one? Maybe we are looking at different screens?
          Hide
          prapullab Prapulla Bommareddy added a comment -

          hi

          I am from Ashish's team. We are able to resolve this by updating Jenkins setting. We configured Jenkins to use only selected credential providers. So sauce labs was not available by default. Once this was updated from "Configure Credentials", issue got resolved.

          Thanks for your support Gavin.

          Show
          prapullab Prapulla Bommareddy added a comment - hi I am from Ashish's team. We are able to resolve this by updating Jenkins setting. We configured Jenkins to use only selected credential providers. So sauce labs was not available by default. Once this was updated from "Configure Credentials", issue got resolved. Thanks for your support Gavin.
          Hide
          halkeye Gavin Mogan added a comment -

          Prapulla Bommareddy Ashish Sinha

          Awesome. I'm glad its fixed.

          I don't think this is something we need to update on our side. I didn't know there was even support for whitelisting credentials type so I don't think its something we need to document.

          I'm going to close this. Lemme know if you need something changed.

          Show
          halkeye Gavin Mogan added a comment - Prapulla Bommareddy Ashish Sinha Awesome. I'm glad its fixed. I don't think this is something we need to update on our side. I didn't know there was even support for whitelisting credentials type so I don't think its something we need to document. I'm going to close this. Lemme know if you need something changed.

            People

            Assignee:
            halkeye Gavin Mogan
            Reporter:
            asinha31 Ashish Sinha
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: