Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get past "Error: NeedsBrowser" on login #62

Open
huntfx opened this issue Jan 3, 2024 · 3 comments
Open

Can't get past "Error: NeedsBrowser" on login #62

huntfx opened this issue Jan 3, 2024 · 3 comments

Comments

@huntfx
Copy link

huntfx commented Jan 3, 2024

Hey, reached an auth issue with two step verification. I see #37 is a related issue but it's been closed so this may be a slightly different problem. Basically I'll follow the instructions to log in and it just goes around in circles.

It seems as if I should be doing something extra?

  1. Run master_response = gpsoauth.perform_master_login(email, password, android_id)
{'Error': 'NeedsBrowser',
'Url': 'https://accounts.google.com/signin/continue?sarp=1&scc=1&continue=https://accounts.google.com/o/android/auth?hl%3Den_us%26xoauth_display_name%3DAndroid%2BLogin%2BService%26source%3DAndroid%2BLogin&plt=................',
'ErrorDetail': 'To access your account, you must sign in on the web. Touch Next to start browser sign-in.'
  1. Follow the link which opens up 2 step verification, even though I tried disabling it on my account
  2. Asks me to enter my account password again
  3. Gets stuck on "One moment please..."
  4. Running perform_master_login generates a new URL
@garron
Copy link

garron commented Feb 9, 2024

I'm getting the same error (when using gpsoauth via gkeepapi). Manually downgrading gpsoauth to 1.0.2 resolved the issue for me and allowed the login to complete successfully.

In case it's relevant: My account has 2-factor enabled and I'm using an app password.

@simon-weber
Copy link
Owner

Does 1.0.3 work? Or does that fail for you too?

If it does it sounds like #61 is causing problems.

@KapJI
Copy link
Contributor

KapJI commented Feb 12, 2024

I wonder if Connection and Accept headers need to be explicitly set to None. Need someone who has this issue to experiment with different options.

Ideally if someone can grab tcpdump, dump SSL key and check decrypted HTTP headers for both good and bad cases. To dump keys one needs to addcontext.keylog_filename = "sslkeys.txt" in AuthHTTPAdapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants