Java – Android – error connecting using login URI

I'm trying to connect Google spreadsheets in my code It worked for some time, but recently it stopped working

06-01 17:04:56.108: W/System.err(1290): com.google.gdata.util.AuthenticationException: Error connecting with login URI
06-01 17:04:56.118: W/System.err(1290):     at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:549)
06-01 17:04:56.118: W/System.err(1290):     at com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:397)
06-01 17:04:56.118: W/System.err(1290):     at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:364)
06-01 17:04:56.118: W/System.err(1290):     at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:319)
06-01 17:04:56.118: W/System.err(1290):     at com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:303)
06-01 17:04:56.118: W/System.err(1290):     at googleDriveConnection.MySpreadsheetIntegration.<init>(MySpreadsheetIntegration.java:59)
06-01 17:04:56.118: W/System.err(1290):     at googleDriveConnection.MySpreadsheetIntegration.Instance(MySpreadsheetIntegration.java:45)
06-01 17:04:56.118: W/System.err(1290):     at smsManaging.SmsSendRunnable.run(SmsSendRunnable.java:60)
06-01 17:04:56.118: W/System.err(1290):     at java.lang.Thread.run(Thread.java:1019)
06-01 17:04:56.118: W/System.err(1290): Caused by: javax.net.ssl.SSLHandshakeException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Sun Jun 01 17:04:56 GMT+00:00 2014,validation time: Wed Jun 04 08:58:29 GMT+00:00 2014
06-01 17:04:56.118: W/System.err(1290):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:477)
06-01 17:04:56.118: W/System.err(1290):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:328)
06-01 17:04:56.118: W/System.err(1290):     at org.apache.harmony.luni.internal.net.www.protocol.http.httpconnection.setupSecureSocket(httpconnection.java:185)
06-01 17:04:56.118: W/System.err(1290):     at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:433)
06-01 17:04:56.118: W/System.err(1290):     at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl$HttpsEngine.makeConnection(HttpsURLConnectionImpl.java:378)
06-01 17:04:56.118: W/System.err(1290):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:205)
06-01 17:04:56.118: W/System.err(1290):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:614)
06-01 17:04:56.118: W/System.err(1290):     at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:268)
06-01 17:04:56.128: W/System.err(1290):     at com.google.gdata.client.GoogleAuthTokenFactory.makePostRequest(GoogleAuthTokenFactory.java:611)
06-01 17:04:56.128: W/System.err(1290):     at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:547)
06-01 17:04:56.128: W/System.err(1290):     ... 8 more
06-01 17:04:56.128: W/System.err(1290): Caused by: java.security.cert.CertificateException: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Sun Jun 01 17:04:56 GMT+00:00 2014,validation time: Wed Jun 04 08:58:29 GMT+00:00 2014
06-01 17:04:56.128: W/System.err(1290):     at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:161)
06-01 17:04:56.128: W/System.err(1290):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:664)
06-01 17:04:56.128: W/System.err(1290):     at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
06-01 17:04:56.128: W/System.err(1290):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:474)
06-01 17:04:56.128: W/System.err(1290):     ... 17 more
06-01 17:04:56.128: W/System.err(1290): Caused by: org.bouncycastle.jce.exception.ExtCertPathValidatorException: Could not validate certificate: current time: Sun Jun 01 17:04:56 GMT+00:00 2014,validation time: Wed Jun 04 08:58:29 GMT+00:00 2014
06-01 17:04:56.138: W/System.err(1290):     at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1521)
06-01 17:04:56.138: W/System.err(1290):     at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:399)
06-01 17:04:56.138: W/System.err(1290):     at java.security.cert.CertPathValidator.validate(CertPathValidator.java:197)
06-01 17:04:56.138: W/System.err(1290):     at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:156)
06-01 17:04:56.138: W/System.err(1290):     ... 20 more
06-01 17:04:56.138: W/System.err(1290): Caused by: java.security.cert.CertificateNotYetValidException: current time: Sun Jun 01 17:04:56 GMT+00:00 2014,validation time: Wed Jun 04 08:58:29 GMT+00:00 2014
06-01 17:04:56.138: W/System.err(1290):     at org.apache.harmony.security.provider.cert.X509CertImpl.checkValidity(X509CertImpl.java:163)
06-01 17:04:56.138: W/System.err(1290):     at org.apache.harmony.security.provider.cert.X509CertImpl.checkValidity(X509CertImpl.java:157)
06-01 17:04:56.138: W/System.err(1290):     at org.bouncycastle.jce.provider.RFC3280CertPathUtilities.processCertA(RFC3280CertPathUtilities.java:1512)
06-01 17:04:56.138: W/System.err(1290):     ... 23 more

I searched all this forum and found that similar things didn't help me - com google. gdata. util. AuthenticationException: Error connecting with login URI

thank you! Bear

Solution

Set your system (phone / simulator) date and time to the current date and time. The authentication cannot be verified because the date and time do not match

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>