owntracks / android

OwnTracks Android App
http://owntracks.org
Eclipse Public License 1.0
1.38k stars 477 forks source link

Disconnection upon receiving payloads encrypted with an unknown key #1831

Closed looowizz closed 2 months ago

looowizz commented 2 months ago

Hi! Thank you for the app :)

I noticed that in the new 2.5.0 version, the app gives an error when decrypting locations from other users:

2024-09-05 20:55:48.373 E [MQTT Call: bramble] MQTTMessageProcessorEndpoint$mqttCallback: Connection Lost MqttException (0) - java.lang.RuntimeException: Decryption failed. Ciphertext failed verification

The app immediately disconnects after this error, doing the usual reconnection attempts afterwards.

jpmens commented 2 months ago

Do the other users (a.k.a. friends) have payload encryption enabled? And I assume you do not have the secret key for these payloads, is that it?

looowizz commented 2 months ago

Other users have payload encryption enabled and we all have inputted the same secret key. However, now thinking about it, i did do some testing with my friend with a different symmetric key which was when the issue started actually. So yeah there are now users present that are using different secret keys.

Not sure but it might also be because my device has entries on the server that use two different encryption keys due to this testing with a friend.

I have disabled payload encryption and now seeing this log message and having the same problem. Will try to delete the old entries on the server when i get access to it again in a few days. and see if that fixes the problem. 2024-09-05 21:51:30.400 W [MQTT Call: bramble] MessageProcessor: Unknown message type received

looowizz commented 2 months ago

Just another bit of information to add is that iOS devices work perfectly fine :)