core: Unable to authenticate Hangouts
Home Assistant release with the issue: 0.86.3, 0.84.5, 0.82.0, 0.81.0, 0.80.3
Last working Home Assistant release (if known): Never
Operating environment (Hass.io/Docker/Windows/etc.): Hass.io VMDK image
Component/platform: Hangouts
Description of problem: Unable to authenticate. Using G Suite account, No 2 Factor, Have logged in and used hangouts with the account, Have tried over four weeks leaving days in between each attempt.
Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
hangouts:
intents:
ColorLight:
sentences:
- Change the lights to [the color] {color}
Traceback (if applicable):
2018-10-23 10:35:07 INFO (SyncWorker_0) [hangups.auth] Authenticating with refresh token
2018-10-23 10:35:07 INFO (SyncWorker_0) [hangups.auth] Failed to authenticate using refresh token: Refresh token not found
2018-10-23 10:35:07 INFO (SyncWorker_0) [hangups.auth] Authenticating with credentials
2018-10-23 10:35:08 INFO (SyncWorker_0) [hangups.auth] Submitting form on page 'https://accounts.google.com/ServiceLogin'
2018-10-23 10:35:08 INFO (SyncWorker_0) [hangups.auth] Page contains forms: ['gaia_loginform']
2018-10-23 10:35:08 INFO (SyncWorker_0) [hangups.auth] Page contains inputs: [None, None, None, None, None, None, None, None, None, 'profile-information', 'session-state', None, '_utf8', 'bgresponse', 'Email', 'Passwd-hidden', 'next']
2018-10-23 10:35:08 INFO (SyncWorker_0) [hangups.auth] Submitting form on page 'https://accounts.google.com/signin/v1/lookup'
2018-10-23 10:35:08 INFO (SyncWorker_0) [hangups.auth] Page contains forms: ['gaia_loginform']
2018-10-23 10:35:08 INFO (SyncWorker_0) [hangups.auth] Page contains inputs: [None, None, None, None, None, None, None, None, None, None, 'profile-information', 'session-state', '_utf8', 'bgresponse', 'Email-hidden', 'Passwd', 'signIn', None]
Additional information:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 6
- Comments: 35 (2 by maintainers)
Same thing for me. I’ve tried using both a normal Google Gmail account, as well as a GSuite account. No 2 factor authentication on either account. Tried multiple times over a given day, tried waiting several days, and up to a week. Issue still persists. Same errors as the issue reported here.
Tried on 0.80.1, 0.80.2 and 0.80.3, issue continued. Updated to 0.81 and tested, issue persits. Running Hass.io on a Raspberry Pi 3. I’m located in the USA.
“Invalid Login, please try again.”
This closed issue also suggests a way to sign in “manually” but I can’t finf a way to make it work with hass.io due to the limited options from the docker container: https://github.com/home-assistant/home-assistant/issues/16249
Okay, so I made a bit of progress. I was able to use https://gist.github.com/tdryer/b4d4b5944ac22e3b2f3a9dda53e03e87 to manually generate a refresh token using the procedure here https://github.com/tdryer/hangups/issues/350#issuecomment-323553771. However, now that I have that token, I don’t know what to do with it? Can I just place that file somewhere in home assistant? I’m running home-assistant in docker, so it would be great if I could just map/mount a file somewhere …
So this issue seems to stem from the way hangups (the library handling interaction with google hangouts) operates. They previously depended on the google authentication form being designed in a particular way . As an example the use an ID to select the form element within which they can input the supplied email address.
Problem is it seems Google does not used this fixed id any longer. Users of hangups also noticed this. Good news is the authors of library added (in a new version) some way to handle this case by allowing manual tokens. So it’s kind of an automatic way to handle what @rufik did. I am working on a PR that would allow for providing the token via the interface. I have a crude implementation which gets me in, but it needs some fine-tuning to be production ready.
So for somebody who has this working, could you tell me where the
refresh_tokenfile is placed on the file system? I now have a token from the manual method, but have no idea where to put it.