Evernote authentication not working via evernote android sdk

117 views Asked by At


Im using evernote Android sdk in my android app to process the evernote operations.
Until today morning the authentication worked fine. Now the authentication is not working and the demo app (which is given by evernote) isn't working as well.


Here are the details:

Here is the sample source code used in my project:

mEvernoteSession = EvernoteSession.getInstance(this.context, CONSUMER_KEY, CONSUMER_SECRET, EvernoteSession.EvernoteService.SANDBOX, SUPPORT_APP_LINKED_NOTEBOOKS);

mEvernoteSession.authenticate(this);


In the code shown above this refers to the activity:


In the time of the authentication it goes to the evernote login page and after a succesful login it goes to the authorization page. Then it goes to my application.
In onActivityResult I'm getting the failure response


In onActivityResult I got the following request code as EvernoteSession.REQUEST_CODE_OAUTH

and the response code is not as Activity.RESULT_OK


I checked log cat .The following lines are shown:

06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): Failed to obtain OAuth access token
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): org.scribe.exceptions.OAuthConnectionException: There was a problem while creating a connection to the remote service.
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.scribe.model.Request.send(Request.java:66)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.scribe.model.OAuthRequest.send(OAuthRequest.java:12)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.scribe.oauth.OAuth10aServiceImpl.getAccessToken(OAuth10aServiceImpl.java:81)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at com.evernote.client.android.EvernoteOAuthActivity$CompleteAuthAsyncTask.doInBackground(EvernoteOAuthActivity.java:464)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at com.evernote.client.android.EvernoteOAuthActivity$CompleteAuthAsyncTask.doInBackground(EvernoteOAuthActivity.java:435)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at android.os.AsyncTask$2.call(AsyncTask.java:287)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at java.lang.Thread.run(Thread.java:841)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): Caused by: javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x61c6b140: Failure in SSL library, usually a protocol error
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x5bb5f57c:0x00000000)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:440)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at libcore.net.http.HttpConnection.setupSecureSocket(HttpConnection.java:209)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:478)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:442)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:290)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:240)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:81)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:197)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at libcore.net.http.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:281)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.scribe.model.Request.addBody(Request.java:125)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.scribe.model.Request.doSend(Request.java:104)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.scribe.model.Request.send(Request.java:62)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): ... 10 more
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x61c6b140: Failure in SSL library, usually a protocol error
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure (external/openssl/ssl/s23_clnt.c:741 0x5bb5f57c:0x00000000)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:398)
06-11 14:01:51.779: E/EvernoteOAuthActivity(5768): ... 21 more


I was not able to resolve this issues.Until yesterday everything worked correctly but since today morning it's not working correctly anymore.
For the demo app (Given by evernote) the above exception shows & the authenticate process doesn't work.

1

There are 1 answers

1
vRallev On

I tried the sample and it does work. Which SDK version do you use? Note that there is a new version 2.0.0-RC2, which you should be using. The new SDK uses the main Evernote app to authenticate your users, which saves a lot of time.