Open james-welly opened 4 years ago
I'm seeing a similar error that looks like this:
ERROR:root:'NoneType' object has no attribute 'get' Traceback (most recent call last): File "/home/davidgcheney/.local/lib/python3.7/site-packages/aws_google_auth/__init__.py", line 76, in cli process_auth(args, config) File "/home/davidgcheney/.local/lib/python3.7/site-packages/aws_google_auth/__init__.py", line 233, in process_auth google_client.do_login() File "/home/davidgcheney/.local/lib/python3.7/site-packages/aws_google_auth/google.py", line 238, in do_login passwd_challenge_url = 'https://accounts.google.com' + form.get('action') AttributeError: 'NoneType' object has no attribute 'get'
I have multple accounts and profiles and strangely this is consistent for one of those accounts while the other one works properly. Guessing it's bot detection, but this is very frustrating.
I'm seeing same error
ERROR:root:'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/local/Cellar/aws-google-auth/0.0.35/libexec/lib/python3.8/site-packages/aws_google_auth/__init__.py", line 76, in cli
process_auth(args, config)
File "/usr/local/Cellar/aws-google-auth/0.0.35/libexec/lib/python3.8/site-packages/aws_google_auth/__init__.py", line 233, in process_auth
google_client.do_login()
File "/usr/local/Cellar/aws-google-auth/0.0.35/libexec/lib/python3.8/site-packages/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'
I can't seem to find a way around it.
Duplicate of #179
Is this resolved with the latest build 0.0.36
which has the fixed for captcha.
Please let us know if this resolves your issue.
My whole team is getting this error with 0.0.36
Hello, I'm getting the same problem @james-welly. Do you find any solution to it?
I'm not familiar with the code base of the project, but looking quickly I can see that the problem is here, in google.py file:
if challenge_page.find('form', {'id': 'gaia_loginform'}):
form = challenge_page.find('form', {'id': 'gaia_loginform'})
passwd_challenge_url = form.get('action')
else:
# sometimes they serve up a different page
logging.info("Handling new-style login page")
form = challenge_page.find('form', {'id': 'challenge'})
passwd_challenge_url = 'https://accounts.google.com' + form.get('action')
form doesn't get any value. It look like the webscrapping is failing, I'm not sure how to help tough @stevemac007
Not sure if it helps someone, but in my case, the problem seem to be that at my company we are using something called MobileIron as second factor authentication with our smarthphone, and when aws-google-auth code is doing this on google.py:
# POST to account login info page, to collect profile and session info
sess = self.post(account_login_url, data=payload)
It is getting this html:
Which doesn't have the following expected form:
form = challenge_page.find('form', {'id': 'challenge'})
passwd_challenge_url = 'https://accounts.google.com' + form.get('action')
So it breaks:
ERROR:root:'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/__init__.py", line 78, in cli
process_auth(args, config)
File "/usr/local/lib/python3.8/dist-packages/aws_google_auth/__init__.py", line 242, in process_auth
google_client.do_login()
File "/usr/local/lib/python3.8/dist-packages/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'
My whole team started getting below error with aws-google-auth. We tried resetting cookies, uninstalled & installed aws-google-auth but did not help. Can some please shed some light on it. It was working fine until yesterday.
My whole team started getting below error with aws-google-auth. We tried resetting cookies, uninstalled & installed aws-google-auth but did not help. Can some please shed some light on it. It was working fine until yesterday.
I was getting the same problem, but I just added this flag --bg-response js_enabled
, running the latest version of aws-google-auth (0.0.38).
aws-google-auth --bg-response js_enabled
Have been using the docker image with this repo to authenticate with Google for some time. As of yesterday it stopped working with the following error message:
I have removed the image and downloaded the latest version and still get the error. I have also created a virtual environment with the latest python packages and run the following command and still no joy.
I have exported the challenge page to html (attached). Everyone else in my organisation is still able to use the repo to authenticate. Any thoughts? It appears to be a similar comments in https://github.com/cevoaustralia/aws-google-auth/issues/160
out2.html.zip