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

Error "Unable to retrieve an access token with the provided credentials"

XMLWordPrintable

      Get the following error:

      16:17:59 Upload failed: org.jenkinsci.plugins.googleplayandroidpublisher.UploadException: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials
      16:17:59 	at org.jenkinsci.plugins.googleplayandroidpublisher.CredentialsHandler.getServiceAccountCredentials(CredentialsHandler.java:42)
      16:17:59 	at org.jenkinsci.plugins.googleplayandroidpublisher.ApkPublisher.perform(ApkPublisher.java:302)
      16:17:59 	at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
      16:17:59 	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
      16:17:59 	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
      16:17:59 	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      16:17:59 	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
      16:17:59 	at hudson.model.Run.execute(Run.java:1784)
      16:17:59 	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      16:17:59 	at hudson.model.ResourceController.execute(ResourceController.java:89)
      16:17:59 	at hudson.model.Executor.run(Executor.java:240)
      16:17:59 Caused by: java.security.GeneralSecurityException: Unable to retrieve an access token with the provided credentials
      16:17:59 	at com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials.<init>(RemotableGoogleCredentials.java:70)
      16:17:59 	at com.google.jenkins.plugins.credentials.oauth.GoogleRobotCredentials.forRemote(GoogleRobotCredentials.java:204)
      16:17:59 	at org.jenkinsci.plugins.googleplayandroidpublisher.CredentialsHandler.getServiceAccountCredentials(CredentialsHandler.java:26)
      16:17:59 	... 10 more
      16:17:59 Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      16:17:59 	at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)
      16:17:59 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1731)
      16:17:59 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1692)
      16:17:59 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1675)
      16:17:59 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1204)
      16:17:59 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1181)
      16:17:59 	at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
      16:17:59 	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
      16:17:59 	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)
      16:17:59 	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
      16:17:59 	at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:77)
      16:17:59 	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:965)
      16:17:59 	at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:283)
      16:17:59 	at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
      16:17:59 	at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:269)
      16:17:59 	at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
      16:17:59 	at com.google.jenkins.plugins.credentials.oauth.RemotableGoogleCredentials.<init>(RemotableGoogleCredentials.java:64)
      16:17:59 	... 12 more
      16:17:59 Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      16:17:59 	at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:57)
      16:17:59 	at sun.security.validator.Validator.getInstance(Validator.java:161)
      16:17:59 	at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:108)
      16:17:59 	at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:204)
      16:17:59 	at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249)
      16:17:59 	at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185)
      16:17:59 	at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136)
      16:17:59 	at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
      16:17:59 	at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
      16:17:59 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:925)
      16:17:59 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1170)
      16:17:59 	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1197)
      16:17:59 	... 24 more
      16:17:59 Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
      16:17:59 	at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183)
      16:17:59 	at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:103)
      16:17:59 	at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:87)
      16:17:59 	at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:55)
      16:17:59 	... 35 more
      

            orrc Christopher Orr
            andrewln Andrew Lin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: