Key backup fails (using Hydrogen) #262
Labels
No labels
Android
CS::needs customer feedback
CS::needs follow up
CS::needs on prem installation
CS::waiting
Chrome
Design:: Ready
Design:: in progress
Design::UX
E2EE
Edge
Firefox
GDPR
Iteration 13 IM
Linux
MacOS
Need::Discussion
Need::Steps to reproduce
Need::Upstream fix
Needs:: Planning
Needs::Dev-Team
Needs::More information
Needs::Priority
Needs::Product
Needs::Refinement
Needs::Severity
Priority::1-Critical
Priority::2-Max
Priority::3-Impending
Priority::4-High
Priority::5-Medium
Priority::6-Low
Priority::7-None
Progress::Backlog
Progress::Review
Progress::Started
Progress::Testing
Progress::Triage
Progress::Waiting
Reporter::Sentry
Safari
Target::Community
Target::Customer
Target::Internal
Target::PoC
Target::Security
Team:Customer-Success
Team:Design
Team:Infrastructure
Team:Instant-Messaging
Team:Product
Team:Workflows
Type::Bug
Type::Design
Type::Documentation
Type::Feature
Type::Improvement
Type::Support
Type::Tests
Windows
blocked
blocked-by-spec
cla-signed
conduit
contribution::advanced
contribution::easy
contribution::help needed
from::review
iOS
p::ti-tenant
performance
product::triage
proposal
refactor
release-blocker
s: dart_openapi_codegen
s::Famedly-Patient
s::Org-Directory
s::Passport-Generator
s::Requeuest
s:CRM
s:Famedly-App
s:Famedly-Web
s:Fhiroxide
s:Fhiroxide-cli
s:Fhiroxide-client
s:Fhirs
s:Hedwig
s:LISA
s:Matrix-Dart-SDK
s:Role-Manager
s:Synapse
s:User-Directory
s:WFS-Matrix
s:Workflow Engine
s:dtls
s:famedly-error
s:fcm-shared-isolate
s:matrix-api-lite
s:multiple-tab-detector
s:native-imaging
severity::1
severity::2
severity::3
severity::4
technical-debt
voip
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Matthias/conduit#262
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
I tried to enable key backup in Hydrogen (because it's a lighter browser-based client I can use on my phone).
In 0.3.0 it always failed, but in 0.3.0-next (commit
6e106b5
) Hydrogen can enable it but the backup fails with the following error:There is no error in the Conduit logs. Relevant part from the Apache forwarding proxy logs:
System Configuration
Conduit Version: 0.3.0-next (commit
6e106b5
)Database backend: sqlite
The endpoint is implemented, but not registered as a route (
client_server::add_backup_keys_route
).@timokoesters Is there a reason for that? If not, I can make a MR that adds it.
assigned to @M0dEx
@paulvt
I have created a branch with the route added:
262-missing_room_keys_endpoint
.Could you kindly try to build the conduit container using that branch and trying the key backup again?
I have tested it locally (set up secure backup in Element and then enabled key backup in Hydrogen) and everything seems to work correctly now.
The route seems to have accidentally gotten lost in
b8411ae2fd
.created branch
262-key-backup-fails-using-hydrogen
to address this issuementioned in merge request !346
mentioned in commit
2fcb3c8b93
When running 0.3.0-next from commit
2fcb3c8
, I still get the same HTTP 405 response.Yes, I did a git pull and built it anew. Then tested Hydrogen again by nuking the existing backup and retrying. Saw the same 405 in the logs.
Correct me if I am wrong, but key backup cannot be set up with Hydrogen. It can only be set up with Element and then activated in Hydrogen, no?
I am unsure, how the backup came to be. I only use Hydrogen with this session, but I logged in with Element Web now. It says:
In Hydrogen, it says:
Note that I checked the setting "Backup my device as well", which may allow the backup to be enabled fine but not the additional session/device?
If I disable the backup, it suddenly comes with another error that might be useful:
So that sounds like also an unstable route is involved 🤔
There's something weird going on.
I just tested Hydrogen key backup with the device backup enabled and both setting it up and disabling it went without a hitch.
Could you retest it again and check the Conduit log again? If there is a 405 on the
/_matrix/client/r0/room_keys/keys
route, it is most probably an issue with your container/setup, as I just cannot replicate that behaviour on the latest commit of the next branch.Yes, did a rebuild, reinstall. Still the same, really weird.
Conduit and Apache logs interleaved:
It is a pity that Conduit does not show the Git commit in the admin room, but I'm really sure it is
2fcb3c8
I do use the SQLite back-end still btw, but I guess that shouldn't matter.
Is there a way to let it log the supported routes, like what Rocket does?
@paulvt
I apologize for this taking so long, I am in the middle of the exam period for this semester, but I might have found the underlying issue causing this.
Hydrogen uses the r0 backup key endpoint (
/_matrix/client/r0/room_keys/keys
), instead of the v3 backup key endpoint (/_matrix/client/v3/room_keys/keys
), which Conduit "listens" on. Figured this out by doing a quick test with curl.This is not correct behaviour from Hydrogen, as per specs the v3 endpoint should be used.
All in all, I think making an issue on the Hydrogen repo would be a good next step.
I created the corresponding issue here: https://github.com/vector-im/hydrogen-web/issues/741
Essentially, conduit only implements
GET ../r0/room_keys/keys
, notPUT
, as per the spec.Never thought about the endpoint being fixed, but the issue not being fixed because it didn't use it 😆.
Thanks! This can be closed then?