android icon indicating copy to clipboard operation
android copied to clipboard

PSA: Dealing with Invalid Token

Open antifob opened this issue 2 years ago • 2 comments

I've had the EteSync client fail to sync contacts and calendars for a few weeks with the "Authentication failed" message. When trying to access the "dashboard" (account -> settings -> account dashboard), the app would simply popup with "Invalid token".

This error has been encountered by others in the past years, causing data loss: https://github.com/etesync/android/issues/189 https://github.com/etesync/android/issues/186 https://github.com/etesync/android/issues/119

Here says to logout, but there's no "logout" function. Searching for code with logout functionality points to https://github.com/etesync/android/commit/5857ed51d0c743f7072d22e03e2073a91ecf7bc9 which is part of the deleteAccount method.

Deleting an account would delete all unsynchronized data on the device.

Here's a workaround: changing the encryption password will force the app to re-acquire a token. I didn't check why the old password (token?) was accepted while doing the change, but hey..

Regards

antifob avatar Jun 10 '23 17:06 antifob

Thanks for the writeup!

tasn avatar Jun 10 '23 23:06 tasn

Thanks @antifob , that saved my day. I wrote up a page on the server wiki as I discovered my wife's phone was having issues through the logs, so it might help some admins.

https://github.com/etesync/server/wiki/Invalid-token-renewal

daftaupe avatar Feb 25 '24 16:02 daftaupe