android icon indicating copy to clipboard operation
android copied to clipboard

Sync Failure

Open quantumpacket opened this issue 2 years ago • 16 comments

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 avatar Aug 31 '21 21:08 quantumpacket

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 avatar Sep 01 '21 19:09 quantumpacket

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.

quantumpacket avatar Sep 17 '21 07:09 quantumpacket

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: GROUP_VCARDS 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 avatar Sep 17 '21 14:09 RokeJulianLockhart

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.

RokeJulianLockhart avatar Sep 29 '21 11:09 RokeJulianLockhart

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

matebitte avatar Oct 21 '21 10:10 matebitte

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

abaker avatar Oct 21 '21 13:10 abaker

@lenowac what is failing for 3 months?

tasn avatar Oct 22 '21 00:10 tasn

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

RokeJulianLockhart avatar Oct 22 '21 09:10 RokeJulianLockhart

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.

matebitte avatar Oct 22 '21 09:10 matebitte

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

RokeJulianLockhart avatar Oct 22 '21 10:10 RokeJulianLockhart

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

matebitte avatar Oct 22 '21 10:10 matebitte

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.

quantumpacket avatar Oct 22 '21 21:10 quantumpacket

"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

  • consider adding a logout/login button in the android app as a workaround to these syncing issues.
  • Or to provide a button for an export of current state to local file.
  • Or come up with another way to ensure local user information doesn't get wiped when there are bugs in the code that lead to sync issues. I could find at least no documentation on how to somehow save local state across a re-installation or account re-adding. Android devices may have a way to export contact information to a file outside etesync, but it's not obvious this needs to be done in order to re-login with etesync. Also, that doesn't cover tasks/calendar.

jschaul avatar Dec 08 '21 19:12 jschaul

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.

jezeklu avatar Jan 05 '22 06:01 jezeklu

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)?

quantumpacket avatar Mar 14 '22 05:03 quantumpacket

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).

tasn avatar Mar 15 '22 13:03 tasn