-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Cannot verify new session, initiated from either direction #29625
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
Comments
Thank you for the bug report! I have been investigating this today. I have a couple of discoveries, but no clear explanation yet. First, Machine A has lots of lines like this in its logs:
So it looks like the one-time keys for that device have got messed up - I don't know whether this might have caused the failure to verify. I don't know why these one-time keys have got messed up, but it will probably be fixed if you sign out and sign in again on Machine A (which makes a new "device") and reset your identity as you sign in. If that doesn't fix the problem, please could you try sending logs again? The logs we have for Machine A and Machine B don't overlap in time, so I can't actually trace a single verification request through and figure out exactly what happened:
Notes to myself or whoever looks into this more: I see logs like this on the receiving side:
The relevant code says:
|
I have been putting off writing an answer because I currently cant reboot Machine A to boot my windows install. However, for a week now I suspect that I may have botched up the operating system part of the issue description out of habit. Does the logs perhaps include something (maybe the user agent) that indicate what OS was that coming from? For now, I have logged out on Machine B, then back in, and I was able to confirm the verification, for which the prompt came very quickly on Machine A linux system, somewhere under 5 seconds. The verification could also be completed in a short time without much waiting. If I have sent Machine A logs from element-web running in a browser on linux, then I cannot reproduce the issue anymore. |
Machine A is Thanks for following up! |
Ok, I can still reproduce this. Logging in on Machine B, after selecting to verify with another device, Machine A still does not show that there is a verification requrest. Sent new logs from both devices, in case it is useful.
Currently I dont see such a message in the browser console of Machine A (when filtering for "One time key").
I'm still seeing such logs.
It is not critical for me to fix this login session. Would it help your work if I kept being logged in to this session to be able to help with debugging? |
@mpeter50 I'm looking at your most recent set of logs. One thing I notice is that the clock on machine A seems to be set two hours in the future. This shouldn't be a major problem, but it certainly makes debugging harder... |
From the most recent set of logs: 2025-04-25T18:16:22.351Z login on Machine B completes
2025-04-25T18:36:39.292Z machine A receives, and ignores, verification request:
2025-04-25T18:51:57.331Z machine A sends verification request:
2025-04-25T18:52:10.927Z machine B receives, and ignores, verification request:
|
In fact, this is (I think) exactly what the problem is. We ignore incoming verification requests with a timestamp more than 10 minutes ago, or more than 5 minutes in the future. |
Closing for now as it appears to be due to the incorrect timestamp. Let us know if you still have problems after you fix your clock. |
Sorry for that. Its because windows insists storing local time in the system clock, even if I tell it to store UTC time there because thats what linux more sensibly does. Nowadays I use linux more, and got tired of researching why windows does not respect the registry settings it should to fix that.
That makes sense actually. Could you perhaps add a log statement about it? My clock cannot be fixed because windows is buggy, and for unknown reasons it does not take into account settings (1, 2, 3) that it should. |
Adding a log line is easy; indeed if you wanted to open a PR that would be appreciated. The location in question is https://github.com/matrix-org/matrix-rust-sdk/blob/main/crates/matrix-sdk-crypto/src/verification/machine.rs#L356; that The problem is that receiving "old" verification requests is somewhat expected, when you open a client that's been offline for a while, and we don't really want to be bugging the user with verification requests which have long since expired, or with warnings that we are ignoring them. |
That sounds reasonable, thanks for the explanation. I'll open an MR soon. |
In element-hq/element-web#29625 it was found to be useful to give more visibility to this kind of verification error. Signed-off-by: mpeter50 <[email protected]>
In element-hq/element-web#29625 it was found to be useful to give more visibility to this kind of verification error. Signed-off-by: mpeter50 <[email protected]>
Steps to reproduce
Outcome
What did you expect?
I expected to get the verification prompt in the top left corner of Element Web.
What happened instead?
I did not get any such prompt.
Currently, because of #29624, I can not log in and initialize encryption on Machine B.
Operating system
Windows 10 (Machine A) and openSUSE Leap (Machine B)
Browser information
Firefox
URL for webapp
https://riot.grin.hu
Application version
1.11.95
Homeserver
https://matrix.grin.hu
Will you send logs?
Yes
The text was updated successfully, but these errors were encountered: