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

"Credentials for the configured Google Account could not be found" when registering only one Google Play credential

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      After creating a Google Play credentials as explained in the Wiki for this plugin, and configuring the job where I see the credential pop-up listing my only user.
      But when the job executes, I get this error:

      15:05:12 Upload failed: org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: Credentials for the configured Google Account could not be found
      15:05:12 	at org.jenkinsci.plugins.googleplayandroidpublisher.GooglePlayPublisher.getServiceAccountCredentials(GooglePlayPublisher.java:39)
      15:05:12 	at org.jenkinsci.plugins.googleplayandroidpublisher.ApkPublisher.perform(ApkPublisher.java:301)
      15:05:12 	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      15:05:12 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
      15:05:12 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      15:05:12 	at hudson.model.Build$BuildExecution.post2(Build.java:182)
      15:05:12 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
      15:05:12 	at hudson.model.Run.execute(Run.java:1731)
      15:05:12 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      15:05:12 	at hudson.model.ResourceController.execute(ResourceController.java:88)
      15:05:12 	at hudson.model.Executor.run(Executor.java:232)
      

      Looking at the config.xml for this job shows that there is no "googleCredentialsId" field (which explains the stacktrace above).

      After I added a second credential, the build worked correctly, and the config.xml was correct.

      Steps to reproduce:

      1. Start with no google play account credentials stored
      2. Create one, upload the p12 file
      3. Setup a new job, the credential pop-up lists the only user
      4. Run the build

        Attachments

          Activity

          Hide
          orrc Christopher Orr added a comment -

          The scenario as described shouldn't be possible, and I can only reproduce this if I create a job before any credentials have been created.

          Adding more credentials to Jenkins won't cause the "googleCredentialsId" to be set in any job, unless the job configuration page is opened, and then the Save button is clicked.

          But it's a known issue that the error messages relating to credentials can be improved, and the plugin should also be able to handle renaming of credentials, as currently renaming credentials after a job has been configured causes the above stacktrace.

          Show
          orrc Christopher Orr added a comment - The scenario as described shouldn't be possible, and I can only reproduce this if I create a job before any credentials have been created. Adding more credentials to Jenkins won't cause the "googleCredentialsId" to be set in any job, unless the job configuration page is opened, and then the Save button is clicked. But it's a known issue that the error messages relating to credentials can be improved, and the plugin should also be able to handle renaming of credentials, as currently renaming credentials after a job has been configured causes the above stacktrace.
          Hide
          wearbif wearbif added a comment - - edited

          I have the same issue.

          Upload failed: org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: Credentials for the configured Google Account could not be found
          at org.jenkinsci.plugins.googleplayandroidpublisher.GooglePlayPublisher.getServiceAccountCredentials(GooglePlayPublisher.java:39)
          at org.jenkinsci.plugins.googleplayandroidpublisher.ApkPublisher.perform(ApkPublisher.java:301)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner$DontRun.conditionalRun(BuildStepRunner.java:264)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
          at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:183)
          at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:116)
          at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
          at hudson.model.Build$BuildExecution.post2(Build.java:183)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725)
          at hudson.model.Run.execute(Run.java:1709)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:231)

          • No changes have been applied to the Google Play account
          Show
          wearbif wearbif added a comment - - edited I have the same issue. Upload failed: org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: Credentials for the configured Google Account could not be found at org.jenkinsci.plugins.googleplayandroidpublisher.GooglePlayPublisher.getServiceAccountCredentials(GooglePlayPublisher.java:39) at org.jenkinsci.plugins.googleplayandroidpublisher.ApkPublisher.perform(ApkPublisher.java:301) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110) at org.jenkins_ci.plugins.run_condition.BuildStepRunner$DontRun.conditionalRun(BuildStepRunner.java:264) at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105) at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:183) at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:116) at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:725) at hudson.model.Run.execute(Run.java:1709) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) No changes have been applied to the Google Play account
          Hide
          orrc Christopher Orr added a comment -

          wearbif: Could you possibly post the contents of your $JENKINS_HOME/credentials.xml file, and the config.xml for the job where you see this failure (available via $JENKINS_URL/job/$JOB_NAME/config.xml)?

          Show
          orrc Christopher Orr added a comment - wearbif : Could you possibly post the contents of your $JENKINS_HOME/credentials.xml file, and the config.xml for the job where you see this failure (available via $JENKINS_URL/job/$JOB_NAME/config.xml )?
          Hide
          andrewln Andrew Lin added a comment - - edited

          moved

          Show
          andrewln Andrew Lin added a comment - - edited moved
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/CredentialsHandler.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayBuilder.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayPublisher.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Util.java
          http://jenkins-ci.org/commit/google-play-android-publisher-plugin/c30a83de8cfc1540215571d8e50e06be8fdf68b2
          Log:
          JENKINS-25933 Improve errors when credentials are missing or misconfigured.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/CredentialsHandler.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayBuilder.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayPublisher.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Util.java http://jenkins-ci.org/commit/google-play-android-publisher-plugin/c30a83de8cfc1540215571d8e50e06be8fdf68b2 Log: JENKINS-25933 Improve errors when credentials are missing or misconfigured.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Christopher Orr
          Path:
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/CredentialsException.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/CredentialsHandler.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayBuilder.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayPublisher.java
          src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Util.java
          http://jenkins-ci.org/commit/google-play-android-publisher-plugin/d22f9a0002bfd8b8daf13814d9876efe3f7c4c7b
          Log:
          JENKINS-25933 Improve errors when credentials are missing or misconfigured.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christopher Orr Path: src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/ApkUploadTask.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/CredentialsException.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/CredentialsHandler.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayBuilder.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/GooglePlayPublisher.java src/main/java/org/jenkinsci/plugins/googleplayandroidpublisher/Util.java http://jenkins-ci.org/commit/google-play-android-publisher-plugin/d22f9a0002bfd8b8daf13814d9876efe3f7c4c7b Log: JENKINS-25933 Improve errors when credentials are missing or misconfigured.
          Hide
          orrc Christopher Orr added a comment -

          Version 1.4 of the plugin has now been released.

          Show
          orrc Christopher Orr added a comment - Version 1.4 of the plugin has now been released.

            People

            • Assignee:
              orrc Christopher Orr
              Reporter:
              masterzen Brice Figureau
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: