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

matrix integration broken since 2023.10 update #101873

Closed
cpw opened this issue Oct 12, 2023 · 7 comments · Fixed by #101928
Closed

matrix integration broken since 2023.10 update #101873

cpw opened this issue Oct 12, 2023 · 7 comments · Fixed by #101928

Comments

@cpw
Copy link
Contributor

cpw commented Oct 12, 2023

The problem

Matrix integrations and workflows are broken since the 2023.10 update. Likely due to PR #72797 - room aliases are no longer being properly decoded into actual room names. This has broken all my notifications. There is no mention in the update logs about the change from the legacy client to the new client.

2023-10-12 08:46:40.376 ERROR (MainThread) [homeassistant.components.matrix] Unable to deliver message to room '#alias:myhomeserver.com': RoomSendError: M_FORBIDDEN Unknown room

Examining the matrix logs I can see that there has been a change:
Before:
PUT /_matrix/client/r0/rooms/%21nmEOLlfxYtvtKCmctQ%3Amyhomeserver.com/send/m.room.message/2301696884540650 HTTP/1.0" "matrix-python-sdk/0.4.0" [5 dbevts]

After:
method='PUT' uri='/_matrix/client/r0/rooms/%23alias:myhomeserver.com/send/m.room.message/7f2ee38a-dc2b-459c-ac01-6c6aa9859b08?access_token=<redacted>' clientproto='HTTP/1.0' site='8008'> SynapseError: 403 - Unknown room

This is very frustrating, as all notifications from HA have now ceased.

What version of Home Assistant Core has the issue?

core-2023.10.1

What was the last working version of Home Assistant Core?

core-2023.9.1

What type of installation are you running?

Home Assistant Core

Integration causing the issue

matrix

Link to integration documentation on our website

https://www.home-assistant.io/integrations/matrix/

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

Hey there @PaarthShah, mind taking a look at this issue as it has been labeled with an integration (matrix) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of matrix can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign matrix Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


matrix documentation
matrix source
(message by IssueLinks)

@Mathijs0
Copy link

I have the same problem.
Temperary solution that somehow seems to works for me is using the "!roomid:server.com" and not the "#roomalias:server.com"

@PaarthShah
Copy link
Contributor

Acknowledged, I'm sorry for the frustration.

I have a fix in mind to resolve the aliases into room ids automatically, and I can probably make that PR today.

Just for debugging purposes, can you provide some extra information about:

  • What version of Synapse your homeserver is (based on that SynapseError)
  • Whether the alias of your room has a domain part equal to your homeserver name or not
  • Room version of your aliased room

None of these matter for the fix, but I'm going to try to be thorough and make sure I test this

@Mathijs0
Copy link

I do realy appreciate that this integration is getting some attention. So thanks @PaarthShah for your work.

@dkowis
Copy link

dkowis commented Oct 13, 2023

I can tell you I have this problem too.

  • Synapse 1.94.0+focal1
  • The alias of my room does have a local part equal to my homeserver
  • Room version: 10

I just created the room today, and was puzzled as to why all the things weren't working :)

@PaarthShah
Copy link
Contributor

PR opened for this issue: #101928

@PaarthShah
Copy link
Contributor

For further visibility: the fix for this was included with the 2023.11 release of Home Assistant.

https://www.home-assistant.io/changelogs/core-2023.11

@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2023
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.

4 participants