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

Google Chat integration has stopped working #82235

Closed
B00T5820485730 opened this issue Nov 17, 2022 · 17 comments · Fixed by #82645
Closed

Google Chat integration has stopped working #82235

B00T5820485730 opened this issue Nov 17, 2022 · 17 comments · Fixed by #82645

Comments

@B00T5820485730
Copy link

The problem

The Google Chat integration has stopped working. The hangouts.conversations entity is no longer displayed in Developer Tools -> States, and calling the Google Chat: Update service throws an error: "Failed to call service hangouts.update. Unknown error."

I tried restarting HassOS, disabling/enabling the integration, and removing/adding the integration. Authentication still works, but I'm not able to send messages. The integration stopped working some time during the day on 11/16, without any changes to my configuration.

What version of Home Assistant Core has the issue?

2022.11.3

What was the last working version of Home Assistant Core?

2022.11.3

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Google Chat

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?

No response

Additional information

No response

@home-assistant
Copy link

@StephenWetzel
Copy link
Contributor

Similar problem for me. Stopped working 11/15. I'm running Home Assistant Core 2022.10.5. The error in the logs is:

  File "/home/steve/.pyenv/versions/3.9.13/envs/homeassistant/lib/python3.9/site-packages/homeassistant/components/hangouts/hangouts_bot.py", line 252, in _async_send_message
    conversation = self._conversation_list.get(target[CONF_CONVERSATION_ID])
AttributeError: 'NoneType' object has no attribute 'get'

@djxela
Copy link

djxela commented Nov 18, 2022

I have problems with Hangouts too. Stopped working on 16.11. Im'm running 2022.11.3. There is no problems with login and password. After reload integration I have these logs:

Exception in async_handle_update_users_and_conversations when dispatching 'hangouts_connected': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/hangouts/hangouts_bot.py", line 352, in async_handle_update_users_and_conversations await self._async_list_conversations() File "/usr/src/homeassistant/homeassistant/components/hangouts/hangouts_bot.py", line 319, in _async_list_conversations ) = await hangups.build_user_conversation_list(self._client) File "/usr/local/lib/python3.10/site-packages/hangups/conversation.py", line 30, in build_user_conversation_list conv_states, sync_timestamp = await _sync_all_conversations(client) File "/usr/local/lib/python3.10/site-packages/hangups/conversation.py", line 110, in _sync_all_conversations response = await client.sync_recent_conversations(request) File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 674, in sync_recent_conversations await self._pb_request('conversations/syncrecentconversations', File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 415, in _pb_request res = await self._base_request( File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 471, in _base_request res = await self._session.fetch( File "/usr/local/lib/python3.10/site-packages/hangups/http_utils.py", line 89, in fetch raise exceptions.NetworkError( hangups.exceptions.NetworkError: Request return unexpected status: 403: Forbidden
Exception in async_handle_update_users_and_conversations when dispatching 'hangouts_connected': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/hangouts/hangouts_bot.py", line 352, in async_handle_update_users_and_conversations await self._async_list_conversations() File "/usr/src/homeassistant/homeassistant/components/hangouts/hangouts_bot.py", line 319, in _async_list_conversations ) = await hangups.build_user_conversation_list(self._client) File "/usr/local/lib/python3.10/site-packages/hangups/conversation.py", line 30, in build_user_conversation_list conv_states, sync_timestamp = await _sync_all_conversations(client) File "/usr/local/lib/python3.10/site-packages/hangups/conversation.py", line 110, in _sync_all_conversations response = await client.sync_recent_conversations(request) File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 674, in sync_recent_conversations await self._pb_request('conversations/syncrecentconversations', File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 415, in _pb_request res = await self._base_request( File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 471, in _base_request res = await self._session.fetch( File "/usr/local/lib/python3.10/site-packages/hangups/http_utils.py", line 67, in fetch async with self.fetch_raw(method, url, params=params, File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__ self._resp = await self._coro File "/usr/local/lib/python3.10/site-pac
```kages/aiohttp/client.py", line 399, in _request raise RuntimeError("Session is closed") RuntimeError: Session is closed

@compacthack
Copy link

compacthack commented Nov 18, 2022

My Google Chat integration stopped working about the same time too, I've tried remove / add, log back in, still no go, not sure if it is related but I'm getting these errors:-

2022-11-19 10:04:16.493 ERROR (MainThread) [homeassistant.util.logging] Exception in async_handle_update_users_and_conversations when dispatching 'hangouts_connected': ()
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/hangouts/hangouts_bot.py", line 352, in async_handle_update_users_and_conversations
await self._async_list_conversations()
File "/usr/src/homeassistant/homeassistant/components/hangouts/hangouts_bot.py", line 319, in _async_list_conversations
) = await hangups.build_user_conversation_list(self._client)
File "/usr/local/lib/python3.10/site-packages/hangups/conversation.py", line 30, in build_user_conversation_list
conv_states, sync_timestamp = await _sync_all_conversations(client)
File "/usr/local/lib/python3.10/site-packages/hangups/conversation.py", line 110, in _sync_all_conversations
response = await client.sync_recent_conversations(request)
File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 674, in sync_recent_conversations
await self._pb_request('conversations/syncrecentconversations',
File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 415, in _pb_request
res = await self._base_request(
File "/usr/local/lib/python3.10/site-packages/hangups/client.py", line 471, in _base_request
res = await self._session.fetch(
File "/usr/local/lib/python3.10/site-packages/hangups/http_utils.py", line 89, in fetch
raise exceptions.NetworkError(
hangups.exceptions.NetworkError: Request return unexpected status: 403: Forbidden

@h4de5
Copy link
Contributor

h4de5 commented Nov 19, 2022

can't say for how long the link on the integration page (https://accounts.google.com/o/oauth2/programmatic_auth?scope=https%3A%2F%2Fwww.google.com%2Faccounts%2FOAuthLogin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&client_id=936475272427.apps.googleusercontent.com&device_name=hangups) is not working anymore. but maybe this may help somebody to investigate. the app behind the integration could have been disabled.

@yp87
Copy link

yp87 commented Nov 19, 2022

same error here, since yesterday :/

@wrkn4alivn
Copy link

wrkn4alivn commented Nov 20, 2022

Because this integration depends on Hangups from tdryer, I believe this is the reason: tdryer/hangups#533

I am not sure why this integration was renamed "Google Chat". The underlying Hangups client reverse-engineered the Google Hangouts protocol, which was deprecated long ago and now appears to be turned down. To get this working again, the integration will likely have to be completely rewritten to use Google Chat APIs.

@compacthack
Copy link

compacthack commented Nov 20, 2022

I use Eion Robb's Google Chat plugin for Pidgin chat client and that is still working fine ? I'm no coder but If HA could abandon Hangups and jump on Eion's purple-googlechat that might get us back on the air. I'm sure it wouldn't be that easy.
https://github.com/EionRobb/purple-googlechat

People are now reporting that Elon's other Pidgin for Hangouts has recently stopped working, and He is asking people to change to his purple-googlechat plugin because the Hangouts API has been shut down by Google.
https://github.com/EionRobb/purple-hangouts

@misakm
Copy link

misakm commented Nov 23, 2022

Is there any update? I got the same issue 2022.6.6 2022-11-20 18:51:21 ERROR (MainThread) [homeassistant.util.logging] Exception in async_handle_update_users_and_conversations when dispatching 'hangouts_connected': ()

@skywurz
Copy link

skywurz commented Nov 23, 2022

Same issue. I hope its not actually built on hangouts as someone mentioned because Google did just shut it off.

@KuroSetsuna29
Copy link

Same issue. I hope its not actually built on hangouts as someone mentioned because Google did just shut it off.

Well its built on the hangups util library, which leverages the Hangouts protocol. Thats what probably cause it to stop working for everyone. To fix, it looks like someone will need to update the component to use a newer library that uses the Google Chat protocol.

@KuroSetsuna29
Copy link

To be clear, if I understand the the PR that closes this issue. It doesn't actually fix the issue, it is just saying that integration is no longer supported and is being removed?

@frenck
Copy link
Member

frenck commented Nov 25, 2022

it is just saying that integration is no longer supported and is being removed?

Correct. The API it uses has been shut down, the integration can no longer work. It has, therefore, been removed from our codebase and is pending removal for Home Assistant 2022.12.

The integration was labeled Google Chat, however, it was previous labels (and using) Google Hangouts.

This issue was closed by the removal PR for that reason.

../Frenck

@compacthack
Copy link

So long Google Hangouts / Chat, thanks for all the fish. Since it died a week or so back I've migrated over to a discord bot for notifications, so far it seems to work really well, no offence but the Android companion app Notifications aren't quite adequate yet, missing native imaging viewing & image log from within the companion app 🥺, but that could be just me..

@misakm
Copy link

misakm commented Nov 25, 2022

@compacthack - is Discord bot free and secure? What are other alternatives?

@wrkn4alivn
Copy link

wrkn4alivn commented Nov 25, 2022 via email

@skywurz
Copy link

skywurz commented Nov 25, 2022

I just moved everything to Discord. with node-red you can do commands from discord to HA
image

Edit:

The service command was easy to replace
service: notify.discord <--(The service will be named the bots name)
data:
message: "{{now().strftime("%m/%d/%Y - %r")}} : Aquarium Chiller Running for over 2 hours."
target: ["1234(its a long number you copy from discord)"]

@github-actions github-actions bot locked and limited conversation to collaborators Dec 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.