madecoste / swarming

Automatically exported from code.google.com/p/swarming
Apache License 2.0
0 stars 1 forks source link

update.py crashes on first use when OAuth2 token is missing. #176

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Repro:
1. rm ~/.appcfg_oauth2_tokens
2. ./update.py -A foo

Expected:
Use the oauth2 dance to generate the token.

Actual:
Hangs, then prints a stack dump on Ctrl-C. This issue came up every time 
someone used update.py the first time and it's very confusing.

AI:
There is a bootstrapping problem with the update.py wrapper. In short, the user 
needs to .../google_appengine/appcfg.py list_versions -A <valid_server_name> 
--oauth2 once to generate the OAuth2 token, then it just works™ by reusing 
the cached oauth2 access token.

Options:
- Close stdin preemptively.
- Look for ~/.appcfg_oauth2_tokens and tell the user to run a command to do the 
dance first.

Original issue reported on code.google.com by maruel@chromium.org on 25 Nov 2014 at 2:35

GoogleCodeExporter commented 9 years ago
Fixed in new 'gae' tool, effectively here: 
https://code.google.com/p/swarming/source/detail?r=3efa7b965afdf88830fccc5e2c051
514f07cac49

Original comment by vadimsh@chromium.org on 26 Nov 2014 at 7:51