Skip to content
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

"Re-request encryption keys from your other devices." never succeeds #6593

Closed
kannes opened this issue Apr 24, 2018 · 4 comments
Closed

"Re-request encryption keys from your other devices." never succeeds #6593

kannes opened this issue Apr 24, 2018 · 4 comments
Labels
A-E2EE P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@kannes
Copy link

kannes commented Apr 24, 2018

Description

One of my devices seems to have lost its keys and shows "Re-request encryption keys from your other devices." under encrypted messages. I tried clicking that many times in the past days but never ever received anything on the other devices (-desktop and Android).

Version information

  • Platform: Desktop

  • OS: Arch Linux

  • matrix-react-sdk version: <local>

  • riot-web version: 0.14.1

  • olm version: 2.2.1

@kannes
Copy link
Author

kannes commented Apr 24, 2018

On the device that says
** Unable to decrypt: The sender's device has not sent us the keys for this message. **
where I clicked
Re-request encryption keys from your other devices.?

Sending cancellation for key request for !stripped:matrix.org / stripped/stripped+stripped to [@stripped:matrix.org:*] (cancellation id stripped.stripped)
rageshake.js:65 Looking for queued outgoing room key requests
rageshake.js:65 Requesting keys for !stripped:matrix.org / stripped/stripped+stripped from [@stripped:matrix.org:*](id  stripped.stripped)
rageshake.js:65 Looking for queued outgoing room key requests
rageshake.js:65 No more outgoing room key requests
rageshake.js:65 m.room_key_request cancellation for @stripped:matrix.org:stripped (id stripped.stripped)

It says
Key request sent.?
now and the messages are still not decrypted.

Another online device says

m.room_key_request cancellation for @stripped:matrix.org:stripped (id stripped.stripped) indexeddb-local-backend.js?stripped:277
Persisting sync data up to  stripped rageshake.js:65
Presence: unavailable

I cannot even chat with myself between these two devices. All my devices are verified on both of them.

@lampholder
Copy link
Member

Your other devices will only prompt you to share those keys if they have copies of the keys themselves - otherwise they'll do nothing.

So I wonder if perhaps the re-request encryption keys feature is 'working', but you've fallen foul of a separate E2E bug 😢

Can you file a rageshake if you haven't already and send in your logs to supplement this bug report? And can you confirm that you are in an E2E room and messages sent from one device can't be viewed by another of your devices?

@lampholder lampholder added T-Defect P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround A-E2EE labels Apr 25, 2018
@kannes
Copy link
Author

kannes commented Apr 26, 2018

I won't submit a full log, there are so many cryptic IDs and my nicknames in it. I wish there was a privacy-sensitive way of sharing bug reports...
Below I stripped all IDs and names to get a reasonable level of privacy.
Please tell me which things I have to check for matches between the devices.

In a room of just "me" with device A and device B. On device A I cannot decrypt messages from device B or any of my other older E2E room contacts.

After sending a message from device B

Log of device A (where the message is not decrypted):

rageshake.js:65 Error decrypting event (id=$STRIPPED:matrix.org): DecryptionError[msg: The sender's device has not sent us the keys for this message., session: /STRIPPED|STRIPPED/STRIPPED/STRIPPED]
e.(anonymous function) @ rageshake.js:65
(anonymous) @ event.js:450
r @ runtime.js:65
(anonymous) @ runtime.js:299
e.(anonymous function) @ runtime.js:117
o @ util.js:16
l._promiseRejected @ generators.js:107
i._settlePromise @ promise.js:576
i._settlePromise0 @ promise.js:614
i._settlePromises @ promise.js:689
r._drainQueue @ async.js:133
r._drainQueues @ async.js:143
drainQueues @ async.js:17
rageshake.js:65 enqueueing key request for !STRIPPED:matrix.org / STRIPPED/STRIPPED/STRIPPED
rageshake.js:65 Looking for queued outgoing room key requests
rageshake.js:65 Requesting keys for !STRIPPED:matrix.org / STRIPPED/STRIPPED/STRIPPED from [@STRIPPED:matrix.org:*](id STRIPPED.69)
rageshake.js:65 Looking for queued outgoing room key requests
rageshake.js:65 No more outgoing room key requests
rageshake.js:65 m.room_key_request from @STRIPPED:matrix.org:STRIPPED for !STRIPPED:matrix.org / STRIPPED/STRIPPED/STRIPPED (id STRIPPED.69)
rageshake.js:65 room key request for unknown session !STRIPPED:matrix.org / STRIPPED/STRIPPED/STRIPPED
rageshake.js:65 Error decrypting event (id=undefined): DecryptionError[msg: Not included in recipients]
e.(anonymous function) @ rageshake.js:65
(anonymous) @ event.js:450
r @ runtime.js:65
(anonymous) @ runtime.js:299
e.(anonymous function) @ runtime.js:117
o @ util.js:16
l._promiseRejected @ generators.js:107
r._drainQueue @ async.js:138
r._drainQueues @ async.js:143
drainQueues @ async.js:17

Log of device B:

sendEvent of type m.room.message in !STRIPPED:matrix.org with txnId STRIPPED.45
rageshake.js:65 Starting to encrypt event for !STRIPPED:matrix.org
rageshake.js:65 downloadKeys: already have all necessary keys
rageshake.js:65 setting pendingEvent status to encrypting in !STRIPPED:matrix.org
rageshake.js:65 Starting new megolm session for room !STRIPPED:matrix.org
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid +STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Completed megolm keyshare in !STRIPPED:matrix.org (slice 1/1)
rageshake.js:65 setting pendingEvent status to sending in !STRIPPED:matrix.org
rageshake.js:65 Event sent to !STRIPPED:matrix.org with event id $STRIPPED:matrix.org
rageshake.js:65 setting pendingEvent status to sent in !STRIPPED:matrix.org
rageshake.js:65 m.room_key_request from @STRIPPED:matrix.org:STRIPPED for !STRIPPED:matrix.org / STRIPPED/STRIPPED/STRIPPED (id STRIPPED.69)
rageshake.js:65 device is already verified: sharing keys
rageshake.js:65 sharing keys for session /STRIPPED|STRIPPED/STRIPPED/STRIPPED with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid +STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED

Sending a message from device A

Log of device A

sendEvent of type m.room.message in !STRIPPED:matrix.org with txnId STRIPPED.70
rageshake.js:65 Starting to encrypt event for !STRIPPED:matrix.org
rageshake.js:65 downloadKeys: already have all necessary keys
rageshake.js:65 setting pendingEvent status to encrypting in !STRIPPED:matrix.org
rageshake.js:65 Starting new megolm session for room !STRIPPED:matrix.org
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 share keys with device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED/STRIPPED+STRIPPED+STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED/STRIPPED/STRIPPED/STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED+STRIPPED+STRIPPED/STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Using sessionid STRIPPED/STRIPPED for device @STRIPPED:matrix.org:STRIPPED
rageshake.js:65 Completed megolm keyshare in !STRIPPED:matrix.org (slice 1/1)
rageshake.js:65 setting pendingEvent status to sending in !STRIPPED:matrix.org
rageshake.js:65 Event sent to !STRIPPED:matrix.org with event id $STRIPPED:matrix.org
rageshake.js:65 setting pendingEvent status to sent in !STRIPPED:matrix.org

Log of device B (where the message is decrypted but shown with a yellow triangle):

Decrypted Olm message from STRIPPED+STRIPPED+STRIPPED with session STRIPPED/STRIPPED
rageshake.js:65 Adding key for megolm session STRIPPED+STRIPPED+STRIPPED|STRIPPED

If I click the triangle I get:

End-to-end encryption information
Event information

User ID	@STRIPPED:matrix.org
Curve25519 identity key	STRIPPED+STRIPPED+STRIPPED
Claimed Ed25519 fingerprint key	STRIPPED+STRIPPED+STRIPPED/STRIPPED
Algorithm	m.megolm.v1.aes-sha2
Session ID	STRIPPED
Sender device information

unknown device

and "OK" as the only button.

Clicking on "Re-request encryption keys from your other devices.?" on device A for any of the messages of device B

Log of device A:

rageshake.js:65 Sending cancellation for key request for !STRIPPED:matrix.org / STRIPPED/STRIPPED/STRIPPED to [@STRIPPED:matrix.org:*] (cancellation id STRIPPED.72)
rageshake.js:65 Looking for queued outgoing room key requests
rageshake.js:65 Requesting keys for !STRIPPED:matrix.org / STRIPPED/STRIPPED/STRIPPED from [@STRIPPED:matrix.org:*](id STRIPPED.69)
rageshake.js:65 Looking for queued outgoing room key requests
rageshake.js:65 No more outgoing room key requests
rageshake.js:65 m.room_key_request cancellation for @STRIPPED:matrix.org:STRIPPED (id STRIPPED.69)

The message does not get decrypted.

Log of device B:

m.room_key_request cancellation for @STRIPPED:matrix.org:STRIPPED (id STRIPPED.69)

@uhoreg
Copy link
Member

uhoreg commented Mar 7, 2019

closing in favour of #6838 (which is fixed in the develop branch of matrix-js-sdk)

@uhoreg uhoreg closed this as completed Mar 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE P1 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

No branches or pull requests

3 participants