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

NullPointerException in Android Signing Plugin when accessing credentials

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • android-signing-plugin
    • None
    • Windows 10 1803
      Jenkins 2.121.1
      Android Signing Plugin 2.2.5
      Credentials Plugin 2.1.17

      We followed the instructions on the github page and created certificate credentials that use a PKCS12 certificate and selected them in the plugin. The certificate was converted from a normal keystore file create by Visual Studio. Using the certicate manually works fine.

      The plugin thrown a NullPointerException when accessing the credentials:

      09:01:56 java.lang.NullPointerException
      09:01:56 	at org.jenkinsci.plugins.androidsigning.SigningComponents.fromCredentials(SigningComponents.java:22)
      09:01:56 	at org.jenkinsci.plugins.androidsigning.SignApksBuilder.perform(SignApksBuilder.java:294)
      09:01:56 	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      09:01:56 	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      09:01:56 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      09:01:56 	at hudson.model.Build$BuildExecution.build(Build.java:206)
      09:01:56 	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
      09:01:56 	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
      09:01:56 	at hudson.model.Run.execute(Run.java:1794)
      09:01:56 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      09:01:56 	at hudson.model.ResourceController.execute(ResourceController.java:97)
      09:01:56 	at hudson.model.Executor.run(Executor.java:429)
      

      We have looked at the code and it looks like the problem is in SignApksBuilder.getKeystore. The method does not find any credentials and returns null which causes the exception in the next step.

            restjohn Robert St. John
            x3ntrix Artur Lipinski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: