core
core copied to clipboard
Hangouts OAuth connectivity issue
The problem
Google Chat/Hangouts is no longer working. Unable to authenticate using OAuth.
What version of Home Assistant Core has the issue?
2022.9.5
What was the last working version of Home Assistant Core?
2022.8.x
What type of installation are you running?
Home Assistant Container
Integration causing the issue
hangouts
Link to integration documentation on our website
https://www.home-assistant.io/integrations/hangouts
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Logger: homeassistant.config_entries
Source: components/hangouts/hangouts_bot.py:212
First occurred: 8:52:01 AM (1 occurrences)
Last logged: 8:52:01 AM
Error setting up entry [email protected] for hangouts
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/hangups/auth.py", line 388, in _make_token_request
r.raise_for_status()
File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://accounts.google.com/o/oauth2/token
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/hangups/auth.py", line 195, in get_auth
access_token = _auth_with_refresh_token(session, refresh_token)
File "/usr/local/lib/python3.10/site-packages/hangups/auth.py", line 356, in _auth_with_refresh_token
res = _make_token_request(session, token_request_data)
File "/usr/local/lib/python3.10/site-packages/hangups/auth.py", line 390, in _make_token_request
raise GoogleAuthError('Token request failed: {}'.format(e))
hangups.auth.GoogleAuthError: Token request failed: 400 Client Error: Bad Request for url: https://accounts.google.com/o/oauth2/token
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/hangups/auth.py", line 268, in submit_form
form = self._page.soup.select(form_selector)[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 357, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/hangouts/__init__.py", line 132, in async_setup_entry
await bot.async_connect()
File "/usr/src/homeassistant/homeassistant/components/hangouts/hangouts_bot.py", line 212, in async_connect
session = await self.hass.async_add_executor_job(
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/hangups/auth.py", line 204, in get_auth
authorization_code = _get_authorization_code(
File "/usr/local/lib/python3.10/site-packages/hangups/auth.py", line 317, in _get_authorization_code
browser.submit_form(FORM_SELECTOR, {PASSWORD_SELECTOR: password})
File "/usr/local/lib/python3.10/site-packages/hangups/auth.py", line 270, in submit_form
raise GoogleAuthError(
hangups.auth.GoogleAuthError: Failed to find form '#gaia_loginform' in page
Additional information
No response
hangouts documentation hangouts source (message by IssueLinks)