Weird key issues on the master branch
<!-- If you found a bug in our Rust rework, you are of course free to report an issue. Many of these regressions however are already documented on the issue tracker https://gitlab.com/rubdos/whisperfish/-/issues, so please search thoroughly before posting, or ask on Matrix #whisperfish:rubdos.be or Freenode #whisperfish for some help. --> ## Setup - Device: Xperia X 10 Plus - SailfishOS version: 4.0.1.48 - Whisperfish version: 0b89b94 and 609843a ## Summary This is unscientific because I didn't even think to look at the logs when I first tested commit 0b89b94 but when messages didn't seem to go through, I found errors in the logs, which were present also with commit 609843a. Downgrading to dc4c2b3 seems to work fine and I don't think I missed out on messages permanently, but my sent messages apparently didn't get anywhere. ## Trace log <!-- Please run harbour-whisperfish from the command-line as follows: $ harbour-whisperfish --verbose 2> /tmp/whisperfish-log.txt Reproduce the issue, **CENSOR THE FILE**, and include the file in `/tmp/whisperfish-log.txt` For more info about the log and censoring, check https://gitlab.com/rubdos/whisperfish/-/wikis/home#censor-your-logs --> Quoting off what I pasted on IRC. Can't verify the commits for the logs further below which is which 0b89b94 ``` STUB requested peer identity for Recipient { id: 1, e164: Some("NUMBER"), ...} ... ERROR harbour_whisperfish::worker::client] Error opening envelope: SignalProtocolError(BadKeyType(137)) ``` ------------------------------ ``` $ grep ERROR log/fluistervis-2021-05-08T15\:09\:32 | grep -v 'Already found a session' | wc -l 22 $ grep ERROR log/fluistervis-2021-05-08T15\:09\:32 | grep -v 'Already found a session' | grep SignalProtocolError | wc -l 8 $ grep ERROR log/fluistervis-2021-05-08T15\:09\:32 | grep -v 'Already found a session' | grep 'Protocol error' | wc -l 11 ``` > the next file has only two `SignalProtocolError(BadKeyType(137))` which may have been tests sent by me (hard to tell because of this uuid-type crap, plaintext would be easier to debug ;)) > then four (4) 'bad key type' errors, 0x80, 0x61 and two 0x89 ----------- Grep for `ERROR` ``` [2021-05-08T16:19:30Z ERROR harbour_whisperfish::worker::client] Error sending message: Protocol error: internal error: Unknown error [2021-05-08T16:19:32Z ERROR harbour_whisperfish::worker::client] Error sending message: Protocol error: internal error: Unknown error [2021-05-08T16:19:44Z ERROR harbour_whisperfish::model::message] Message not found [2021-05-08T16:19:44Z ERROR harbour_whisperfish::model::message] Message not found ``` > so I sent a message to a group, "Test" was the content, its id 75704, and a while later I get this in the logs `ServiceAddress(SISTERS_NUMBER) received a message.` -> `Called fetch_message_by_id(75704)` -> `Message not found` > may also be interesting that this sister's number is one of the "issue #336" numbers I get complaints about when starting WF
issue