mpcjanssen/simpletask-android

Dropbox not syncing, SDK version update might be needed

Closed this issue ยท 10 comments

I'm getting sync errors on Dropbox. In the debugging info way down in the error trace there is a TLSV1_ALERT_PROTOCOL_VERSION error. I suspect this is related to this:

https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Reminder-The-Dropbox-API-will-no-longer-accept-TLS-1-0-or-1-1/td-p/582785

which says, "users of the Dropbox Java SDK should update to v3.1.1 (released June, 2019) or later"

Probably a TLS version issue indeed. I have merged the PR. Will see if I can do a new F-Droid release during easter weekend.

qquq commented

How can i get the updated version (dropbox, android/apk)?

@qquq for now you'll have to rebuild it yourself. I'll see if I can get some test builds on my site in the next view days.

I've been running this (#1160 ) in 'debug' mode for a few days, with my own dropbox_consumer_key, and with LeakCanary disabled. After many hours (during which the phone was mostly asleep) it seems to lose Dropbox authentication, and prompts again to log in to dropbox. Then I can seem to successfully log in to Dropbox, but then it immediately fails again ("Loading of todo list failed"), and immediately re-displays the prompt to log in to dropbox. This continues to happen unless I reboot the phone. If I reboot the phone, I am prompted one more time to log in to dropbox, but this time it "sticks" (it works; it no longer re-displays the prompt to log in to dropbox), although only for a few more hours, after which the problem recurs.

I'm not sure if this is a due to Dropbox API 5.2.0, or if it is due to 'debug' mode, or if it is due to something incorrect that I did when setting up my personal Dropbox API key, or something else.

Below, please find the relevant portion of the "DEBUGGING INFO" immediately after the first failure/first prompt to re-log in to dropbox:

04-17 02:18:53.442 10987 10987 I AlarmReceiver: Executing Alarm callback
04-17 02:18:53.442 10987 10987 I Util : Sending file changed broadcast
04-17 02:18:53.443 10987 10987 I TodoApplication: Received broadcast
FILE_SYNC
04-17 02:18:53.443 10987 10987 I TodoApplication: Loading todolist
04-17 02:18:53.443 10987 10987 I FSQ : -> Reload
04-17 02:18:53.444 10987 11720 I FSQ : <- Reload
04-17 02:18:53.444 10987 11720 D TodoList: Reload: From BROADCAST_FILE_SYNC
04-17 02:18:53.444 10987 11720 I FSQ : -> Verify token
04-17 02:18:53.444 10987 11720 D TodoList: Executing reloadaction
04-17 02:18:53.444 10987 11720 I Util : Sending file sync start broadcast
04-17 02:18:53.447 10987 18949 I FSQ : <- Verify token
04-17 02:18:53.707 10987 18949 W FileStore: Invalid access token
04-17 02:18:53.710 10987 11720 I TodoList: Remote version is different, sync
04-17 02:18:53.710 10987 11720 I FileStore: Loading file from Dropbox:
/todo/todo (2).txt
04-17 02:18:53.722 10987 11720 E TodoList: TodoList load failed: /todo/todo
(2).txt
04-17 02:18:53.722 10987 11720 E TodoList: java.io.IOException: Not
authenticated
04-17 02:18:53.722 10987 11720 E TodoList: at
nl.mpcjanssen.simpletask.remote.FileStore.loadTasksFromFile(FileStore.kt:95)
04-17 02:18:53.722 10987 11720 E TodoList: at
nl.mpcjanssen.simpletask.task.TodoList.reloadaction(TodoList.kt:265)
04-17 02:18:53.722 10987 11720 E TodoList: at
nl.mpcjanssen.simpletask.task.TodoList.access$reloadaction(TodoList.kt:25)
04-17 02:18:53.722 10987 11720 E TodoList: at
nl.mpcjanssen.simpletask.task.TodoList$reload$1.invoke(TodoList.kt:249)
04-17 02:18:53.722 10987 11720 E TodoList: at
nl.mpcjanssen.simpletask.task.TodoList$reload$1.invoke(TodoList.kt:25)
04-17 02:18:53.722 10987 11720 E TodoList: at
nl.mpcjanssen.simpletask.util.ActionQueue$add$1.invoke(ActionQueues.kt:16)
04-17 02:18:53.722 10987 11720 E TodoList: at
nl.mpcjanssen.simpletask.util.ActionQueue$add$1.invoke(ActionQueues.kt:9)
04-17 02:18:53.722 10987 11720 E TodoList: at
org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Async.kt:143)
04-17 02:18:53.722 10987 11720 E TodoList: at
org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Unknown Source:0)
04-17 02:18:53.722 10987 11720 E TodoList: at
org.jetbrains.anko.AsyncKt$sam$java_util_concurrent_Callable$0.call(Unknown
Source:2)
04-17 02:18:53.722 10987 11720 E TodoList: at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
04-17 02:18:53.722 10987 11720 E TodoList: at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
04-17 02:18:53.722 10987 11720 E TodoList: at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
04-17 02:18:53.722 10987 11720 E TodoList: at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
04-17 02:18:53.722 10987 11720 E TodoList: at
java.lang.Thread.run(Thread.java:920)
04-17 02:18:53.723 10987 11720 I TodoList: TodoList loaded from filestore
04-17 02:18:53.724 10987 11720 I Util : Sending file sync done changed
broadcast
04-17 02:18:56.291 10987 10987 I Simpletask: onCreate
04-17 02:18:56.335 10987 10987 I ContentCaptureHelper: Setting logging
level to OFF
04-17 02:18:56.336 10987 10987 I Simpletask: onResume
04-17 02:18:56.336 10987 10987 I FSQ : -> Reload
04-17 02:18:56.337 10987 10987 I Simpletask: onResume -> handleIntent
04-17 02:18:56.337 10987 10987 I Simpletask: handleIntent: not authenticated
04-17 02:18:56.337 10987 11722 I FSQ : <- Reload
04-17 02:18:56.337 10987 11722 D TodoList: Reload: Main activity resume
04-17 02:18:56.337 10987 11722 D TodoList: Not authenticated
04-17 02:18:56.341 10987 10987 I Simpletask: onResume <- handleIntent
04-17 02:18:56.341 10987 10987 D Event : update UI for event RESUME
04-17 02:18:56.342 10987 10987 D Simpletask: Update applyFilter bar
04-17 02:18:56.344 10987 10987 D Simpletask: Update applyFilter bar
04-17 02:18:56.386 10987 10987 I ContentCaptureHelper: Setting logging
level to OFF
04-17 02:18:58.742 10987 10987 I ContentCaptureHelper: Setting logging
level to OFF
04-17 02:19:55.576 10987 11009 W dotxtholo.debu: Reducing the number of
considered missed Gc histogram windows from 348 to 100

Just realized I had my new debug version installed alongside a very old release version of Simpletask. I'll uninstall the old version and see if that was the problem.

That didn't fix it, but I realize that this periodic de-authentication problem has already been described in #1157. So I suspect that #1160 is not to blame. Moving discussion there.

I've encountered the same error few days ago. Apparently I've got 10.9.0-dirty version, installed from Google Play years ago.

Do you plan to support Dropbox sync at all? I don't see Dropbox version on F-Droid and wonder if Dropbox is on an agenda, or I should think about different sync mean.

@adambro dropbox version is still supported just not via FDroid as it use a non-free service. If this is fixed there will be new builds on my website.

I certainly hope that the Dropbox version of Simpletask is continued. I have currently switched to the WebDAV version (and changed the Sleek target as well) because of the current Dropbox issue and it is a absolute pain, compared with the smooth functioning of Dropbox. Slower, with failures to update the target file because both Webdav and the underlying cloud are to sluggish ...

At least switching was quick & simple; it shows what an open syntax like todo.txt is good for. But I can't wait to install the Dropbox apk and switch back again.

Regards,
Oliver.

Updating the SDK was needed and is doen, #1157 handles the dropbox syncing problem, which is not fixed by updating the API.
See updates there.