39aldo39/DecSyncCC

Truncated error message: "Failed to determine if ..."

erisdev opened this issue · 2 comments

Seeing this notification whenever I change something in Tasks.org. Tapping on it just opens DecSync CC, and I can't find a way to see the full error. What gives? Is there a log file somewhere I could look at?

Screenshot_20231124-134026-619

After a few minutes of messing around with logcat, I managed to spot this after making a change in Tasks.org:

11-27 17:00:48.892  1513  1551 W DocumentsContract: Failed to delete document
11-27 17:00:48.892  1513  1551 W DocumentsContract: android.os.ParcelableException: java.io.FileNotFoundException: Missing file for primary:DecSync/tasks/c6f49c2f-9dc4-444d-8ad3-913cb1ac6a15/v2/moto%20g%20stylus-DecSyncCC-47405/37 at /storage/emulated/0/DecSync/tasks/c6f49c2f-9dc4-444d-8ad3-913cb1ac6a15/v2/moto%20g%20stylus-DecSyncCC-47405/37
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:82)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:79)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.os.Parcel.readParcelable(Parcel.java:3281)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:2368)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.os.Parcel.createException(Parcel.java:2357)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.os.Parcel.readException(Parcel.java:2340)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.content.ContentProviderProxy.call(ContentProviderNative.java:732)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.content.ContentResolver.call(ContentResolver.java:2405)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.provider.DocumentsContract.deleteDocument(DocumentsContract.java:1460)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.library.RealFileSaf.delete(NativeFile.kt:2)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.library.NativeFile.write(NativeFile.kt:5)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.library.DecsyncFile.writeLines(DecsyncFile.kt:9)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.library.DecsyncFile.writeLines$default(DecsyncFile.kt:1)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.library.DecsyncV2.updateEntries(DecsyncV2.kt:22)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.library.DecsyncV2.setEntries(DecsyncV2.kt:16)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.library.DecsyncV2.setEntry(DecsyncV2.kt:1)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.library.Decsync.setEntry(Decsync.kt:2)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.cc.tasks.LocalTask.writeUpdateAction(LocalTask.kt:7)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.cc.tasks.TasksWorker.sync(TasksWorker.kt:32)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.cc.CollectionWorker.doWork$suspendImpl(CollectionWorker.kt:47)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at org.decsync.cc.CollectionWorker$doWork$1.invokeSuspend(Unknown Source:11)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:4)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:4)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:4)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:1)
11-27 17:00:48.892  1513  1551 W DocumentsContract: Caused by: java.io.FileNotFoundException: Missing file for primary:DecSync/tasks/c6f49c2f-9dc4-444d-8ad3-913cb1ac6a15/v2/moto%20g%20stylus-DecSyncCC-47405/37 at /storage/emulated/0/DecSync/tasks/c6f49c2f-9dc4-444d-8ad3-913cb1ac6a15/v2/moto%20g%20stylus-DecSyncCC-47405/37
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at java.lang.reflect.Constructor.newInstance0(Native Method)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	at android.os.ParcelableException.readFromParcel(ParcelableException.java:56)
11-27 17:00:48.892  1513  1551 W DocumentsContract: 	... 29 more
11-27 17:00:48.892  1513  1551 E CollectionWorker: java.io.FileNotFoundException: Missing file for primary:DecSync/tasks/c6f49c2f-9dc4-444d-8ad3-913cb1ac6a15/v2/moto%20g%20stylus-DecSyncCC-47405/37 at /storage/emulated/0/DecSync/tasks/c6f49c2f-9dc4-444d-8ad3-913cb1ac6a15/v2/moto%20g%20stylus-DecSyncCC-47405/37
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at java.lang.reflect.Constructor.newInstance0(Native Method)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.os.ParcelableException.readFromParcel(ParcelableException.java:56)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:82)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:79)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.os.Parcel.readParcelable(Parcel.java:3281)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:2368)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.os.Parcel.createException(Parcel.java:2357)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.os.Parcel.readException(Parcel.java:2340)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.content.ContentProviderProxy.call(ContentProviderNative.java:732)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.content.ContentResolver.call(ContentResolver.java:2405)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at android.provider.DocumentsContract.deleteDocument(DocumentsContract.java:1460)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.library.RealFileSaf.delete(NativeFile.kt:2)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.library.NativeFile.write(NativeFile.kt:5)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.library.DecsyncFile.writeLines(DecsyncFile.kt:9)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.library.DecsyncFile.writeLines$default(DecsyncFile.kt:1)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.library.DecsyncV2.updateEntries(DecsyncV2.kt:22)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.library.DecsyncV2.setEntries(DecsyncV2.kt:16)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.library.DecsyncV2.setEntry(DecsyncV2.kt:1)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.library.Decsync.setEntry(Decsync.kt:2)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.cc.tasks.LocalTask.writeUpdateAction(LocalTask.kt:7)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.cc.tasks.TasksWorker.sync(TasksWorker.kt:32)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.cc.CollectionWorker.doWork$suspendImpl(CollectionWorker.kt:47)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at org.decsync.cc.CollectionWorker$doWork$1.invokeSuspend(Unknown Source:11)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:4)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:18)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:4)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:4)
11-27 17:00:48.892  1513  1551 E CollectionWorker: 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:1)

A directory listing of ${DECSYNC_DIR}/tasks/c6f49c2f-9dc4-444d-8ad3-913cb1ac6a15/v2/moto%20g%20stylus-DecSyncCC-47405/ on my other device looks like this, which, uh, doesn't seem quite right. These (1), (2), etc. files were all created on the phone side according to Syncthing.

~/S/D/t/c/v/moto%20g%20stylus-DecSyncCC-47405 ❱ ls
 03       '20 (5)'   55  '97 (1)'   '97 (18)'  '97 (26)'  '97 (5)'   c1
 09        28        65  '97 (10)'  '97 (19)'  '97 (27)'  '97 (6)'   d4
'09 (1)'   29        7d  '97 (11)'  '97 (2)'   '97 (28)'  '97 (7)'   e2
 14        30        83  '97 (12)'  '97 (20)'  '97 (29)'  '97 (8)'   e3
 20        37        84  '97 (13)'  '97 (21)'  '97 (3)'   '97 (9)'   f1
'20 (1)'   3a        8a  '97 (14)'  '97 (22)'  '97 (30)'   9a        fc
'20 (2)'   41        91  '97 (15)'  '97 (23)'  '97 (31)'   a7        fd
'20 (3)'   52        92  '97 (16)'  '97 (24)'  '97 (32)'   af        info
'20 (4)'   53        97  '97 (17)'  '97 (25)'  '97 (4)'    be        sequences

DecSync CC has now started crashing repeatedly whenever something changes in my tasks database. I assume it's related to the above error. Commenting now to remind myself to try and get a crash log when I am not at work.

Crash logs don't seem relevant, but I did spot an error that I think is related to the truncated message in the notification. Updating the error report with it now.

After deleting the extra files, DecSync CC stops crashing and behaves itself until something changes in the tasks database again. I'd had no issues after about a week of not touching my todo list, then as soon as i do, everything is on fire again. Calendars and contacts seem normal. Tasks.org wouldn't be interfering with the decsync database directly...would it? Why is it only the tasks database that gets corrupted like this?