ARC - 无效的 OAuth2 范围

ARC - Invalid OAuth2 scopes

所以我得到了一个应用程序 使用云端点来连接应用程序引擎后端。它在物理设备和安迪模拟器上完美运行。

然而,当我尝试在 arc 上进行身份验证时,我在 javascript 控制台

中收到以下错误
Authentication error Error: Invalid OAuth2 scopes

具有以下堆栈

"Error: Invalid OAuth2 scopes.
at Error (native)
at Object.callback (chrome-extension://kanlgeedkacgohmccakppmlicnfgfpnl/_modules/mfaihdlpglflfgpfjcifdjdjcckigekc/gen_index.min.js:36:159)
at safeCallbackApply (extensions::sendRequest:21:15)
at handleResponse (extensions::sendRequest:73:7)"

错误发生在 auth.js:94 看起来像这样

/** @private */
AuthManager.prototype.handleGetAuthToken_ = function(message) {
console.log('Authentication requested', message);

var reply = (function(data) {
var responseMessage = {
  namespace: 'androidIdentity',
  command: 'getAuthTokenResponse',
  data: data
};
  this.plugin_.postMessage(responseMessage);
}).bind(this);

var options = { 'interactive': true };
var scopes = this.parseScope_(message.data.tokenType);
if (scopes.length > 0) {
options.scopes = scopes;
}

// This call will pop up a window to ask user for permission to grant
// permissions of the given OAuth2 scopes, or declared scopes in
// manifest.json as a fallback.
//
// For non-signed-in Chrome session, this will open up a window to ask the
// user to sign in to Chrome first.
PromiseWrap.getAuthToken(options).then(function(token) {
  console.log('Authentication successful');
   reply({token: token});
   }, function(error) {
     console.error('Authentication error', error); // line 94 is here :(
     reply({error: error.message});
   });
};

我遵循了这些步骤:

1- download zip from arc welder
2- upload to chrome webstore
3- get id + "crx_key" from chrome webstore
4- get chrome key from developer console associated with application
5- launch arc welder and add oauth key 
6- add metadata "usePlayServices": ["gcm", "plus","location", "maps"],"crx_key":"<KEY FROM WEBSTORE>"
7- launch app - chose google account - get an oauth exception

我无法获取 logcat 数据,它的打印速度快得离谱,无法连接,哦,我在 mac.

上这样做

编辑

似乎端点正在使用

的弃用范围
    https://www.googleapis.com/auth/userinfo.email

[编辑]

Cross client authentication is not yet supported on ARC. If the app requests auth token for scope like "oauth2:server:client_id:9414861317621.apps.googleusercontent.com:api_scope:resource-1 resource-2", it won't work yet. Here is an related bug 用于跟踪。

[原创]

您是否在 Google Developers Console 上启用了 "Google+ API"?

顺便说一句,如果没有,您应该在与 Android 应用程序相同的项目下创建 Chrome Apps 客户端。这样就不需要再打开API了。