org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials

Jenkins JIRA | Dmytro Pohromskyy | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    First of all thank you for the excellent plugin and your hard work. Unfortunately I'm started to receive the following error, I have tried to upload a newer key from the Google, but no luck. Upload failed: org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials at org.jenkinsci.plugins.googleplayandroidpublisher.CredentialsHandler.getServiceAccountCredentials(CredentialsHandler.java:60) at org.jenkinsci.plugins.googleplayandroidpublisher.ApkPublisher.perform(ApkPublisher.java:301) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials at com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials.<init>(RemotableGoogleCredentials.java:70) at com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials.forRemote(GoogleRobotCredentials.java:204) at org.jenkinsci.plugins.googleplayandroidpublisher.CredentialsHandler.getServiceAccountCredentials(CredentialsHandler.java:36) ... 10 more Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant", "error_description" : "Invalid JWT: Token must be a short-lived token and in a reasonable timeframe" } at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105) at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287) at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307) at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:269) at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489) at com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials.<init>(RemotableGoogleCredentials.java:64) ... 12 more

    Jenkins JIRA | 1 year ago | Dmytro Pohromskyy
    org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials
  2. 0

    First of all thank you for the excellent plugin and your hard work. Unfortunately I'm started to receive the following error, I have tried to upload a newer key from the Google, but no luck. Upload failed: org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials at org.jenkinsci.plugins.googleplayandroidpublisher.CredentialsHandler.getServiceAccountCredentials(CredentialsHandler.java:60) at org.jenkinsci.plugins.googleplayandroidpublisher.ApkPublisher.perform(ApkPublisher.java:301) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Caused by: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials at com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials.<init>(RemotableGoogleCredentials.java:70) at com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials.forRemote(GoogleRobotCredentials.java:204) at org.jenkinsci.plugins.googleplayandroidpublisher.CredentialsHandler.getServiceAccountCredentials(CredentialsHandler.java:36) ... 10 more Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant", "error_description" : "Invalid JWT: Token must be a short-lived token and in a reasonable timeframe" } at com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105) at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287) at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307) at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:269) at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489) at com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials.<init>(RemotableGoogleCredentials.java:64) ... 12 more

    Jenkins JIRA | 1 year ago | Dmytro Pohromskyy
    org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials
  3. 0

    Google Play Android Publisher Plugin - Jenkins - Jenkins Wiki

    jenkins-ci.org | 10 months ago
    org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How to get started with OAuth2 for Google Contacts API

    Stack Overflow | 2 years ago | Yogesh Seralia
    com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request { "error" : "invalid_grant" }
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.google.api.client.auth.oauth2.TokenResponseException

    400 Bad Request { "error" : "invalid_grant", "error_description" : "Invalid JWT: Token must be a short-lived token and in a reasonable timeframe" }

    at com.google.api.client.auth.oauth2.TokenResponseException.from()
  2. Google OAuth Client Library for Java
    TokenRequest.execute
    1. com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
    2. com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
    3. com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
    3 frames
  3. Google APIs Client Library for Java
    GoogleCredential.executeRefreshToken
    1. com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:269)
    1 frame
  4. Google OAuth Client Library for Java
    Credential.refreshToken
    1. com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
    1 frame
  5. com.google.jenkins
    GoogleRobotCredentials.forRemote
    1. com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials.<init>(RemotableGoogleCredentials.java:64)
    2. com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials.forRemote(GoogleRobotCredentials.java:204)
    2 frames
  6. org.jenkinsci.plugins
    ApkPublisher.perform
    1. org.jenkinsci.plugins.googleplayandroidpublisher.CredentialsHandler.getServiceAccountCredentials(CredentialsHandler.java:36)
    2. org.jenkinsci.plugins.googleplayandroidpublisher.ApkPublisher.perform(ApkPublisher.java:301)
    2 frames
  7. Hudson
    Executor.run
    1. hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
    2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:785)
    3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
    4. hudson.model.Build$BuildExecution.post2(Build.java:185)
    5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    6. hudson.model.Run.execute(Run.java:1766)
    7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    8. hudson.model.ResourceController.execute(ResourceController.java:98)
    9. hudson.model.Executor.run(Executor.java:410)
    9 frames