2016-10-31 8 views
4

私は最近、118.0.0から132.0.0に自分のgcloudライブラリを更新し、すぐにremote_api_shellは機能しなくなりました。再ログインの順番、gcloudを通じてアプリケーションのデフォルトの資格情報を設定したり、サービスアカウントと環境変数を使用したりするための一連の作業を行いました。すべての順列は、同じエラーメッセージで失敗しました:Appengine remote_api_shellが更新以来のアプリケーションのデフォルトの資格情報で動作していません

Traceback (most recent call last): 
    File "/Users/mbostwick/google-cloud-sdk/bin/remote_api_shell.py", line 133, in <module> 
    run_file(__file__, globals()) 
    File "/Users/mbostwick/google-cloud-sdk/bin/remote_api_shell.py", line 129, in run_file 
    execfile(_PATHS.script_file(script_name), globals_) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/remote_api_shell.py", line 160, in <module> 
    main(sys.argv) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/remote_api_shell.py", line 156, in main 
    oauth2=True) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/remote_api_shell.py", line 74, in remote_api_shell 
    secure=secure, app_id=appid) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 769, in ConfigureRemoteApiForOAuth 
    rpc_server_factory=rpc_server_factory) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 839, in ConfigureRemoteApi 
    app_id = GetRemoteAppIdFromServer(server, path, rtok) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 569, in GetRemoteAppIdFromServer 
    response = server.Send(path, payload=None, **urlargs) 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/appengine_rpc_httplib2.py", line 259, in Send 
    NeedAuth() 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/appengine_rpc_httplib2.py", line 235, in NeedAuth 
    RaiseHttpError(url, response_info, response, 'Too many auth attempts.') 
    File "/Users/mbostwick/google-cloud-sdk/platform/google_appengine/google/appengine/tools/appengine_rpc_httplib2.py", line 85, in RaiseHttpError 
    raise urllib2.HTTPError(url, response_info.status, msg, response_info, stream) 
urllib2.HTTPError: HTTP Error 401: Unauthorized Too many auth attempts. 

は131.0.0と130.0.0を通じて回転を増す戻った後、私は戻って118.0.0に、中に再ログインして行き、すべてがうまく働きました。

gcloudのアップデート後に実行中のアプリケーションを更新しませんでした。現時点ではリリースサイクルの途中ですので、問題が発生している可能性がありますが、何か助けていただければ幸いです。ありがとう!

+0

これは130+で動作しますか? 133.0.0で同じ問題が発生しています。 – snakecharmerb

答えて

8

TL; DR:今、あなたのリモートシェルが再び動作するはず

gcloud auth application-default login --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/userinfo.email 

を実行します。これは、のgcloudバージョンで134

オリジナル答えを修正しました。

詳細: 私はこれがgcloud auth loginコマンドへの変更に伴い、128.0.0更新で壊れていたと思います。古いトークンは(Googleのtokeninfoエンドポイントに応じて)次のスコープを持っている:gcloud auth application-default loginから

https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/appengine.admin https://www.googleapis.com/auth/compute https://www.googleapis.com/auth/plus.me 

新しいトークンをオプションなしで唯一持っている:これはgcloud auth application-default login --help

に記載されて

https://www.googleapis.com/auth/cloud-platform 

バージョン134の詳細:要求されたスコープは現在:

https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/cloud-platform 

ディスカッションを参照してくださいhttps://groups.google.com/d/msg/google-appengine/ptc-76K6Kk4/9qr4601BBgAJ

+0

ありがとう、これは非常に有望です。コードやドキュメントに関して、これに関するGoogleの未解決の問題があるかどうか知りましたか? – snakecharmerb

+0

あるかどうかわからない。私はアプリエンジンのGoogle Groupに投稿して、いくつかの注意を喚起しました。 https://groups.google.com/forum/#!topic/google-appengine/ptc-76K6Kk4 –

+1

これは一般的な問題追跡ツールをあまり信用していません。これはfirebase rest APIの問題でもありました。http: //stackoverflow.com/questions/40443525/firebase-applicationdefaultcredentials-doesnt-work-in-dev-appserver/40539525#40539525 – astromme

関連する問題