OMEMO after Phone restore: no messages sent / received / shown on a 2nd device #2227

Open
dennisguse opened this Issue Jan 8, 2017 · 7 comments

Projects

None yet

5 participants

@dennisguse
dennisguse commented Jan 8, 2017 edited

General information

  • Version: eg 1.15.2
  • Device: Google Nexus 5 (STOCK 6.0.1) and XT1039 (CM14.1)
  • Server name: NA
  • Server software: NA
  • Installed server modules: NA
  • Conversations source: F-Droid

Steps to reproduce

  1. Initial: Everything was working smoothly using OMEMO
  2. Restored backup Titanium of XT1039 due to issues with CM upgrade
    (Accounts were enabled during the Backup)

Result:
Encryption via OMEMO was not possible anymore while OTR and Unencrypted worked nicely.
On sending a message, both devices reported send while the other never received / showed the message.
No error information was shown.

SOLUTION: To solve this issue, I reset the OMEMO crypto keys on both devices.

My guess is that the AXOTL ratchet got out of sync due to the restore and thus the receiving device could not decrypt the message.
An error dialog would have been nice (at least on the hopefully receiving device).

PS: I did not try to reproduce this issue OR gathered logcat before resolving this issue by resetting the OMEMO keys.

@dennisguse dennisguse changed the title from OMEMO: no messages sent / received / shown to OMEMO after Phone restore: no messages sent / received / shown on a 2nd device Jan 8, 2017
@mimi89999
Contributor

@dennisguse Before making a backup, you need to disable all the accounts in Conversations, so that during the backup process or after, the keys aren't changed. You can re-enable them only after restoring.

@dennisguse

@mimi89999 You are right, the accounts were enabled during the backup.
Nevertheless, due to the lack of an error message, I needed me almost two weeks before I figured out that resetting the crypto keys might help.

@mimi89999
Contributor

@dennisguse Such a case is almost impossible to detect for Conversations... How can Conversations know, that the issue is on it's side and not with the client of the other contact?

@iNPUTmice
Member

if you - or someone else - ever gets around to reproducing this bug please provide the adb logcat for this. And especially the Axolotl error messages. Maybe we can detect those messages 'from the future' and recreate the session.

@mimi89999
Contributor

One day I will back up my Android Virtual Device, send myself some messages and then run the AVD from the backup and check the logcat...

@Fenisu
Fenisu commented Feb 9, 2017

I just reproduced this bug but I don't really know how. It was not restoring a backup but something between recreating keys, enabling/disabling presence on one side.

There was no real error message but this is the logpart that was printed when the client received a message but was not displayed:

02-09 08:43:16.156 30330-16011/eu.siacs.conversations D/conversations: AxolotlService (receivingjabberid@domain.tld): Account: receivingjabberid@domain.tld/phone No axolotl session found while parsing received message eu.siacs.conversations.crypto.axolotl.XmppAxolotlMessage@f19351d

and this is the part from the phone sending the message:
02-09 08:43:16.598 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): Finding devices without session for receivingjabberid@domain.tld 02-09 08:43:16.599 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): Found device receivingjabberid@domain.tld:666380496 02-09 08:43:16.599 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): skipping over receivingjabberid@domain.tld:666380496 because it's broken 02-09 08:43:16.601 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): Found device receivingjabberid@domain.tld:1042696153 02-09 08:43:16.601 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): skipping over receivingjabberid@domain.tld:1042696153 because it's broken 02-09 08:43:16.602 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): Found device receivingjabberid@domain.tld:1752857033 02-09 08:43:16.602 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): skipping over receivingjabberid@domain.tld:1752857033 because it's broken 02-09 08:43:16.603 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): Found device receivingjabberid@domain.tld:379405069 02-09 08:43:16.604 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): skipping over receivingjabberid@domain.tld:379405069 because it's broken 02-09 08:43:16.605 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): Found device sendingjabberid@domain.tld:1977950999 02-09 08:43:16.605 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): skipping over sendingjabberid@domain.tld:1977950999 because it's broken 02-09 08:43:16.608 862 862 D conversations: AxolotlService (sendingjabberid@domain.tld): Cache miss: 8eb8ed4a-da12-494d-9ae2-1476e6347ee1

@sokai
sokai commented Feb 17, 2017

I had the same problem (and logcat output) after restoring a Titanium backup. :-|
Only resetting my OMEMO keys (in Conversations) solved that.
But now I have to tell all people about my new key and that's (a little bit) annoying. – Better to see a solution without resetting the keys.
Thanks!

Here is my relevant part of logcat:

02-17 12:51:29.981 D/conversations(25078): AxolotlService (MY_ANOMYMISED_JID): Finding devices without session for REMOTE_ANOMYMISED_JID
02-17 12:51:29.982 D/conversations(25078): AxolotlService (MY_ANOMYMISED_JID): Cache miss: f2b1176d-cfff-4760-8183-1588ebe32bf2
02-17 12:51:30.053 D/conversations(25078): AxolotlService (MY_ANOMYMISED_JID): Generated message, caching: f2b1176d-cfff-4760-8183-1588ebe32bf2
02-17 12:51:30.054 D/conversations(25078): AxolotlService (MY_ANOMYMISED_JID): Cache hit: f2b1176d-cfff-4760-8183-1588ebe32bf2
[…]
02-17 12:51:56.640 W/conversations(25078): AxolotlService (MY_ANOMYMISED_JID): Failed to decrypt message from REMOTE_ANOMYMISED_JID: Error decrypting WhisperMessage InvalidMessageException: No valid sessions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment