Closed Anblak closed 2 years ago
Multi-recipient encryption assumes that you have an active 1:1 session with all recipients already. This is a reasonable assumption within Signal because SenderKey keys are always sent via 1:1 sessions, and since Turasa is using the actual Signal network you're responsible for this too. The registration IDs specifically are used by the server to detect if you're sending to a device that has been unlinked / relinked.
Before sending a multi-recipient message, make sure you have sessions for all participants, just as you would if you were going to send them individual 1:1 messages.
Does that solve your issue?
@jrose-signal Yep, thanks a lot!
@jrose-signal sorry, have one more question how to reproduce that? remove connected device and don't update session keys?
You should be able to reproduce by explicitly archiving the current session for a recipient, then immediately trying to send a multi-recipient message to them.
@jrose-signal repoduced, and to fix that - need to delete arhived session from the list or refresh that? (if refresh - than how?)
Refresh, by processing a new pre-key bundle.
[Meta: GitHub Issues isn't the best place for this sort of discussion; it's probably better for the Development section fo the unofficial forums at https://community.signalusers.org/.]
Hey! My team is using this lib as a part of Turasa project for very important project for Ukraine (mb you know a situation in a country)
We have numerous exceptions like:
Non-fatal Exception: java.lang.IllegalStateException: invalid state for call to sealed_sender_multi_recipient_encrypt to succeed: cannot get registration ID from session with 0730c772-7b3c-467a-bbbc-2b296bf0cd81.1 (maybe it was recently archived)
It's breaking our stability (what is very important for us) Please help with this
Full stacktrace: