Created
May 14, 2015 04:19
-
-
Save peter-kolenic/91799b1a8237481c0ff9 to your computer and use it in GitHub Desktop.
missing client_id in authentication request (google+) - the way i try to do initial deploy of gae-init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2015-05-14 05:42:57.128 /api/auth/callback/google/?code=_SOME_CODE_HERE_ 500 106ms 0kb Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:37.0) Gecko/20100101 Firefox/37.0 module=default version=1 | |
92.245.6.37 - - [13/May/2015:20:42:57 -0700] "GET /api/auth/callback/google/?code=_SOME_CODE_HERE_ HTTP/1.1" 500 0 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:37.0) Gecko/20100101 Firefox/37.0" "kampan-kostitras-test.appspot.com" ms=107 cpu_ms=60 cpm_usd=0.000065 app_engine_release=1.9.21 instance=00....14 | |
D 2015-05-14 05:42:57.077 | |
Prepare oauth2 remote args {'client_secret': u'', 'code': u'_SOME_CODE_HERE_', 'redirect_uri': 'http://kampan-kostitras-test.appspot.com/api/auth/callback/google/'} | |
D 2015-05-14 05:42:57.078 | |
Request 'https://accounts.google.com/o/oauth2/token' with 'POST' method | |
E 2015-05-14 05:42:57.093 | |
sequence index must be integer, not 'str' | |
Traceback (most recent call last): | |
File "lib.zip/flask/app.py", line 1475, in full_dispatch_request | |
rv = self.dispatch_request() | |
File "lib.zip/flask/app.py", line 1461, in dispatch_request | |
return self.view_functions[rule.endpoint](**req.view_args) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/auth/google.py", line 34, in google_authorized | |
flask.session['oauth_token'] = (response['access_token'], '') | |
TypeError: sequence index must be integer, not 'str' | |
E 2015-05-14 05:42:57.102 | |
sequence index must be integer, not 'str' | |
Traceback (most recent call last): | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/control/error.py", line 24, in error_handler | |
e.code | |
AttributeError: 'exceptions.TypeError' object has no attribute 'code' | |
E 2015-05-14 05:42:57.112 | |
Exception on /api/auth/callback/google/ [GET] | |
Traceback (most recent call last): | |
File "lib.zip/flask/app.py", line 1817, in wsgi_app | |
response = self.full_dispatch_request() | |
File "lib.zip/flask/app.py", line 1477, in full_dispatch_request | |
rv = self.handle_user_exception(e) | |
File "lib.zip/flask_restful/__init__.py", line 265, in error_router | |
return original_handler(e) | |
File "lib.zip/flask/app.py", line 1379, in handle_user_exception | |
return handler(e) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/control/error.py", line 43, in production_error_handler | |
return error_handler(e) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/control/error.py", line 30, in error_handler | |
return helpers.handle_error(e) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/api/helpers.py", line 34, in handle_error | |
'description': e.description, | |
AttributeError: 'exceptions.TypeError' object has no attribute 'description' | |
E 2015-05-14 05:42:57.119 | |
'exceptions.TypeError' object has no attribute 'description' | |
Traceback (most recent call last): | |
File "lib.zip/flask/app.py", line 1817, in wsgi_app | |
response = self.full_dispatch_request() | |
File "lib.zip/flask/app.py", line 1477, in full_dispatch_request | |
rv = self.handle_user_exception(e) | |
File "lib.zip/flask_restful/__init__.py", line 265, in error_router | |
return original_handler(e) | |
File "lib.zip/flask/app.py", line 1379, in handle_user_exception | |
return handler(e) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/control/error.py", line 43, in production_error_handler | |
return error_handler(e) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/control/error.py", line 30, in error_handler | |
return helpers.handle_error(e) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/api/helpers.py", line 34, in handle_error | |
'description': e.description, | |
AttributeError: 'exceptions.TypeError' object has no attribute 'description' | |
E 2015-05-14 05:42:57.120 | |
'exceptions.TypeError' object has no attribute 'description' | |
Traceback (most recent call last): | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/control/error.py", line 24, in error_handler | |
e.code | |
AttributeError: 'exceptions.AttributeError' object has no attribute 'code' | |
E 2015-05-14 05:42:57.120 | |
Traceback (most recent call last): | |
File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 267, in Handle | |
result = handler(dict(self._environ), self._StartResponse) | |
File "lib.zip/flask/app.py", line 1836, in __call__ | |
return self.wsgi_app(environ, start_response) | |
File "lib.zip/flask/app.py", line 1820, in wsgi_app | |
response = self.make_response(self.handle_exception(e)) | |
File "lib.zip/flask_restful/__init__.py", line 265, in error_router | |
return original_handler(e) | |
File "lib.zip/flask/app.py", line 1410, in handle_exception | |
return handler(e) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/control/error.py", line 30, in error_handler | |
return helpers.handle_error(e) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/api/helpers.py", line 34, in handle_error | |
'description': e.description, | |
AttributeError: 'exceptions.AttributeError' object has no attribute 'description' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Preconditions: | |
console.developers.google.com: | |
- APIs & auth -> APIs: | |
Consent screen: Email address is set to my gmail | |
- APIs & auth -> APIs: | |
+ Identity Toolkit API | |
+ Google+ API | |
- APIs & auth -> Credentials: | |
OAuth: Create new Client ID | |
javascript origin: | |
https://kampan-kostitras-test.appspot.com | |
Redirect URIs: | |
https://kampan-kostitras-test.appspot.com/api/auth/callback/google/ | |
project: | |
- clean gae-init at b3f2d92c09500540e9c97887321393b325b59719 | |
- npm install | |
a) appengine.google.com: Application Settings -> Authentication Type: Google Accounts API | |
1. appengine.google.com: flush memcache, delete everything in Datastore Viewer | |
2. gulp deploy | |
3. login with my gmail at https://kampan-kostitras-test.appspot.com/signin/ | |
4. https://kampan-kostitras-test.appspot.com/admin/auth/ | |
set google | |
Client ID, Client secret | |
Update config | |
5. new clean browser: | |
https://kampan-kostitras-test.appspot.com/signin/ | |
Sign in with Google: | |
Error: invalid_request | |
Missing required parameter: client_id | |
https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=&redirect_uri=http%3A%2F%2Fkampan-kostitras-test.appspot.com%2Fapi%2Fauth%2Fcallback%2Fgoogle%2F&scope=email+profile | |
I type my client ID into URL, and get to google login screen, type email/password, | |
and arrive at | |
https://kampan-kostitras-test.appspot.com/api/auth/callback/google/?code=... | |
Oh no...! Something went wrong :( | |
6. in appengine Logs - whole entry is in next file in this gist | |
named "[a) 6], error in appengine log - when Authentication Type: Google Accounts API" | |
D Prepare oauth2 remote args {'client_secret': u'', 'code': u'_here_is_something_', 'redirect_uri': 'http://kampan-kostitras-test.appspot.com/api/auth/callback/google/'} | |
D Request 'https://accounts.google.com/o/oauth2/token' with 'POST' method | |
E 2015-05-14 05:42:57.093 | |
sequence index must be integer, not 'str' | |
Traceback (most recent call last): | |
File "lib.zip/flask/app.py", line 1475, in full_dispatch_request | |
rv = self.dispatch_request() | |
File "lib.zip/flask/app.py", line 1461, in dispatch_request | |
return self.view_functions[rule.endpoint](**req.view_args) | |
File "/base/data/home/apps/s~kampan-kostitras-test/1.384285286586183605/auth/google.py", line 34, in google_authorized | |
flask.session['oauth_token'] = (response['access_token'], '') | |
TypeError: sequence index must be integer, not 'str' | |
b) appengine.google.com: Application Settings -> Authentication Type: Google Accounts API | |
1. appengine.google.com: flush memcache, delete everything in Datastore Viewer | |
2. gulp deploy | |
3. try login with my gmail https://kampan-kostitras-test.appspot.com/signin/ | |
i get: | |
Error: Server Error | |
The server encountered an error and could not complete your request. | |
Please try again in 30 seconds. | |
no error in logs, last entry is: | |
2015-05-14 06:04:45.376 /signin/gae/?next=https%3A%2F%2Fkampan-kostitras-test.appspot.com%2F&remember=true 302 63ms 0kb Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:37.0) Gecko/20100101 Firefox/37.0 module=default version=1 | |
92.245.6.37 - - [13/May/2015:21:04:45 -0700] "GET /signin/gae/?next=https%3A%2F%2Fkampan-kostitras-test.appspot.com%2F&remember=true HTTP/1.1" 302 799 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:37.0) Gecko/20100101 Firefox/37.0" "kampan-kostitras-test.appspot.com" ms=64 cpu_ms=16 cpm_usd=0.000089 app_engine_release=1.9.21 instance=00c61b117cf324bdaecb119771de73b7759ac577 | |
4. Datastore Viewer https://appengine.google.com/datastore/explorer | |
shows one entity Config; unable to login i edit it there, and set google_client_id, google_client_secret | |
5. try login with my gmail https://kampan-kostitras-test.appspot.com/signin/ | |
i get: | |
Error: Server Error | |
The server encountered an error and could not complete your request. | |
Please try again in 30 seconds. | |
6. i flush memcache, try login again, the same result. | |
no error in logs, last entry is: | |
2015-05-14 06:12:02.826 /signin/gae/?next=https%3A%2F%2Fkampan-kostitras-test.appspot.com%2F&remember=true 302 60ms 0kb Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:37.0) Gecko/20100101 Firefox/37.0 module=default version=1 | |
92.245.6.37 - - [13/May/2015:21:12:02 -0700] "GET /signin/gae/?next=https%3A%2F%2Fkampan-kostitras-test.appspot.com%2F&remember=true HTTP/1.1" 302 799 - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:37.0) Gecko/20100101 Firefox/37.0" "kampan-kostitras-test.appspot.com" ms=61 cpu_ms=12 cpm_usd=0.000089 app_engine_release=1.9.21 instance=00c61b117cf324bdaecb119771de73b7759ac577 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment