leikoilja / ha-google-home

Home Assistant Google Home custom component
MIT License
434 stars 73 forks source link

Can't login - 'Error': 'BadAuthentication' #95

Closed hugostegeman closed 3 years ago

hugostegeman commented 3 years ago

hi,

I cant login with my google account. is the google username the same as your google account .......@gmail.com?

leikoilja commented 2 years ago

haha, thanks for mentioning it @RaddedMC. Feel free to open a new issue or better a PR implementing either support for long email addresses (respecting google email length limitations) or adding a help text/validation message explaining what went wrong :) It would be nice to mention that in README as well :)

ArnyminerZ commented 2 years ago

@leikoilja yeah, the check should not be complicated, we have already done that for long passwords.

Fonsos commented 2 years ago

Hi, I had this working but I uninstalled it and I have reinstalled it after a while, I can't log in.

I have created an app password, but I get errors.

I'm on: Home Assistant 2022.10.3 Supervisor 2022.10.0 Operating System 9.2 Frontend 20221010.0 - latest I run this on a VM.

I got this on the Log:

Este error se originó a partir de una integración personalizada.

Logger: glocaltokens.client
Source: custom_components/google_home/api.py:73
Integration: Google Home (documentation, issues)
First occurred: 10:39:47 (3 occurrences)
Last logged: 10:40:58

[!] Could not get master token.

And this:

Este error se originó a partir de una integración personalizada.

Logger: custom_components.google_home
Source: custom_components/google_home/config_flow.py:65
Integration: Google Home (documentation, issues)
First occurred: 10:39:47 (3 occurrences)
Last logged: 10:40:58

And on the full log:

2022-10-12 10:38:12.024 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration google_home which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-10-12 10:39:47.141 DEBUG (MainThread) [glocaltokens.client] Initializing new GLocalAuthenticationTokens instance.
2022-10-12 10:39:47.141 DEBUG (MainThread) [glocaltokens.client] Set GLocalAuthenticationTokens client access_token, homegraph, access_token_date and homegraph_date to None
2022-10-12 10:39:47.141 DEBUG (MainThread) [glocaltokens.client] Set GLocalAuthenticationTokens client username to "a**********************", password to "y***************", master_token to "" and android_id to
2022-10-12 10:39:47.149 DEBUG (SyncWorker_1) [glocaltokens.client] There is no stored master_token, logging in using username and password
2022-10-12 10:39:47.149 DEBUG (SyncWorker_1) [glocaltokens.client] There is no stored android_id, generating a new one
2022-10-12 10:39:47.149 DEBUG (SyncWorker_1) [glocaltokens.client] Generating android id...
2022-10-12 10:39:47.149 DEBUG (SyncWorker_1) [glocaltokens.client] Generated android id: 3e0d925c5981cc49
2022-10-12 10:39:47.306 ERROR (SyncWorker_1) [glocaltokens.client] [!] Could not get master token.
2022-10-12 10:39:47.308 DEBUG (SyncWorker_1) [glocaltokens.client] Request response: {'Error': 'BadAuthentication'}
2022-10-12 10:39:47.308 ERROR (MainThread) [custom_components.google_home]
2022-10-12 10:40:38.538 DEBUG (MainThread) [glocaltokens.client] Initializing new GLocalAuthenticationTokens instance.
2022-10-12 10:40:38.538 DEBUG (MainThread) [glocaltokens.client] Set GLocalAuthenticationTokens client access_token, homegraph, access_token_date and homegraph_date to None
2022-10-12 10:40:38.538 DEBUG (MainThread) [glocaltokens.client] Set GLocalAuthenticationTokens client username to "a**********************", password to "v***************", master_token to "" and android_id to
2022-10-12 10:40:38.539 DEBUG (SyncWorker_3) [glocaltokens.client] There is no stored master_token, logging in using username and password
2022-10-12 10:40:38.539 DEBUG (SyncWorker_3) [glocaltokens.client] There is no stored android_id, generating a new one
2022-10-12 10:40:38.539 DEBUG (SyncWorker_3) [glocaltokens.client] Generating android id...
2022-10-12 10:40:38.539 DEBUG (SyncWorker_3) [glocaltokens.client] Generated android id: 2f17c0f09f04cbab
2022-10-12 10:40:38.730 ERROR (SyncWorker_3) [glocaltokens.client] [!] Could not get master token.
2022-10-12 10:40:38.731 DEBUG (SyncWorker_3) [glocaltokens.client] Request response: {'Error': 'BadAuthentication'}
2022-10-12 10:40:38.731 ERROR (MainThread) [custom_components.google_home]
2022-10-12 10:40:57.917 DEBUG (MainThread) [glocaltokens.client] Initializing new GLocalAuthenticationTokens instance.
2022-10-12 10:40:57.917 DEBUG (MainThread) [glocaltokens.client] Set GLocalAuthenticationTokens client access_token, homegraph, access_token_date and homegraph_date to None
2022-10-12 10:40:57.917 DEBUG (MainThread) [glocaltokens.client] Set GLocalAuthenticationTokens client username to "a***********************", password to "%****************", master_token to "" and android_id to
2022-10-12 10:40:57.917 DEBUG (SyncWorker_3) [glocaltokens.client] There is no stored master_token, logging in using username and password
2022-10-12 10:40:57.917 DEBUG (SyncWorker_3) [glocaltokens.client] There is no stored android_id, generating a new one
2022-10-12 10:40:57.917 DEBUG (SyncWorker_3) [glocaltokens.client] Generating android id...
2022-10-12 10:40:57.918 DEBUG (SyncWorker_3) [glocaltokens.client] Generated android id: d965db2f3fd61914
2022-10-12 10:40:58.038 ERROR (SyncWorker_3) [glocaltokens.client] [!] Could not get master token.
2022-10-12 10:40:58.039 DEBUG (SyncWorker_3) [glocaltokens.client] Request response: {'Error': 'BadAuthentication'}
2022-10-12 10:40:58.039 ERROR (MainThread) [custom_components.google_home]
leikoilja commented 2 years ago

@Fonsos please move it to https://github.com/leikoilja/ha-google-home/issues/599