Code Monkey home page Code Monkey logo

Comments (10)

ezequielbarros avatar ezequielbarros commented on June 12, 2024 13

I fix this error as follows:

Added the parameter "--bg-response js_enabled"

$ aws-google-auth -u 'user' -I '<IDP_ID>' -S '<SP_ID>' -R '' -d '' --bg-response js_enabled

After adding this parameter, proceed to the captcha but when filling it, the error continued to occur.

Debugging the page content with the error I noticed that by default aws-google-auth sends this parameter "bg_response" with value "js_disabled". The google auth flow must have changed to block browsers that don't support javascript. People who used it before seem to have no problem but new facilities are not working. My solution was to pass the value as "js_enabled" but as this parameter was not being passed in the payload of the request to captcha, the error continued to occur. The solution was to include the parameter in the payload of the request, which in my case and that of other co-workers fixed the problem.

I will submit a pull request for this fix.

This is the commit with that fix, you can test by adding these two lines of code locally to fix it temporarily until the fix is delivered.

Commit: ezeqme@d7d7001

from aws-google-auth.

rdonkin-attest avatar rdonkin-attest commented on June 12, 2024 3

@monkora - see PR #250, this is a simple two-line fix that worked well. Thanks @ezequielbarros for the fix!

from aws-google-auth.

razvanphp avatar razvanphp commented on June 12, 2024 2

We have the same problem with a new google account. Old accounts work as before (on the same machine/setup).

Running with -l debug we can see this:

DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 302 242
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /signin/rejected?rrk=88&hl=ro HTTP/1.1" 200 None
INFO:root:Handling new-style login page
ERROR:root:'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aws_google_auth-0.0.37-py3.8.egg/aws_google_auth/__init__.py", line 78, in cli
    process_auth(args, config)
  File "/usr/local/lib/python3.8/site-packages/aws_google_auth-0.0.37-py3.8.egg/aws_google_auth/__init__.py", line 242, in process_auth
    google_client.do_login()
  File "/usr/local/lib/python3.8/site-packages/aws_google_auth-0.0.37-py3.8.egg/aws_google_auth/google.py", line 233, in do_login
    passwd_challenge_url = 'https://accounts.google.com' + form.get('action')
AttributeError: 'NoneType' object has no attribute 'get'DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 302 242
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /signin/rejected?rrk=88&hl=ro HTTP/1.1" 200 None
INFO:root:Handling new-style login page
ERROR:root:'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aws_google_auth-0.0.37-py3.8.egg/aws_google_auth/__init__.py", line 78, in cli
    process_auth(args, config)
  File "/usr/local/lib/python3.8/site-packages/aws_google_auth-0.0.37-py3.8.egg/aws_google_auth/__init__.py", line 242, in process_auth
    google_client.do_login()
  File "/usr/local/lib/python3.8/site-packages/aws_google_auth-0.0.37-py3.8.egg/aws_google_auth/google.py", line 233, in do_login
    passwd_challenge_url = 'https://accounts.google.com' + form.get('action')
AttributeError: 'NoneType' object has no attribute 'get'

Basically this link says

The browser you’re using doesn’t support JavaScript, or has JavaScript turned off.

To keep your Google Account secure, try signing in on a browser that has JavaScript turned on. Learn more

If you continue to have problems signing in, please contact your administrator.

from aws-google-auth.

stevemac007 avatar stevemac007 commented on June 12, 2024 2

Google looks to have made changes to the responses, a fix for this should be available in release https://github.com/cevoaustralia/aws-google-auth/releases/tag/0.0.38

from aws-google-auth.

oleg-pershin avatar oleg-pershin commented on June 12, 2024

from aws-google-auth.

alejobold avatar alejobold commented on June 12, 2024

I have the same problem! any fix or idea?

from aws-google-auth.

nmehta001 avatar nmehta001 commented on June 12, 2024

After entering the captcha that loads for me I get the following:

aws-google-auth -u <user> -I <id> -S <sid> -R eu-west-2 -p default -a --bg-response js_enabled -l debug
INFO:root:aws_google_auth: SAML cache not found
Google Password: 
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com:443
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /o/saml2/initsso?idpid=C00q79co4&spid=987953252410&forceauthn=false HTTP/1.1" 302 0
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/saml2/initsso?idpid%3DC00q79co4%26spid%3D987953252410%26forceauthn%3Dfalse%26from_login%3D1%26as%3DN1gAbsXQeeQl1TNt2X6YHzQNd7_tbObRQIctoabJOTQ&followup=https://accounts.google.com/o/saml2/initsso?idpid%3DC00q79co4%26spid%3D987953252410%26forceauthn%3Dfalse%26from_login%3D1%26as%3DN1gAbsXQeeQl1TNt2X6YHzQNd7_tbObRQIctoabJOTQ&ltmpl=popup&oauth=1&faa=1&sarp=1&scc=1 HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 200 None
Please visit the following URL to view your CAPTCHA: https://accounts.google.com/Captcha?v=2&ctoken=AAWk9lTygB7u9hkP-V2a-es0QizyZqh51yz2pPYFWBRc6JDl2phnpj9QPDbpdcholNIo7pf0AZne3XSNmUbl-HfyJ71ammUp3HAfIF8k_JhkARPg_J4i8lnn4ZpdCAARdTaQN8M-d6f7og_86L1CoxFiIdsSuucpEkuqerl64qmxZwDxRHtJpRY-MCm6kb4QlwJPleYaMsnV
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com:443
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /Captcha?v=2&ctoken=AAWk9lTygB7u9hkP-V2a-es0QizyZqh51yz2pPYFWBRc6JDl2phnpj9QPDbpdcholNIo7pf0AZne3XSNmUbl-HfyJ71ammUp3HAfIF8k_JhkARPg_J4i8lnn4ZpdCAARdTaQN8M-d6f7og_86L1CoxFiIdsSuucpEkuqerl64qmxZwDxRHtJpRY-MCm6kb4QlwJPleYaMsnV HTTP/1.1" 200 None
Captcha (case insensitive): ../src/intel/isl/isl.c:2212: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available.
ulstralsaw
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 302 245
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /signin/rejected?rrk=88&hl=en-GB HTTP/1.1" 200 None
ERROR:root:'NoneType' object has no attribute 'find_all'
Traceback (most recent call last):
  File "/home/nmehta/.local/lib/python3.10/site-packages/aws_google_auth/__init__.py", line 79, in cli
    process_auth(args, config)
  File "/home/nmehta/.local/lib/python3.10/site-packages/aws_google_auth/__init__.py", line 243, in process_auth
    google_client.do_login()
  File "/home/nmehta/.local/lib/python3.10/site-packages/aws_google_auth/google.py", line 291, in do_login
    sess = self.handle_captcha(sess, payload)
  File "/home/nmehta/.local/lib/python3.10/site-packages/aws_google_auth/google.py", line 432, in handle_captcha
    for tag in form.find_all('input'):
AttributeError: 'NoneType' object has no attribute 'find_all'

from aws-google-auth.

Renjie-d1g1t avatar Renjie-d1g1t commented on June 12, 2024

After entering the captcha that loads for me I get the following:

aws-google-auth -u <user> -I <id> -S <sid> -R eu-west-2 -p default -a --bg-response js_enabled -l debug
INFO:root:aws_google_auth: SAML cache not found
Google Password: 
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com:443
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /o/saml2/initsso?idpid=C00q79co4&spid=987953252410&forceauthn=false HTTP/1.1" 302 0
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /ServiceLogin?passive=1209600&continue=https://accounts.google.com/o/saml2/initsso?idpid%3DC00q79co4%26spid%3D987953252410%26forceauthn%3Dfalse%26from_login%3D1%26as%3DN1gAbsXQeeQl1TNt2X6YHzQNd7_tbObRQIctoabJOTQ&followup=https://accounts.google.com/o/saml2/initsso?idpid%3DC00q79co4%26spid%3D987953252410%26forceauthn%3Dfalse%26from_login%3D1%26as%3DN1gAbsXQeeQl1TNt2X6YHzQNd7_tbObRQIctoabJOTQ&ltmpl=popup&oauth=1&faa=1&sarp=1&scc=1 HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 200 None
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 200 None
Please visit the following URL to view your CAPTCHA: https://accounts.google.com/Captcha?v=2&ctoken=AAWk9lTygB7u9hkP-V2a-es0QizyZqh51yz2pPYFWBRc6JDl2phnpj9QPDbpdcholNIo7pf0AZne3XSNmUbl-HfyJ71ammUp3HAfIF8k_JhkARPg_J4i8lnn4ZpdCAARdTaQN8M-d6f7og_86L1CoxFiIdsSuucpEkuqerl64qmxZwDxRHtJpRY-MCm6kb4QlwJPleYaMsnV
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): accounts.google.com:443
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /Captcha?v=2&ctoken=AAWk9lTygB7u9hkP-V2a-es0QizyZqh51yz2pPYFWBRc6JDl2phnpj9QPDbpdcholNIo7pf0AZne3XSNmUbl-HfyJ71ammUp3HAfIF8k_JhkARPg_J4i8lnn4ZpdCAARdTaQN8M-d6f7og_86L1CoxFiIdsSuucpEkuqerl64qmxZwDxRHtJpRY-MCm6kb4QlwJPleYaMsnV HTTP/1.1" 200 None
Captcha (case insensitive): ../src/intel/isl/isl.c:2212: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available.
ulstralsaw
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "POST /signin/v1/lookup HTTP/1.1" 302 245
DEBUG:urllib3.connectionpool:https://accounts.google.com:443 "GET /signin/rejected?rrk=88&hl=en-GB HTTP/1.1" 200 None
ERROR:root:'NoneType' object has no attribute 'find_all'
Traceback (most recent call last):
  File "/home/nmehta/.local/lib/python3.10/site-packages/aws_google_auth/__init__.py", line 79, in cli
    process_auth(args, config)
  File "/home/nmehta/.local/lib/python3.10/site-packages/aws_google_auth/__init__.py", line 243, in process_auth
    google_client.do_login()
  File "/home/nmehta/.local/lib/python3.10/site-packages/aws_google_auth/google.py", line 291, in do_login
    sess = self.handle_captcha(sess, payload)
  File "/home/nmehta/.local/lib/python3.10/site-packages/aws_google_auth/google.py", line 432, in handle_captcha
    for tag in form.find_all('input'):
AttributeError: 'NoneType' object has no attribute 'find_all'

I am getting the same error..

from aws-google-auth.

monkora avatar monkora commented on June 12, 2024

I have the same problem as @Renjie-d1g1t and @nmehta001

from aws-google-auth.

Renjie-d1g1t avatar Renjie-d1g1t commented on June 12, 2024

Google looks to have made changes to the responses, a fix for this should be available in release https://github.com/cevoaustralia/aws-google-auth/releases/tag/0.0.38

great news, anyone tried 0.0.38 yet?

from aws-google-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.