whisperfish / presage

A high-level Rust library to help write clients for the Signal Messenger.
GNU Affero General Public License v3.0
123 stars 24 forks source link

Primary device mode possibly broken #269

Open Schmiddiii opened 1 month ago

Schmiddiii commented 1 month ago

See the downstream Flare issue, especially the logs:

[2024-09-21T18:01:34Z INFO  libsignal_protocol::session_cipher] censored-uuid-uuid-uuid-12characters.4 creating new chains.
[2024-09-21T18:01:34Z WARN  libsignal_protocol::protocol] Bad Mac! Their Mac: 23c...censored_mac Our Mac: a37...censored_mac
[2024-09-21T18:01:34Z WARN  libsignal_protocol::session_cipher] Failed to decrypt PreKey message with ratchet key: censored_ratchet_key and counter: 0. Session loaded for censored-uuid-uuid-uuid-12characters.4. Local session has base key: censored_base_key and counter: 0. invalid PreKey message: MAC verification failed
[2024-09-21T18:01:34Z ERROR libsignal_protocol::session_cipher] No valid session for recipient: censored-uuid-uuid-uuid-12characters.4, current session base key censored_base_key, number of previous states: 0
[2024-09-21T18:01:34Z ERROR libsignal_protocol::session_cipher] Message from censored-uuid-uuid-uuid-12characters.4 failed to decrypt; sender ratchet public key censored_ratchet_key message counter 0
    Candidate session 0 failed with 'invalid PreKey message: MAC verification failed', had 0 receiver chains
[2024-09-21T18:01:34Z ERROR presage::manager::registered] Error opening envelope: SignalProtocolError(InvalidMessage(PreKey, "decryption failed")), message will be skipped!

I did not yet try to reproduce this issue as I don't want to break my own Signal account and nobody is on staging to test messages there.

ell1e commented 1 week ago

to whisperfish contributors, is there something useful I could provide to assist looking into this? would be really cool if this works one day :relaxed:

Schmiddiii commented 3 days ago

Could you try Flare 0.15.5 if you have time. This should update presage to the latest version, which reportedly includes lots of bug fixes.