element-x-android
element-x-android copied to clipboard
UnifiedPush not working with Conversations
Steps to reproduce
- Select "Conversations" as UnifiedPush provider
- Run notifications Troubleshoot tests
Outcome
What did you expect?
Working notifications (they work with other demo programs)
What happened instead?
Error
"Fail to check the gateway
https://up.conversations.im/_matrix/push/v1/notify: HTTP 404 Not Found"
Apparently the URL for using conversations as a push gateway is wrong. Maybe it's the "_matrix"? or is "v1" a too old version? Anyway, testing with https://f-droid.org/packages/org.unifiedpush.example/ works.
Your phone model
Pixe
Operating system version
Android 14 AP2A.240905.003.F1
Application version and app store
Element X Version 0.6.3 (from playstore)
Homeserver
matrix.org
Will you send logs?
Yes
Are you willing to provide a PR?
No
This is because ntfy includes a matrix gateway (https://github.com/binwiederhier/ntfy/blob/630f2957deb670dcacfe0a338091d7561f176b9c/server/server_matrix.go#L16) that is, it receives calls to /_matrix/push/v1/notify and sends them out via UnifiedPush.
conversations (https://codeberg.org/iNPUTmice/up) does not contain a matrix push gateway, and that is needed for EXA. So it won't work. Either conversations' up needs to include a Matrix gateway, or the Matrix homeserver needs to be taught to directly speak to a UnifiedPush server.
The Matrix gateway is what is called the "push gateway" in the diagram at https://spec.matrix.org/latest/push-gateway-api/#overview
conversations (https://codeberg.org/iNPUTmice/up) does not contain a matrix push gateway, and that is needed for EXA. So it won't work. Either conversations' up needs to include a Matrix gateway, or the Matrix homeserver needs to be taught to directly speak to a UnifiedPush server.
What is EXA? I see the same issue with NextPush, which works fine as a UnifiedPush provider with normal Element on android, so I'm confused why NextPush would need matrix-specific changes for ElementX to work?
Looking at the code, it should fall back to use the standard matrix.org gateway if the UnifiedPush server does not provide one. Not sure what is happening there, I am not a developer myself. P.S. EXA is short for Element-x-android
At some point this was working with EXA and NextPush but seem to have stopped.
I'm having this problem too. It started after I updated Element X to the most recent version.
Looking at the code, it should fall back to use the standard matrix.org gateway if the UnifiedPush server does not provide one. Not sure what is happening there, I am not a developer myself.
https://github.com/element-hq/element-x-android/issues/3185 seems to request what you describe.
The cause of this issue is that EAX now expect a self-hosted matrix push gateway and never fallback to a default one: https://github.com/element-hq/element-x-android/pull/3388 Reverting this should fix this issue
I have a similar issue with the gCompat UP-Distributor (https://unifiedpush.org/users/distributors/fcm/): When I run Settings > Notifications > Troubleshoot, I get "https://fcm.distributor.unifiedpush.org/_matrix/push/v1/notify is not a Matrix gateway".
See-also: https://codeberg.org/UnifiedPush/fcm-distributor/issues/1
Fixed in #4101