1

嘿大家我得到这个奇怪的错误。我尝试使用我的应用程序登录亚马逊云驱动器,但我得到了 invalid_scope?我一直在寻找几个小时,我无法弄清楚。这是踢球者。我正在使用示例亚马逊云应用程序。我只是把它变成了一个库并更新了密钥。我可以很好地运行示例应用程序,没有问题,登录没有问题。然后我从完整的应用程序中运行它,它会打开一个格式错误的 URL。有没有可能是因为没有提交白名单请求?我可能忘记了,但我不需要节点访问权限。奇怪的是它前几天还在工作。

我说的是这个样本。api中的那个。 https://developer.amazon.com/public/apis/experience/cloud-drive/content/sdk-android-building-file-explorer 没有代码可以复制粘贴,因为就是这段代码。当我按下登录时,它会尝试在我的浏览器中打开以下地址。

amzn://com.appname.reader?error_description=lwa-invalid-parameter-bad-scope&state=clientId%3Damzn1.application-oa2-%26redirectUri%3Damzn%3A%2F%2Fcom.appname.reader%26clientRequestId%&error=invalid_scope

我在成功和失败日志的输出之间逐行进行了检查。一切看起来都不错。除了它在哪里得到错误的回复,在调试器中一步一步地思考,范围与我在成功案例中的范围相同。

我会注意到唯一的区别是今天亚马逊要求一个标志和一个指向某个页面的链接。有任何想法吗?我真的被困住了。谢谢!

11-29 01:15:08.607 5788-5788/com.appname.reader I/com.amazon.identity.auth.device.authorization.api.AmazonAuthorizationManager: com.appname.reader calling authorize with Activity: scopes=[clouddrive:read, clouddrive:write, profile]
11-29 01:15:08.617 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier: isAPIKeyValid : packageName=com.appname.reader
11-29 01:15:08.617 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier: getAppInfo : packageName=com.appname.reader
11-29 01:15:08.617 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier: Finding API Key for com.appname.reader
11-29 01:15:08.617 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.utils.ThirdPartyResourceParser: Attempting to parse API Key from assets directory
11-29 01:15:08.617 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.APIKeyDecoder: Begin decoding API Key for packageName=com.appname.reader
11-29 01:15:08.637 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII: APIKey:<obscured>
11-29 01:15:08.637 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.APIKeyDecoder: num sigs = 1
11-29 01:15:08.637 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII: Signature checking.:<obscured>
11-29 01:15:08.637 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII: Fingerpirint checking:<obscured>
11-29 01:15:08.637 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.APIKeyDecoder: scopes has no mapping in json, returning null array
11-29 01:15:08.637 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.APIKeyDecoder: perm has no mapping in json, returning null array
11-29 01:15:08.637 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier: getAppInfo : packageName=com.appname.reader
11-29 01:15:08.637 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.AbstractAppIdentifier: Finding API Key for com.appname.reader
11-29 01:15:08.637 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.utils.ThirdPartyResourceParser: Attempting to parse API Key from assets directory
11-29 01:15:08.637 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.APIKeyDecoder: Begin decoding API Key for packageName=com.appname.reader
11-29 01:15:08.647 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII: APIKey:<obscured>
11-29 01:15:08.647 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.APIKeyDecoder: num sigs = 1
11-29 01:15:08.647 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII: Signature checking.:<obscured>
11-29 01:15:08.647 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.appid.APIKeyDecoder.PII: Fingerpirint checking:<obscured>
11-29 01:15:08.647 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.APIKeyDecoder: scopes has no mapping in json, returning null array
11-29 01:15:08.647 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.appid.APIKeyDecoder: perm has no mapping in json, returning null array
11-29 01:15:08.657 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.datastore.DatabaseHelper.PII: DatabaseHelper created:<obscured>
11-29 01:15:08.657 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.authorization.ThirdPartyServiceHelper: Inside getRemoteAndroidService AsyncTask - Attempting remote service
11-29 01:15:08.657 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.authorization.ThirdPartyServiceHelper: getAuthorizationServiceInstance
11-29 01:15:08.667 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.authorization.ThirdPartyServiceHelper: Number of services found : 0
11-29 01:15:08.667 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.authorization.ThirdPartyServiceHelper: Number of MAP services to compare = 0
11-29 01:15:08.667 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.authorization.ThirdPartyServiceHelper: Returning no service to use
11-29 01:15:08.667 5788-6001/com.appname.reader I/com.amazon.identity.auth.device.authorization.ThirdPartyServiceHelper: Unbinding Highest Versioned Service
11-29 01:15:08.677 5788-6001/com.appname.reader D/com.amazon.identity.auth.device.authorization.AuthorizationHelper.PII: Created UUID for request:<obscured>
11-29 01:15:08.677 5788-5788/com.appname.reader D/com.amazon.identity.auth.device.authorization.AuthorizationHelper.PII: Generating Redirect URI:<obscured>
11-29 01:15:08.677 5788-5788/com.appname.reader D/com.amazon.identity.auth.device.authorization.AuthorizationHelper.PII: Generating OAUTH2 URL:<obscured>
11-29 01:15:08.677 5788-5788/com.appname.reader I/com.amazon.identity.auth.device.authorization.AuthorizationHelper: Starting External Browser 
4

1 回答 1

0

我实际上不得不直接与亚马逊交谈。他们已经更新了他们的 API。原来..忘了...更新他们的例子和网站。他们决定取消读取权限,现在您需要 clouddrive:read_all。

 public static final String[] APP_AUTHORIZATION_SCOPES = {
        "clouddrive:read_all",
         ApplicationScope.CLOUDDRIVE_WRITE,
         "profile"};
于 2016-01-03T06:40:05.810 回答