Dropbox iOS SDK:WebKit丢弃了未捕获的异常 [英] Dropbox iOS SDK: WebKit Discarded an Uncaught Exception

查看:136
本文介绍了Dropbox iOS SDK:WebKit丢弃了未捕获的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Dropbox iOS SDK(截至撰写本文时, Cocoapod 1.3.9版)。我注意到一个奇怪的错误。以下是重现它的步骤。

I am using the Dropbox iOS SDK (as of this writing, Cocoapod version 1.3.9). I noticed a strange bug. Here are the steps to reproduce it.

连接到Dropbox,成功登录并链接到我的帐户。

记录到控制台的URL(为安全而屏蔽的令牌):

URL logged to the console (tokens masked for security):

db-abcdef123://1/connect?oauth_token=xyz123&oauth_token_secret=lmno123&uid=10884&state=91D8CB70-1037-4A4C-8F7B-CB8970E5E0BC

应用已成功关联!

退出,然后使用不同的帐户登录...

Sign out, then sign in with a different account...

再次登录到控制台的URL,类似于前一个:

URL logged to the console again, similar to the previous one:

db-abcdef123://1/connect?oauth_token=def123&oauth_token_secret=jkl123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F

然后出现错误:

*** WebKit discarded an uncaught exception in the webView:decidePolicyForNavigationAction:request:frame:decisionListener: delegate: <Unsupported Signature Method> The signature method "(null)" is not currently support by MPOAuthConnection

[WARNING] DropboxSDK: error loading DBConnectController - Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo=0x12848f00 {NSErrorFailingURLStringKey=db-abcdef123://1/connect?oauth_token=123abc&oauth_token_secret=xyz123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F, NSErrorFailingURLKey=db-abcdef123://1/connect?oauth_token=123abc&oauth_token_secret=xyz123&uid=95157647&state=DC716BF2-E033-4586-926C-5E733CEA1E3F, NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x144c4c80 "unsupported URL"}

Dropbox登录屏幕保留在 webView 中,再次点击登录会导致同样的错误但然后让应用程序崩溃。

The Dropbox login screen remains in the webView, and clicking Sign in again causes the same error but then makes the app crash.

任何想法?

我正在使用Xcode 5和iOS 7

推荐答案

这是一个众所周知的问题将在 iOS Dropbox应用(不是SDK)的下一版本中修复。

This is a known issue which will be fixed in the next release of the iOS Dropbox app (not the SDK).

编辑 :我根据错误信息误诊了这一点。实际问题可能是,一旦初始化了 DBRestClient ,它就会继续尝试在整个生命周期内使用相同的用户ID进行身份验证。如果取消链接该用户(即使您已添加其他用户),它将无法验证API调用,因为它不再具有该用户的凭据。

EDIT: I misdiagnosed this based on the error message. The actual issue is likely that once you've initialized a DBRestClient, it continues to try to use the same user ID for authentication throughout its lifespan. If you unlink that user (even if you've added another user instead), it will fail to authenticate API calls because it no longer has credentials for that user.

修复是在切换到新用户时创建新的 DBRestClient

The fix is to create a new DBRestClient when you switch to a new user.

此问题出现在DBRoulette中示例应用。我们将尝试为下一个SDK版本提供修复。

This issue is present in the DBRoulette sample app. We're going to try to put in a fix for the next SDK release.

这篇关于Dropbox iOS SDK:WebKit丢弃了未捕获的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆