Code Monkey home page Code Monkey logo

Comments (22)

bityob avatar bityob commented on June 12, 2024 13

Simple fix based on the PR #250 -

Edit this file site-packages/aws_google_auth/google.py, and add those code lines in line 268 -

        # Set bg_response in request payload to passwd challenge
        if self.config.bg_response:
            payload['bgresponse'] = self.config.bg_response

You can take the absolute path from the error above in your machine -

ERROR:root:'NoneType' object has no attribute 'find_all'
Traceback (most recent call last):
  File "/home/bityob/.local/lib/python3.8/site-packages/aws_google_auth/__init__.py", line 79, in cli
    process_auth(args, config)
  File "/home/bityob/.local/lib/python3.8/site-packages/aws_google_auth/__init__.py", line 243, in process_auth
    google_client.do_login()
  File "/home/bityob/.local/lib/python3.8/site-packages/aws_google_auth/google.py", line 291, in do_login
    sess = self.handle_captcha(sess, payload)
  File "/home/bityob/.local/lib/python3.8/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'

"/home/bityob/.local/lib/python3.8/site-packages/aws_google_auth/google.py"

Example -

image

from aws-google-auth.

cody-foltz avatar cody-foltz commented on June 12, 2024 7

If you installed aws-google-auth via homebrew, you can directly replace the file mentioned in the error above with the one from the PR. My path was different than the one above so use the path in the error.
Url to file from PR: https://github.com/ezequielsbarros/aws-google-auth/blob/d7d70010bac0494a5902e92a3bd7e124611cd6c1/aws_google_auth/google.py

from aws-google-auth.

rama3319 avatar rama3319 commented on June 12, 2024 5

Here is another fix.
ezeqme@d7d7001

from aws-google-auth.

abrelsfo avatar abrelsfo commented on June 12, 2024 4

I was having this issue last week and followed the fix in here

from aws-google-auth.

rama3319 avatar rama3319 commented on June 12, 2024 2

My entire team is having issues with aws-google-auth today. I tried resetting user cookies, uninstalled & installed aws-google-auth but none of the solution did not fix the issue. Can some one shed the light what is going on.
Error:

Google Password:
ERROR:root:'NoneType' object has no attribute 'get'
Traceback (most recent call last):
File "/Users//Library/Python/3.8/lib/python/site-packages/aws_google_auth/init.py", line 79, in cli
process_auth(args, config)
File "/Users/
/Library/Python/3.8/lib/python/site-packages/aws_google_auth/init.py", line 243, in process_auth
google_client.do_login()
File "/Users/***/Library/Python/3.8/lib/python/site-packages/aws_google_auth/google.py", line 256, in do_login
passwd_challenge_url = 'https://accounts.google.com' + form.get('action')
AttributeError: 'NoneType' object has no attribute 'get'

from aws-google-auth.

slikk66 avatar slikk66 commented on June 12, 2024 2

You need to apply the fix, something like this (uninstall old one first):

git clone [email protected]:ezequielsbarros/aws-google-auth.git
Cloning into 'aws-google-auth'...
    ...

cd aws-google-auth 
git checkout fix-js-background-param-in-challenge 
    ...

pip3 install -e .

then after install had to symlink to the bin which on my system is this:

cd /usr/local/bin
ln -s  /usr/local/Cellar/[email protected]/3.9.12/Frameworks/Python.framework/Versions/3.9/bin/aws-google-auth

then also add the --bg-response js_enabled param to the actual call to updated binary, thats how we're doing it. Or just replace file directly however you have it installed.

from aws-google-auth.

 avatar commented on June 12, 2024 2

I'm using this tool now. No need to deal w/ captcha and MFA as well. you guys can check https://www.leapp.cloud/

from aws-google-auth.

slikk66 avatar slikk66 commented on June 12, 2024 1

Yea, setting up a venv to see if we can regex the URL to image or something, the tag parsing seems fragile

from aws-google-auth.

moringaman avatar moringaman commented on June 12, 2024 1

Can you update the docker image on dockerhub to reflect the latest change?

from aws-google-auth.

tigum27 avatar tigum27 commented on June 12, 2024

same here

from aws-google-auth.

 avatar commented on June 12, 2024

same here

from aws-google-auth.

stan-spring avatar stan-spring commented on June 12, 2024

What if handle_captcha used open or xdg_open by launching a browser instead of trying to look for the CAPTCHA img src? Seems like this breaks everytime Google changes something in the page structure.

from aws-google-auth.

slikk66 avatar slikk66 commented on June 12, 2024

yep, broke

from aws-google-auth.

silviolleite avatar silviolleite commented on June 12, 2024

Same here

from aws-google-auth.

lopezm1 avatar lopezm1 commented on June 12, 2024

The amount of us staring at this page 👀 haha. Broken too.

I will try to help look for a fix.

from aws-google-auth.

rama3319 avatar rama3319 commented on June 12, 2024

We tried --bg-response js_enabled, this time we are able pass through password but failing at captcha. I tried 0.0.036 but no luck.
8TkaZpIgOTWqbSam4ZHxIiE3c4I-AqYzeoNfCOysf4o3Fre3IYtR4BwE3FRxYX6utGC2M
Captcha (case insensitive): undingent
ERROR:root:'NoneType' object has no attribute 'find_all'
Traceback (most recent call last):
File "/Users/rama/Library/Python/3.8/lib/python/site-packages/aws_google_auth/init.py", line 79, in cli
process_auth(args, config)
File "/Users/rama/Library/Python/3.8/lib/python/site-packages/aws_google_auth/init.py", line 243, in process_auth
google_client.do_login()
File "/Users/rama/Library/Python/3.8/lib/python/site-packages/aws_google_auth/google.py", line 291, in do_login
sess = self.handle_captcha(sess, payload)
File "/Users/rama/Library/Python/3.8/lib/python/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.

andybusuu avatar andybusuu commented on June 12, 2024

@slikk66 / @ezequielsbarros 's fix works for me 👍

docker run -ti --rm -v ~/.aws:/root/.aws python:3.10-buster /bin/bash
git clone https://github.com/ezequielsbarros/aws-google-auth.git
cd aws-google-auth
git checkout checkout fix-js-background-param-in-challenge
pip3 install -e .

aws-google-auth -k -a --idp-id ****** --sp-id ****** -R eu-west-1 -u andrew@***** -p **** -d 28800

UPDATE: This issue is fixed by #250

from aws-google-auth.

monkora avatar monkora commented on June 12, 2024

Same here

from aws-google-auth.

olegeech-me avatar olegeech-me commented on June 12, 2024

thank you @bityob, works like a charm

from aws-google-auth.

graimondo avatar graimondo commented on June 12, 2024

Can the PR approved?

from aws-google-auth.

ajoseph-uptycs avatar ajoseph-uptycs commented on June 12, 2024

@bityob Thank you ! this works.

from aws-google-auth.

stevemac007 avatar stevemac007 commented on June 12, 2024

This issue has been resolved with the release https://github.com/cevoaustralia/aws-google-auth/releases/tag/0.0.38

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.