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 login - 'Error': 'BadAuthentication' #95

Closed
hugostegeman opened this issue Mar 19, 2021 · 104 comments
Closed

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

hugostegeman opened this issue Mar 19, 2021 · 104 comments
Labels
bug Something isn't working

Comments

@hugostegeman
Copy link

hi,

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

@DurgNomis-drol
Copy link
Collaborator

Yes it is, Username/Email should be janedoe@gmail.com and password should be your google password. It is though highly recommend to use an app password instead.

If you have Two Factor Authentication enabled. I think you can only use an app password. Link to app password guide

@hugostegeman
Copy link
Author

Ik still cant login
Screenshot_2021-03-19-12-09-51-054_io.homeassistant.companion.android.jpg

@DurgNomis-drol
Copy link
Collaborator

DurgNomis-drol commented Mar 19, 2021

Can you please check the logs in Home Assistant. You can find them under Configuration and then logs. Please choose Load Full Home Assistant Logs. And past them here.

@ArnyminerZ
Copy link
Collaborator

@hugostegeman if you are using a Gmail account, try logging it without adding @gmail.com, maybe that should do the trick.
Also, as @DurgNomis-drol pointed out, if you are using 2FA authentication, generate an app password.

@hugostegeman
Copy link
Author

hugostegeman commented Mar 19, 2021

I tried it with and without @gmail.com but i still cant login.
2FA authentication also does not work.
my log looks like this:

2021-03-19 13:40:28 WARNING (MainThread) [homeassistant.loader] You are using a custom integration hacs 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
2021-03-19 13:40:28 WARNING (MainThread) [homeassistant.loader] You are using a custom integration sonoff 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
2021-03-19 13:40:28 WARNING (MainThread) [homeassistant.loader] You are using 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
2021-03-19 13:40:28 WARNING (MainThread) [homeassistant.loader] You are using a custom integration googlehome 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
2021-03-19 13:40:28 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'googlehome'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'googlehome'
2021-03-19 13:40:29 ERROR (Recorder) [homeassistant.components.recorder.util] The database at //config/home-assistant_v2.db is corrupt or malformed.
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 168, in validate_sqlite_database
run_checks_on_open_db(dbpath, conn.cursor(), db_integrity_check)
File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 179, in run_checks_on_open_db
sanity_check_passed = basic_sanity_check(cursor)
File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 157, in basic_sanity_check
cursor.execute(f"SELECT * FROM {table} LIMIT 1;") # nosec # not injection
sqlite3.OperationalError: no such table: states
2021-03-19 13:40:29 ERROR (Recorder) [homeassistant.components.recorder.util] The system will rename the corrupt database file //config/home-assistant_v2.db to //config/home-assistant_v2.db.corrupt.2021-03-19T12:40:29.350868+00:00 in order to allow startup to proceed
2021-03-19 13:40:29 WARNING (MainThread) [homeassistant.components.http] The 'base_url' option is deprecated, please remove it from your configuration
2021-03-19 13:40:33 WARNING (MainThread) [homeassistant.loader] You are using a custom integration afvalbeheer 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
2021-03-19 13:40:33 ERROR (SyncWorker_5) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:41 WARNING (MainThread) [homeassistant.loader] You are using a custom integration saver 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
2021-03-19 13:40:41 WARNING (MainThread) [homeassistant.loader] You are using a custom integration nodered 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
2021-03-19 13:40:45 ERROR (MainThread) [homeassistant.components.wled] Error fetching wled data: Invalid response from API: Error occurred while communicating with WLED device at 192.168.2.24
2021-03-19 13:40:45 WARNING (MainThread) [homeassistant.config_entries] Config entry 'mengpaneel' for wled integration not ready yet. Retrying in background
2021-03-19 13:40:49 ERROR (SyncWorker_0) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_5) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_4) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_2) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_7) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_0) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_3) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_10) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_2) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_6) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'
2021-03-19 13:40:49 ERROR (SyncWorker_0) [pymodbus.client.sync] [Errno 2] could not open port /dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0: [Errno 2] No such file or directory: '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0'

@DurgNomis-drol
Copy link
Collaborator

Which version of Home Assistant are you using?

Please try to remove it and reinstalled it again. It seems there is an issue with its name here:

2021-03-19 13:40:28 WARNING (MainThread) [homeassistant.loader] You are using a custom integration googlehome 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
2021-03-19 13:40:28 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'googlehome'. This will not be allowed in a future version of Home Assistant. Please report this to the maintainer of 'googlehome' <- Problem here. Is name should be google_home.

Also please use code blocks when embedding logs. Markdown Guide

@hugostegeman
Copy link
Author

Im running core version 2021.3.4 and supervisor version 2021.3.6
After reinstall I get a config error:

google

@DurgNomis-drol
Copy link
Collaborator

DurgNomis-drol commented Mar 19, 2021

@hugostegeman The integration is not named googlehome, but google_home. The underscore is important. Are you installing it through HACS? If so please uninstall it and then remove the repository in HACS and re-add it and try installing it again.

@hugostegeman
Copy link
Author

I installed it by using hacs and even after removing en reinstalling i cant login.
Can it have something to do with the country rules from google or something im from NL?
maybe manuel install of the intergration can help?

@DurgNomis-drol
Copy link
Collaborator

DurgNomis-drol commented Mar 19, 2021

I don't think it matters which country you are in as long as the Google sells it devices in that country it should be supported.

You can try, but i doubt it will change any thing as installing through HACS always gives you the latest version.

Can you please try adding this to your configuration.yaml file:

logger:
  default: info
  logs:
    # log level for mielelogic_laundry
     custom_components.google_home: debug

And then post back the logs.

This will enabled a lot more information in the logs and will give os a clearer understanding of why it does not work.

@WRLPDZ
Copy link

WRLPDZ commented Mar 20, 2021

Hi,
Same problem.
Already try with
as login: user_name, full email
as password: app token, master token, password to account

Logger set to:

logger:
  default: debug
  logs:
    # log level for mielelogic_laundry
     custom_components.google_home: debug

In logs only:

2021-03-20 19:09:44 ERROR (SyncWorker_16) [glocaltokens.client] [!] Could not get master token.
2021-03-20 19:09:44 ERROR (MainThread) [custom_components.google_home]

@DurgNomis-drol
Copy link
Collaborator

DurgNomis-drol commented Mar 20, 2021

@WRLPDZ

When have you installed this integration?

Can you also add:

logger:
  default: info
  logs:
     custom_components.google_home: debug
     glocaltokens: debug <- Add this line

This will enable logs for the underlaying package glocaltokens.

EDIT: Also please use code blocks when pasting your log into the issue 😄

@WRLPDZ
Copy link

WRLPDZ commented Mar 21, 2021

Still the same. Debug level changed.

2021-03-21 14:33:10 ERROR (SyncWorker_48) [glocaltokens.client] [!] Could not get master token.
2021-03-21 14:33:10 ERROR (MainThread) [custom_components.google_home]

@DurgNomis-drol
Copy link
Collaborator

@ArnyminerZ @leikoilja Any ideas on what could cause this? Besides not using the latest version, where it should have been fixed?
I think we would need more information to know exactly why this is happening, if this problem have indeed risen again 🤔

@WRLPDZ
Copy link

WRLPDZ commented Mar 21, 2021

Core
Version
core-2021.3.4

Supervisor
Version
supervisor-2021.03.6

logger: default: debug logs: custom_components.google_home: debug glocaltokens: debug

Nothing more is showing in logs:
2021-03-21 15:22:35 ERROR (SyncWorker_40) [glocaltokens.client] [!] Could not get master token.
2021-03-21 15:22:35 ERROR (MainThread) [custom_components.google_home]

I'm trying to use this because Drakulix/googlehome not showing me correct values but it's connected.

@DurgNomis-drol
Copy link
Collaborator

DurgNomis-drol commented Mar 21, 2021

@WRLPDZ Can you please remove Drakulix/googlehome's integration and restart just to make sure that it is not effecting this integration. It is important that you remove both the files and how it was installed, if in configuration.yaml then remove it from here, or if via config flow, remove it from there before deleting the files. 😄 And then remove this integration and re add it again. And remember to clear browser cache.

@WRLPDZ
Copy link

WRLPDZ commented Mar 21, 2021

All integrations corelated wit google home uninstalled.
Host restarted. Browser cache cleared.
ha-google-home installed again. Result the same.
For now I will pass.

@ArnyminerZ
Copy link
Collaborator

I'm pretty sure there's an issue with @hugostegeman Home Assistant's database, and maybe that's the issue, but since @WRLPDZ has the same issue, maybe there's something more there...

Also, @WRLPDZ are you sure there aren't any more logs regarding the integration in your Home Assistant's register?

@DurgNomis-drol @leikoilja maybe we should add more debugging to glocaltokens just in case something like this happens. At debug level, so it doesn't bother normally, but more info should be provided. Will open an issue there and work on it ASAP. Then we may update ha-google-home's dependency version, and take further look.

@leikoilja
Copy link
Owner

leikoilja commented Mar 22, 2021

Great call, @ArnyminerZ, thank you! 💥
I am also adding an issue here to include more documentation helpers for people who open issues to provide more info that will help us resolve issues such as in a feature

@cs42
Copy link

cs42 commented Mar 22, 2021

I have the same issue. Just installed this via HACS, but can't log in. In log I only see:

2021-03-22 10:48:13 ERROR (SyncWorker_1) [glocaltokens.client] [!] Could not get master token.
2021-03-22 10:48:13 ERROR (MainThread) [custom_components.google_home]

I'm too using 2FA with an app password specific for this extension. Further I've configured google assistant without nabu casa.

@ArnyminerZ
Copy link
Collaborator

Hi, @cs42, thank you for the information. We are currently working on this issue, you can follow the progress at glocaltokens#48.

Also, please, use code blocks for logs, not blockquotes. 😇

@leikoilja
Copy link
Owner

@cs42, @bacco007, there is now a new release of the integration.
Please upgrade to 1.0.1 using HACS.
Also make sure you have the logger enabled in your configuration.yaml:

logger:
  default: info
  logs:
    custom_components.google_home: debug

That will now print much more elaborate logs. Please post them here (IMPORTANT make sure not to paste your sensitive info here as master_token or login). These elaborate logs (paste as code block) will help us get a better understanding why you are not able to login

@cs42
Copy link

cs42 commented Mar 25, 2021

Here are the logs:

2021-03-25 11:14:35 DEBUG (MainThread) [glocaltokens.client] Initializing new GLocalAuthenticationTokens instance.
2021-03-25 11:14:35 DEBUG (MainThread) [glocaltokens.client] Set self username to "c******************", password to "f***************", master_token to "" and android_id to
2021-03-25 11:14:35 DEBUG (MainThread) [glocaltokens.client] Set self access_token, homegraph, access_token_date and homegraph_date to None
2021-03-25 11:14:35 DEBUG (SyncWorker_20) [glocaltokens.client] There is not any stored master_token, logging in...
2021-03-25 11:14:35 DEBUG (SyncWorker_20) [glocaltokens.client] There is not any stored android_id, generating a new one
2021-03-25 11:14:35 DEBUG (SyncWorker_20) [glocaltokens.client] Generating mac...
2021-03-25 11:14:35 DEBUG (SyncWorker_20) [glocaltokens.client] Generated mac: 525CFDC290AA48
2021-03-25 11:14:36 ERROR (SyncWorker_20) [glocaltokens.client] [!] Could not get master token.
2021-03-25 11:14:36 DEBUG (SyncWorker_20) [glocaltokens.client] Request response: {'Error': 'BadAuthentication'}

I have a 2FA setup and created a new app password for this test.

@Edo78
Copy link

Edo78 commented Mar 25, 2021

I was watching this because I was experiencing the very same issue. I have a 2FA and I can't login with my username and the generated app password.

I just updated to 1.0.1, add the logger to the config and now I can login and I can't understand why.

If I can provide any more info or if you need any tests at all feel free to ask and I'll be glad to help

@brianhanifin
Copy link
Contributor

brianhanifin commented Mar 25, 2021

ha-google-home 1.01

  • chardet 4.0.0
  • urllib3 1.26.2
  • glocaltokens package not found

Home Assistant OS 5.12

  • core-2021.3.4
  • supervisor-2021.03.6

Here's my log to add to the fire. ;) I am trying to login using an app password.

2021-03-25 08:42:35 WARNING (MainThread) [homeassistant.loader] You are using 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
2021-03-25 08:42:35 INFO (SyncWorker_19) [homeassistant.util.package] Attempting install of glocaltokens==0.2.6
2021-03-25 08:43:15 DEBUG (MainThread) [glocaltokens.client] Initializing new GLocalAuthenticationTokens instance.
2021-03-25 08:43:15 DEBUG (MainThread) [glocaltokens.client] Set self username to "b******************", password to "g***************", master_token to "" and android_id to 
2021-03-25 08:43:15 DEBUG (MainThread) [glocaltokens.client] Set self access_token, homegraph, access_token_date and homegraph_date to None
2021-03-25 08:43:15 DEBUG (SyncWorker_25) [glocaltokens.client] There is not any stored master_token, logging in...
2021-03-25 08:43:15 DEBUG (SyncWorker_25) [glocaltokens.client] There is not any stored android_id, generating a new one
2021-03-25 08:43:15 DEBUG (SyncWorker_25) [glocaltokens.client] Generating mac...
2021-03-25 08:43:15 DEBUG (SyncWorker_25) [glocaltokens.client] Generated mac: E0400A08AB5949
2021-03-25 08:43:15 ERROR (SyncWorker_25) [glocaltokens.client] [!] Could not get master token.
2021-03-25 08:43:15 DEBUG (SyncWorker_25) [glocaltokens.client] Request response: {'Error': 'BadAuthentication'}
2021-03-25 08:43:15 ERROR (MainThread) [custom_components.google_home] 

For good measure I also deleted yesterday's app password, and generated a new one.

2021-03-25 08:50:14 DEBUG (MainThread) [glocaltokens.client] Initializing new GLocalAuthenticationTokens instance.
2021-03-25 08:50:14 DEBUG (MainThread) [glocaltokens.client] Set self username to "b******************", password to "n***************", master_token to "" and android_id to 
2021-03-25 08:50:14 DEBUG (MainThread) [glocaltokens.client] Set self access_token, homegraph, access_token_date and homegraph_date to None
2021-03-25 08:50:14 DEBUG (SyncWorker_17) [glocaltokens.client] There is not any stored master_token, logging in...
2021-03-25 08:50:14 DEBUG (SyncWorker_17) [glocaltokens.client] There is not any stored android_id, generating a new one
2021-03-25 08:50:14 DEBUG (SyncWorker_17) [glocaltokens.client] Generating mac...
2021-03-25 08:50:14 DEBUG (SyncWorker_17) [glocaltokens.client] Generated mac: 33FF090A894B45
2021-03-25 08:50:14 ERROR (SyncWorker_17) [glocaltokens.client] [!] Could not get master token.
2021-03-25 08:50:14 DEBUG (SyncWorker_17) [glocaltokens.client] Request response: {'Error': 'BadAuthentication'}
2021-03-25 08:50:14 ERROR (MainThread) [custom_components.google_home] 

@brianhanifin
Copy link
Contributor

brianhanifin commented Mar 25, 2021

Related logging tips:

  • To get colored coded output like mine, start your log output block with ```python (instead of just ```).
  • Install LogExpert, open home-assistant.log in your config folder, then use glocaltokens|google_home as your Text filter to include logs from both glocaltokens and google_home.

@notherealmarco
Copy link

I'm having the same issue

@joggs
Copy link

joggs commented Apr 1, 2021 via email

@leikoilja
Copy link
Owner

@joggs, it's a funny behaviour but i m pretty sure not caused from ha-google-home integration :D If you feel so, please make a separate ticket with more details.
Happy it works for you now 💥

@leikoilja
Copy link
Owner

@joggs, sorry, i'll remove your messages since they are not related to BadAuthentication error. Please open a new issue and follow it's template by providing all necessary logs so we'd see what problem you are encountering :)

Repository owner deleted a comment from joggs Apr 1, 2021
Repository owner deleted a comment from joggs Apr 1, 2021
@brianhanifin
Copy link
Contributor

I also have an LG Smartthinq Custom Component installed. I was successfull with authenticating the Google Home integration today, after the recent LG Smartthinq update. (Was there a conflicting verison of a requirement?)

Anyway, I'm looking forward to exploring it today. :)

@myklebosten
Copy link

I also have an LG Smartthinq Custom Component installed. I was successfull with authenticating the Google Home integration today, after the recent LG Smartthinq update. (Was there a conflicting verison of a requirement?)

Anyway, I'm looking forward to exploring it today. :)

Same behaviour here. Tested seting up the Google Home integration unsuccessfully just before updating smartthinq. After updating and a reboot, the setup of Google Home completed without a hitch :)

@stboch
Copy link

stboch commented Apr 3, 2021

@leikoilja I think maybe add to the readme under troubleshooting login problems ensure if your using the LG smartthinq custom component that the version is 0.6.7 or newer.

@leikoilja
Copy link
Owner

leikoilja commented Apr 3, 2021

@stboch, we have just added a remark to the troubleshooting section to refer to this issue if someone still gets BadAuthentication problem. As we saw from @nckslater, LG smartthinq is not the only custom integration that can cause that behavior, I think we are better off generalizing in the troubleshooting section and just refer people here. So far it was been working well for many :)

@KapJI
Copy link
Collaborator

KapJI commented Apr 7, 2021

Ok, I'm closing this. Actions we've taken to remediate this:

  • Added troubleshooting section in README.
  • Pointed out to LG ThinQ integration author that they shouldn't alter urllib3's DEFAULT_CIPHERS. They have fixed this already in the new version.
  • Updated gpsoauth to use fixed list of ciphers to prevent similar issues in the future.

Please update to 1.3.0 where this should be solved.

@KapJI KapJI closed this as completed Apr 7, 2021
@agarbato
Copy link

I just installed the integration but I have the same issue.
"Username/Password is incorrect. If your google account has 2FA enabled please generate app password"

Integration version 1.9.10
Home Assistant Core 2022.5.5

Multifactor enabled with app password.

This is what I get on logs with debug enabled:

2022-05-19 21:41:03 DEBUG (MainThread) [glocaltokens.client] Initializing new GLocalAuthenticationTokens instance.
2022-05-19 21:41:03 DEBUG (MainThread) [glocaltokens.client] Set GLocalAuthenticationTokens client access_token, homegraph, access_token_date and homegraph_date to None
2022-05-19 21:41:03 DEBUG (MainThread) [glocaltokens.client] Set GLocalAuthenticationTokens client username to "a***********************", password to "r***************", master_token to "" and android_id to 
2022-05-19 21:41:03 DEBUG (SyncWorker_22) [glocaltokens.client] There is no stored master_token, logging in using username and password
2022-05-19 21:41:03 DEBUG (SyncWorker_22) [glocaltokens.client] There is no stored android_id, generating a new one
2022-05-19 21:41:03 DEBUG (SyncWorker_22) [glocaltokens.client] Generating android id...
2022-05-19 21:41:03 DEBUG (SyncWorker_22) [glocaltokens.client] Generated android id: eb89dc38eabe277b
2022-05-19 21:41:03 ERROR (SyncWorker_22) [glocaltokens.client] [!] Could not get master token.
2022-05-19 21:41:03 DEBUG (SyncWorker_22) [glocaltokens.client] Request response: {'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=AKgnsbsDJKWaUmGA7j9ZQgmP21WBsuifozeb2bYmmZzbwe7DG54J4FJL5qFRuxh-rLsByr-YBgeMTMSgj15nDZQITNbpAJbjQSZBp2yUgG7EC8eS2IBjvg3Cyv4RdTjWdsRl1XAyvsuv', 'ErrorDetail': 'To access your account, you must sign in on the web. Touch Next to start browser sign-in.'}
2022-05-19 21:41:03 ERROR (MainThread) [custom_components.google_home] 

To access your account you must sign in on the web but I don't see any Next on the integration to login.
Tried to access the link by browser, I can pass the multifactor auth but then nothing happens and I still have the same error. Tried to reinstall it but no lock. I don't have LgThinQ integration installed.

@ArnyminerZ
Copy link
Collaborator

@agarbato this issue has been detected, and it is being addressed at leikoilja/glocaltokens#245.

@adam91holt
Copy link

It looks like the glocaltokens package has been fixed now.

We just need to update that package to 0.6.4.

@ArnyminerZ / @leikoilja are you able to assist in releasing a new version?

Thanks!

@leikoilja
Copy link
Owner

yep, i was in the middle of doing so, @adam91holt, but some things got on the way :) Will do it tomorrow morning and then update you here as well :)

@adam91holt
Copy link

Beautiful! Thanks for your hard work @leikoilja 🚀🚀🚀

@leikoilja
Copy link
Owner

Fixed in ha-google-home v1.9.11 🚀
https://github.com/leikoilja/ha-google-home/releases/tag/v1.9.11

Please update to the latest version and verify it works :)

@Neolanco
Copy link

Neolanco commented Jun 1, 2022

Don't know if I'm missing something, but I still get the error 'needsbrowser' afer updating

@ArnyminerZ
Copy link
Collaborator

@Neolanco have you rebooted HA?

@Neolanco
Copy link

Neolanco commented Jun 1, 2022

Yes, I've also reinstalled the integration
Don't know if this matters, but I'm using ha os on a pi 4

@agarbato
Copy link

agarbato commented Jun 1, 2022

Same here. Updated, restarted HA, restarted VM but still get the same exact error.

If you need me to do some tests or provide info about my env I'm happy to help.

Home Assistant Core 2022.5.5
Home Assistant Supervisor 2022.05.3
Home Assistant OS 8.1
Kernel version 5.15.41

@nathanmarlor
Copy link

Same here - have tested gpsoauth 1.0.1/1.0.2 using this and still can't generate a master token using app password.

@agarbato
Copy link

agarbato commented Jun 1, 2022

with v1.9.12 it's fixed for me! Thanks a lot for your effort :-)

@RaddedMC
Copy link

RaddedMC commented Jun 2, 2022

Just updated, I'm recieving a ValueError that 'plaintext is too long'. My email address is 34 characters long lol 😅

Used my main account and it works, but I'd prefer (as you recommend) to use an alt. For now I'll just make another account but figured I should mention this,

@leikoilja
Copy link
Owner

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
Copy link
Collaborator

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

@Fonsos
Copy link

Fonsos commented Oct 12, 2022

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
Copy link
Owner

@Fonsos please move it to #599

Repository owner locked as resolved and limited conversation to collaborators Oct 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests