etesync / android

EteSync - Secure, end-to-end encrypted, and privacy respecting sync for your contacts, calendars and tasks.
https://www.etesync.com
GNU General Public License v3.0
306 stars 34 forks source link

Sync Failure #189

Open quantumpacket opened 3 years ago

quantumpacket commented 3 years ago

I don't know if this is related to https://github.com/etesync/android/issues/186 as that issue did not contain a debug error log to determine that. I just started to get this error today. My version is also from F-Droid.

--- BEGIN DEBUG INFO ---
SYNCHRONIZATION INFO
Synchronization phase: syncronizing journals
Account name: REDACTED
Authority: com.etesync.syncadapter.addressbooks
Debug activity source: class com.etesync.syncadapter.syncadapter.SyncNotification$NotificationHandlerActivity (Kotlin reflection is not available)

EXCEPTION:
com.etebase.client.exceptions.HttpException: HTTP error 400! Code: 'bad_stoken'. Detail: 'Invalid stoken.'
    at com.etebase.client.CollectionManager.do_listMulti(Native Method)
    at com.etebase.client.CollectionManager.listMulti(CollectionManager.java:76)
    at com.etebase.client.CollectionManager.list(CollectionManager.java:185)
    at com.etesync.syncadapter.syncadapter.SyncAdapterService$SyncAdapter$RefreshCollections.run$app_release(SyncAdapterService.kt:262)
    at com.etesync.syncadapter.syncadapter.AddressBooksSyncAdapterService$AddressBooksSyncAdapter.onPerformSyncDo(AddressBooksSyncAdapterService.kt:48)
    at com.etesync.syncadapter.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:117)
    at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)

SOFTWARE INFORMATION
EteSync version: 2.2.4 (20204) 
Installed from: com.android.packageinstaller
CONFIGURATION
Power saving disabled: yes
android.permission.READ_CONTACTS permission: granted
android.permission.WRITE_CONTACTS permission: granted
android.permission.READ_CALENDAR permission: granted
android.permission.WRITE_CALENDAR permission: granted
org.dmfs.permission.READ_TASKS permission: granted
org.dmfs.permission.WRITE_TASKS permission: granted
org.tasks.permission.READ_TASKS permission: denied
org.tasks.permission.WRITE_TASKS permission: denied
System-wide synchronization: automatically
Account: REDACTED
  Address book sync. interval: 240 min
  Calendar     sync. interval: 240 min
  OpenTasks    sync. interval: 240 min
  Tasks.org    sync. interval: —
  WiFi only: false
  [CardDAV] Contact group method: GROUP_VCARDS
           Manage calendar colors: true
Address book account: Default (REDACTED XN)
  Main account: Account {name=REDACTED, type=com.etesync.syncadapter}
  URL: REDACTED
  Sync automatically: true

SQLITE DUMP
android_metadata
    |  locale |
    |  en_US |
----------
settings
    |  setting | value |
    |  distrustSystemCerts | 1 |
----------

SERVICES DUMP

JOURNALS DUMP

SYSTEM INFORMATION
Android version: 11 (lineage)
Device: OnePlus ONEPLUS A3000 (OnePlus3T)

--- END DEBUG INFO ---

Not sure if this is the culprit, but also curious as to why these show up as denied:

org.tasks.permission.READ_TASKS permission: denied
org.tasks.permission.WRITE_TASKS permission: denied

Let me know if you need anymore information. Thank you.

quantumpacket commented 3 years ago

Closing as deleting the account and re-adding it fixes the sync issue. Would be nice to figure out why this happens in the first place.

quantumpacket commented 3 years ago

The issue has happened again. About 2 weeks the token was valid before all syncing failed. Going to keep this open until it's resolved. Having to delete and re-add the account is not a viable solution, especially if there there are local pending changes that will be lost. Let me know what other information I may need to provide to help debug.

RokeJulianLockhart commented 3 years ago

This problem has been occurring for me since 2021-09-15 or 2021-09-16:

--- BEGIN DEBUG INFO --- SYNCHRONIZATION INFO Synchronization phase: syncronizing journals Account name: BEEDELLROKEJULIANLOCKHART Authority: com.android.calendar Debug activity source: class com.etesync.syncadapter.syncadapter.SyncNotification$NotificationHandlerActivity (Kotlin reflection is not available)

EXCEPTION: com.etebase.client.exceptions.ServerErrorException: Server error at com.etebase.client.CollectionManager.do_listMulti(Native Method) at com.etebase.client.CollectionManager.listMulti(CollectionManager.java:76) at com.etebase.client.CollectionManager.list(CollectionManager.java:185) at com.etesync.syncadapter.syncadapter.SyncAdapterService$SyncAdapter$RefreshCollections.run$app_release(SyncAdapterService.kt:262) at com.etesync.syncadapter.syncadapter.CalendarsSyncAdapterService$SyncAdapter.onPerformSyncDo(CalendarsSyncAdapterService.kt:37) at com.etesync.syncadapter.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:117) at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)

SOFTWARE INFORMATION EteSync version: 2.2.4 (20204) Installed from: com.google.android.packageinstaller CONFIGURATION Power saving disabled: yes android.permission.READ_CONTACTS permission: granted android.permission.WRITE_CONTACTS permission: granted android.permission.READ_CALENDAR permission: granted android.permission.WRITE_CALENDAR permission: granted org.dmfs.permission.READ_TASKS permission: denied org.dmfs.permission.WRITE_TASKS permission: denied org.tasks.permission.READ_TASKS permission: granted org.tasks.permission.WRITE_TASKS permission: granted System-wide synchronization: automatically Account: BEEDELLROKEJULIANLOCKHART Address book sync. interval: 15 min Calendar sync. interval: 15 min OpenTasks sync. interval: — Tasks.org sync. interval: 15 min WiFi only: false [CardDAV] Contact group method: GROUPVCARDS Manage calendar colors: true Address book account: ( ENTITY-S ) (BEEDELLROKEJULIANLOCKHART MQ) Main account: Account {name=BEEDELLROKEJULIANLOCKHART, type=com.etesync.syncadapter} URL: MQB9pPqVwBibdeKOn6ku329SsLr3hwB Sync automatically: true

SQLITE DUMP android_metadata | locale | | en_GB |

settings | setting | value |

SERVICES DUMP

JOURNALS DUMP

SYSTEM INFORMATION Android version: 11 (SPB2.210513.011) Device: Google Pixel 3 (blueline)

--- END DEBUG INFO ---

RokeJulianLockhart commented 3 years ago

http://github.com/etesync/android/issues/189#issuecomment-921842471.

This error is not occurring for me anymore, but I am not able to synchronise with tasks.org, which may be relevant.

matebitte commented 3 years ago

I just noticed that this has been failing for 3 Months now, so yes, Id appreciate a fix without readding my account as well

abaker commented 3 years ago

Do you know what error you are getting when it fails? Or it just hasn't synchronized any data in three months

tasn commented 3 years ago

@lenowac what is failing for 3 months?

RokeJulianLockhart commented 3 years ago

For me, reinstallation and subsequent reconfiguration of EteSync and Tasks.org did cause synchronisation to become operational.

matebitte commented 3 years ago

Well, the changelog did not update for three months AND sync always fails with the error “authentication failed“

This is how I noticed it:

Clicking on it and trying to get to my account dashboard, I'll get

Looking into the log, I notice that events I entered through my calender app into the calDAV calender are not present.

RokeJulianLockhart commented 3 years ago

This is very different to mine: it did not display any notification of errata.

matebitte commented 3 years ago

Well, mine did neither for months. Must have done something to trigger it, maybe open the app, idk.

quantumpacket commented 3 years ago

I was getting a notification error when it happened to me. I don't recall the exact wording (something along the lines of synchronization failed), but it was through that notification that I was able to provide the debug log for this issue in my initial post.

jschaul commented 2 years ago

"me too" I had this same issue as shown in the screenshots above (F-Droid build 2.2.4): invalid token, sync issues, and this went unnoticed for a while. Once I noticed the problem, as I could find no way to logout, and the "delete account" warned me that it would delete all the local data (which I didn't want), I had no better idea than to re-install. So I uninstalled the app, re-installed it, and could re-login. Perhaps this was a mistake, as I lost data in the process, but I don't see what I could have done differently. However, the last successful sync is from end of July, so I lost 4 months worth of contacts, tasks, and calendar entries doing this. 😢

I'm quite disappointed, really not cool to have data loss with an app whose purpose is to avoid having data loss.

There doesn't seem to be any way to take a backup of the local state if syncing fails for any reason; so if not addressed by an uninstall/re-install right immediately after syncing fails; it seems the design of etesync just assumes access tokens for login always work; there is no way to logout/login without deleting all the data on the phone.

@tasn perhaps you could

jezeklu commented 2 years ago

I have the last version from Google Play and I'm getting same error last 2 months. So I have new local unsynchronized data. What should I do for successful synchronization?

Synchronization with the server and thus avoid data lost is essential functionality of EteSync. So I would expect resolving of this issue within a few weeks. Issue is open 3 months and nothing happend. Why? I'm disappointed. This is not how I imagine a payment service.

quantumpacket commented 2 years ago

I'm getting the same error as the 2nd post in this thread about a server error. The TLS certs were just updated and I had to approve the new fingerprint. I recall when this issue had last happened I had to do the same as well. I'm wondering if this error has to do with the cert renewal being out of sync with something on the back end (pinning, time discrepancies, etc)?

tasn commented 2 years ago

Sorry, the server error was unrelated.

TLS certs error is more often than not a captive portal or something of that sort on the client network (rather than the server network).