我在我的Android应用程序中使用evernote Android sdk来处理evernote操作。
到今天早上,认证工作正常。现在验证不起作用,演示应用程序(由evernote提供)也不起作用。
以下是详细信息:
以下是我的项目中使用的示例源代码:
mEvernoteSession = EvernoteSession.getInstance(this.context, CONSUMER_KEY, CONSUMER_SECRET, EvernoteSession.EvernoteService.SANDBOX, SUPPORT_APP_LINKED_NOTEBOOKS);
mEvernoteSession.authenticate(this);
在上面显示的代码中,指的是活动:
在身份验证时,它会进入evernote登录页面,成功登录后会进入授权页面。然后它转到我的应用程序。
在 onActivityResult 我收到失败回复
在onActivityResult中,我得到了以下内容
请求代码为EvernoteSession.REQUEST_CODE_OAUTH
且响应代码不是Activity.RESULT_OK
我检查了log cat。显示以下行:
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
我无法解决这个问题。直到昨天一切正常,但从今天早上起它不再正常工作了。
对于演示应用程序(由evernote提供),上述例外显示&验证过程不起作用。
答案 0 :(得分:0)
我试过这个样本,确实有效。您使用的是哪个SDK版本?请注意,您应该使用新版本2.0.0-RC2
。新的SDK使用主要的Evernote应用程序对您的用户进行身份验证,从而节省了大量时间。