home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.83k stars 30.91k forks source link

Matrix notifications can no longer send images #127480

Closed neubi4 closed 1 month ago

neubi4 commented 1 month ago

The problem

Sending a matrix notification with an image

  - data:
      message: Kamera Alarm!
      data:
        images:
          - /config/www/camera/snapshot_carport_snapshots_main.jpg
    action: notify.matrix_notify

no longer works with 2024.10.0.

Home Assistant Reports this error:

2024-10-03 20:04:18.362 ERROR (MainThread) [homeassistant.components.matrix] Unable to upload image to the homeserver: UploadError: M_UNRECOGNIZED Unrecognized request

My Homeserver is running Synapse Version 1.116.0. I can see the error in the logs:

2024-10-03 20:04:18,366 - synapse.http.server - 130 - INFO - POST-8 - <XForwardedForRequest at 0x7fb63e576b50 method='POST' uri='/_matrix/client/v1/media/upload?filename=snapshot_carport_snapshots_main.jpg' clientproto='HTTP/1.1' site='8008'> SynapseError: 404 - Unrecognized request

I only get the message as an matrix notification without the image. This used to work in 2024.9.x.

Maxbe this is related to #125555 in which this change was made: https://github.com/matrix-nio/matrix-nio/pull/520

What version of Home Assistant Core has the issue?

core-2024.10.0

What was the last working version of Home Assistant Core?

core-2024.9.0

What type of installation are you running?

Home Assistant OS

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

- data:
      message: Kamera Alarm!
      data:
        images:
          - /config/www/camera/snapshot_carport_snapshots_main.jpg
    action: notify.matrix_notify

Anything in the logs that might be useful for us?

2024-10-03 20:04:18.362 ERROR (MainThread) [homeassistant.components.matrix] Unable to upload image to the homeserver: UploadError: M_UNRECOGNIZED Unrecognized request

Additional information

No response

home-assistant[bot] commented 1 month ago

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. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


matrix documentation matrix source (message by IssueLinks)

PaarthShah commented 1 month ago

Ahhhh, shoot, right. That was related to https://github.com/matrix-nio/matrix-nio/pull/523 (fixed by @nexy7574). I'll get this bumped.

PaarthShah commented 1 month ago

@home-assistant add-label problem in dependency