Bump apprise pin to >=1.9.8 (1.9.7 cannot post to Matrix v12 rooms) #125

Closed
opened 2026-10-05 01:58:34 +02:00 by adam · 1 comment
Owner

Summary

The apprise>=1.9.7 constraint in pyproject.toml resolves to exactly 1.9.7, which silently breaks the Apprise fanout for any Matrix room at room version 12. Bumping the constraint by one patch version fixes it.

Reproduction

  1. Run any homeserver that defaults new rooms to v12. Synapse 1.114+ with default_room_version: "12", or any setup fronted by Matrix Authentication Service, where v12 has been the default for a while.
  2. Create an unencrypted notification room. The room ID will be a bare !opaqueid with no :server suffix, per MSC4291 and the room v12 spec.
  3. Add an Apprise fanout target with a Matrix URL: matrixs://bot:pw@homeserver/%21opaqueid?hsreq=no
  4. Send any message that matches the fanout scope.

Expected: the message is forwarded to the Matrix room.

Actual: RT logs

apprise - WARNING - Failed to handshake with Matrix server: Page not found., error=404.
apprise - WARNING - Could not join Matrix room !opaqueid.
app.fanout.apprise_mod - WARNING - Apprise notification failed for module ...

Apprise's debug output shows it issued

POST https://homeserver/_matrix/client/v3/join/%21opaqueid%3ANone

It appended the literal string :None to the v12 room ID because it has no servername to fill in. Synapse then 404s with M_UNKNOWN: No known servers.

Root cause

Apprise 1.9.7 unconditionally enforces a :server suffix on Matrix room IDs and ignores ?hsreq=no. The fix landed upstream as caronc/apprise@9d9931a on 2026-02-19:

matrix:// homeserver requirement optional for room lookup (#1514) Following: https://spec.matrix.org/v1.17/rooms/v12/ Defaulting to regular matrix behavior; room lookup disabled with ?hsreq=no provided on URL

That commit ships in Apprise 1.9.8. RT's current apprise>=1.9.7 pin lets uv.lock resolve to 1.9.7, which predates the fix.

Fix

One-character bump in pyproject.toml:

-    "apprise>=1.9.7",
+    "apprise>=1.9.8",

Followed by uv lock --upgrade-package apprise.

Workaround for affected users today

cd /opt/remoteterm-meshcore
sudo uv sync --upgrade-package apprise
sudo systemctl restart remoteterm-meshcore

That brings the venv to 1.9.9 and confirmed fixes the join. The URL itself still needs ?hsreq=no:

matrixs://bot:pw@homeserver/%21opaqueid?hsreq=no

?hsreq=no is non-optional. Without it, Apprise (even on 1.9.8+) defaults to the legacy "force homeserver suffix" behavior for backwards compat with pre-v12 rooms.

Impact

Anyone running RT against their own homeserver hits this if the server uses a recent default room version. v12 is the upstream default for new Synapse installs and is shipped by default with Matrix Authentication Service, so this is the common case, not the edge case. The error messages ("Could not join Matrix room") and the underlying :None URL stamping are not obvious without running apprise -vvv against the same URL outside RT, which is what it took me to track down.

Optional: docs / placeholder hint

Once the pin is bumped, the Apprise fanout settings placeholder or help text should mention the v12 case. Something like "For Matrix room version 12 (servername-less room IDs), append ?hsreq=no to the URL." Otherwise the next person hitting this burns the same hour I did.

## Summary The `apprise>=1.9.7` constraint in `pyproject.toml` resolves to exactly 1.9.7, which silently breaks the Apprise fanout for any Matrix room at room version 12. Bumping the constraint by one patch version fixes it. ## Reproduction 1. Run any homeserver that defaults new rooms to v12. Synapse 1.114+ with `default_room_version: "12"`, or any setup fronted by Matrix Authentication Service, where v12 has been the default for a while. 2. Create an unencrypted notification room. The room ID will be a bare `!opaqueid` with no `:server` suffix, per [MSC4291](https://github.com/matrix-org/matrix-spec-proposals/pull/4291) and the room v12 spec. 3. Add an Apprise fanout target with a Matrix URL: `matrixs://bot:pw@homeserver/%21opaqueid?hsreq=no` 4. Send any message that matches the fanout scope. **Expected:** the message is forwarded to the Matrix room. **Actual:** RT logs ``` apprise - WARNING - Failed to handshake with Matrix server: Page not found., error=404. apprise - WARNING - Could not join Matrix room !opaqueid. app.fanout.apprise_mod - WARNING - Apprise notification failed for module ... ``` Apprise's debug output shows it issued ``` POST https://homeserver/_matrix/client/v3/join/%21opaqueid%3ANone ``` It appended the literal string `:None` to the v12 room ID because it has no servername to fill in. Synapse then 404s with `M_UNKNOWN: No known servers`. ## Root cause Apprise 1.9.7 unconditionally enforces a `:server` suffix on Matrix room IDs and ignores `?hsreq=no`. The fix landed upstream as [caronc/apprise@9d9931a](https://github.com/caronc/apprise/commit/9d9931aa5f09ddeba8833c6b28385a0382af3852) on 2026-02-19: > matrix:// homeserver requirement optional for room lookup (#1514) Following: https://spec.matrix.org/v1.17/rooms/v12/ Defaulting to regular matrix behavior; room lookup disabled with ?hsreq=no provided on URL That commit ships in **Apprise 1.9.8**. RT's current `apprise>=1.9.7` pin lets `uv.lock` resolve to 1.9.7, which predates the fix. ## Fix One-character bump in `pyproject.toml`: ```diff - "apprise>=1.9.7", + "apprise>=1.9.8", ``` Followed by `uv lock --upgrade-package apprise`. ## Workaround for affected users today ```bash cd /opt/remoteterm-meshcore sudo uv sync --upgrade-package apprise sudo systemctl restart remoteterm-meshcore ``` That brings the venv to 1.9.9 and confirmed fixes the join. The URL itself still needs `?hsreq=no`: ``` matrixs://bot:pw@homeserver/%21opaqueid?hsreq=no ``` `?hsreq=no` is non-optional. Without it, Apprise (even on 1.9.8+) defaults to the legacy "force homeserver suffix" behavior for backwards compat with pre-v12 rooms. ## Impact Anyone running RT against their own homeserver hits this if the server uses a recent default room version. v12 is the upstream default for new Synapse installs and is shipped by default with Matrix Authentication Service, so this is the common case, not the edge case. The error messages ("Could not join Matrix room") and the underlying `:None` URL stamping are not obvious without running `apprise -vvv` against the same URL outside RT, which is what it took me to track down. ## Optional: docs / placeholder hint Once the pin is bumped, the Apprise fanout settings placeholder or help text should mention the v12 case. Something like *"For Matrix room version 12 (servername-less room IDs), append `?hsreq=no` to the URL."* Otherwise the next person hitting this burns the same hour I did. <!-- github-sync-id:4235573087 -->
adam closed this issue 2026-10-05 01:58:35 +02:00
Author
Owner

Yay what a wonderfully complete issue; thank you! Merging a fix now.

Yay what a wonderfully complete issue; thank you! Merging a fix now. <!-- github-comment-id:4218790148 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Remote-Terminal-for-MeshCore#125