#OwnTracks: Decryption failed. Ciphertext failed verification

2 messages · Page 1 of 1 (latest)

smoky oxide
#

I have tried removing and re-configuring the OwnTracks integration a couple of times now as I was walking through issues with reverse proxying the generated webhook.

At this point the OwnTracks android client successfully gets through to the server on HTTP, but fails to deliver an update - as reported by the Home Assistant logs:

ERROR (MainThread) [homeassistant.util.logging] Exception in async_handle_message when dispatching 'owntracks': (<HomeAssistant RUNNING>, <homeassistant.components.owntracks.OwnTracksContext object at 0x7ffb3f49fa10>, {'_type': 'encrypted', '_id': 'bc37e601', 'data': '(...)', 'topic': 'owntracks/(...)/(...)'})
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/owntracks/messages.py", line 391, in async_handle_message
await handler(hass, context, message)
(...)
File "/usr/src/homeassistant/homeassistant/components/owntracks/messages.py", line 29, in decrypt
return SecretBox(key).decrypt(ciphertext, encoder=Base64Encoder)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/nacl/secret.py", line 149, in decrypt
(...)
nacl.exceptions.CryptoError: Decryption failed. Ciphertext failed verification

The symmetric encryption key I have used in the android client advanced settings is the one generated and displayed when last I added the OwnTracks integration. In addition to specifying it in the android client, I have also tried adding it to configuration.yaml as owntracks.secret.

Home Assistant OS:
Core 2024.12.4
Supervisor 2024.12.0
Operating System 13.2
Frontend 20241127.8

OwnTracks android
Version 2.5.3 (420503003) - OSS

Connection via nginx reverse proxy - HTTPS externally, HTTP to HAOS install. Confirmed effective with test fetching of static content as well as invocation of automation webhooks.

Am I seeing the effect of some cached encryption key or something? Any hints greatly appreciated.

smoky oxide
#

I was. Turns out the mobile app was not applying changes correctly no matter how many times set, app rebooted, etc.