aws-google-auth: Stopped working circa 4/10/2020

Some people get Invalid username or password.

I get:

ERROR:root:'NoneType' object has no attribute 'get' Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aws_google_auth-0.0.34-py3.7.egg/aws_google_auth/__init__.py", line 75, in cli process_auth(args, config) File "/usr/local/lib/python3.7/site-packages/aws_google_auth-0.0.34-py3.7.egg/aws_google_auth/__init__.py", line 222, in process_auth google_client.do_login() File "/usr/local/lib/python3.7/site-packages/aws_google_auth-0.0.34-py3.7.egg/aws_google_auth/google.py", line 235, in do_login passwd_challenge_url = 'https://accounts.google.com' + form.get('action') AttributeError: 'NoneType' object has no attribute 'get'

Passwords are verified correct, I’ve tried no cache, I’ve tried adding a new account, and I’ve tried resetting my Google password all to no avail.

It looks like Google changed something. Let me know how I can help diagnose it.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 51
  • Comments: 58 (8 by maintainers)

Most upvoted comments

@brunodasilvalenga’s fix worked for me. Here’s how you can use it:

git clone https://github.com/brunodasilvalenga/aws-google-auth.git
cd aws-google-auth
git checkout fix-google-captcha
pip install -e . --user

I saw that the user @ramnes (Thanks mate) created a pull request resolving the conflict in captcha request but still continue to receive authentication errors, after a few hours of debugging I discovered that you cannot send the password together with the captcha, first you need to pass the captcha and after that it redirect you (301) to the password authentication page. I changed the code to include this new request and everything worked again.

I’ve created a pull request for that.

Please feel free to ask any question 😃

I can confirm that only removing google_config.bg_response is enough to make it work again.

Is it possible to have this part done on the browser?

@brunodasilvalenga https://github.com/brunodasilvalenga/aws-google-auth/tree/fix-google-captcha

Just cloned this branch and did a python pip install on it and it worked! This is a welcome development after being left out to dry for several weeks!

I’ve been hit by this also, so I’ve started working on a fix by modifying the code directly inside .local/lib64/python3.6/site-packages/aws_google_auth/. Basically the problem is that the HTML changed, and that things like the captcha-container div got replaced by another div named identifier-captcha.

Eventually I cloned the repository to do my work here. I made a virtual environment, installed the project and its dependencies with pip install -e .… and then couldn’t hit the CAPTCHA anymore! I ended up figuring out that the difference between the two setups was the version of urllib3. Version 1.22 triggers the CAPTCHA, but version 1.25.8 does not.

TL;DR: as a workaround and before a fix is released, installing urllib3 1.25.8 (i.e. pip install --user urllib3==1.25.8 or alike) might help if you’re encountering this.

Merged and released as part of 0.0.36 - hopefully this squashes most of the current pain points.

When will @brunodasilvalenga‘s PR get merged?

We tried out https://github.com/ruimarinho/gsts as well and it works out of the box for the developers having issues at Lunar.

It’s not going to help to resolve this issue but if anyone is blocked because of that, in the meantime there’s this Chrome extension extracting the credentials from the browser: https://chrome.google.com/webstore/detail/saml-to-aws-sts-keys-conv/ekniobabpcnfjgfbphhcolcinmnbehde?hl=en

I’ll try the urllib update on my side too