qaul / qaul.net

Internet Independent Wireless Mesh Communication App
https://qaul.net
GNU Affero General Public License v3.0
496 stars 63 forks source link

random delivery of messages #556

Closed Chewie9999 closed 11 months ago

Chewie9999 commented 1 year ago

This is the first time I have tried to use the app.

My phone is a Fairphone 3 on Android 10, the other one is a Samsung A70. We managed to find each other using the local discovery without a problem, but when we started sending messages to each other, it failed.

Please see attached pictures. I sent a message to a user on the same LAN. They received it, and replied to me, but I never received it, and then i sent another message and they never received it.

Screenshot_20230512-174020 Screenshot_20230512-174341

We seem to be receving public messages without problems.

Let me know if we can do anything specific to test it. Thank you!

MathJud commented 1 year ago

Thanks for reporting this bug!

As one can see the from the screenshots, the confirmation messages were apparently not received, as there are no confirmation check-marks next to message-bubble. This automated message confirmation is important, as it also confirms the successful crypto-handshake for the static forward secret encryption key.

We will look into the problem.

MathJud commented 11 months ago

After a closer investigation, we could reproduce this bug when doing the following:

1) start user A & B, they exchange public keys but don't send any private messages yet. 2) stop user B. 3) user A sends a private message to user B. This initiates a new crypto handshake and schedules it for sending via DTN. 4) stop user A. 5) start user B. 6) user B sends a private message to user A. This initiates a new crypto handshake and schedules it for sending via DTN. 7) start user A. 8) The users now send their first handshake at the same time to each other, which leads to at least one of the sessions not being processed properly and leaves the users A&B not being able to communicate with each other anymore.