0

I got the following error in my logcat while trying to authenticate my android application with Twitter

Besides the username and password are correct for twitter, the message box shows error as'We are unable to log you into Twitter. Please try again later.'

10-24 12:28:24.433: INFO/TwitterService#showProgressDialog(3167): Activity Class Name: com.ap.ui.ArticleActivity
10-24 12:28:25.089: ERROR/TwitterService#login(3167): Error obtaining access token for Twitter.
10-24 12:28:25.089: ERROR/TwitterService#login(3167): TwitterException{exceptionCode=[e07c50ee-0000d883 1ac06e3f-626a12a6 1ac06e3f-626a127b 1ac06e3f-626a127b 1ac06e3f-626a127b], statusCode=-1, retryAfter=0, rateLimitStatus=null, version=2.1.4-SNAPSHOT(build: d2ffce58eec309979a5286d29990e468b0e04942)}
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at twitter4j.http.OAuthAuthorization.getOAuthAccessToken(OAuthAuthorization.java:185)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at twitter4j.TwitterOAuthSupportBaseImpl.getOAuthAccessToken(TwitterOAuthSupportBaseImpl.java:108)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at twitter4j.Twitter.getOAuthAccessToken(Twitter.java:54)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at com.ap.service.social.TwitterService.login(TwitterService.java:51)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at com.ap.widgets.twitter.TwitterAccountDialog$LoginRunnable.run(TwitterAccountDialog.java:156)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at java.lang.Thread.run(Thread.java:1096)
10-24 12:28:25.089: ERROR/TwitterService#login(3167): Caused by: TwitterException{exceptionCode=[1ac06e3f-626a12a6 1ac06e3f-626a127b 1ac06e3f-626a127b 1ac06e3f-626a127b], statusCode=-1, retryAfter=0, rateLimitStatus=null, version=2.1.4-SNAPSHOT(build: d2ffce58eec309979a5286d29990e468b0e04942)}
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:323)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:72)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at twitter4j.internal.http.HttpClientWrapper.post(HttpClientWrapper.java:103)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at twitter4j.http.OAuthAuthorization.getOAuthAccessToken(OAuthAuthorization.java:178)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     ... 5 more
10-24 12:28:25.089: ERROR/TwitterService#login(3167): Caused by: javax.net.ssl.SSLException: Not trusted server certificate
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:360)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.getSecureSocket(HttpConnection.java:168)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection$HttpsEngine.connect(HttpsURLConnection.java:398)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.sendRequest(HttpURLConnection.java:1224)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doRequestInternal(HttpURLConnection.java:1558)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.doRequest(HttpURLConnection.java:1551)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1145)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.luni.internal.net.www.protocol.https.HttpsURLConnection.getOutputStream(HttpsURLConnection.java:262)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:280)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     ... 8 more
10-24 12:28:25.089: ERROR/TwitterService#login(3167): Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:168)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:355)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     ... 16 more
10-24 12:28:25.089: ERROR/TwitterService#login(3167): Caused by: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found.
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.bouncycastle.jce.provider.PKIXCertPathValidatorSpi.engineValidate(PKIXCertPathValidatorSpi.java:149)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at java.security.cert.CertPathValidator.validate(CertPathValidator.java:211)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:164)
10-24 12:28:25.089: ERROR/TwitterService#login(3167):     ... 17 more

2 Answers2

0

Make sure the device's time / date is set correctly.

FunkTheMonk
  • 10,908
  • 1
  • 31
  • 37
0

No this problem is not related to date and time plz check here Self-signed SSL acceptance on Android

Twitter is not allowed on your network(It may be restricted). Switch your network b/w wifi or edge .

Community
  • 1
  • 1
Atul Bhardwaj
  • 6,647
  • 5
  • 45
  • 63