syncthing / syncthing-lite

A Sync Browser: a browser app for Syncthing-compatible shares
Mozilla Public License 2.0
128 stars 22 forks source link

Unable to initiate download #33

Closed hackel closed 5 years ago

hackel commented 6 years ago

I have paired my mobile device to my computer and am able to browse my shared folders. When I try to download a file, I just get a "Downloading file..." modal that sits at 0% with a progress bar flashing across the screen indefinitely. This is what I'm seeing in the logcat:

03-06 21:35:52.506 20716 20716 D FolderBrowserActivity: navigate to path = 'test.txt' from path = ''
03-06 21:35:52.506 20716 20716 I FolderBrowserActivity: pulling file = FileRecord{folder=sync, path=test.txt, size=243454, lastModified=Tue Mar 06 18:37:07 CST 2018, type=FILE, last version = Version{id=8638705978042962429, value=1}}
03-06 21:35:52.541 20716 20733 I zygote64: Deoptimizing void net.syncthing.java.client.SyncthingClient.getPeerConnections(kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function0) due to JIT inline cache
03-06 21:35:52.542 20716 20733 W System.err: kotlin.KotlinNullPointerException
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.java.bep.ConnectionHandler.hasFolder(ConnectionHandler.kt:464)
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.java.client.SyncthingClient$getConnectionForFolder$1.invoke(SyncthingClient.kt:130)
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.java.client.SyncthingClient$getConnectionForFolder$1.invoke(SyncthingClient.kt:38)
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.java.client.SyncthingClient.getPeerConnections(SyncthingClient.kt:95)
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.java.client.SyncthingClient.getConnectionForFolder(SyncthingClient.kt:129)
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.java.client.SyncthingClient.getBlockPuller(SyncthingClient.kt:142)
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.lite.library.DownloadFileTask.<init>(DownloadFileTask.kt:22)
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.lite.dialogs.FileDownloadDialog$show$1.invoke(FileDownloadDialog.kt:33)
03-06 21:35:52.542 20716 20733 W System.err:    at net.syncthing.lite.dialogs.FileDownloadDialog$show$1.invoke(FileDownloadDialog.kt:23)
03-06 21:35:52.542 20716 20733 W System.err:    at org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Async.kt:140)
03-06 21:35:52.542 20716 20733 W System.err:    at org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Unknown Source:0)
03-06 21:35:52.542 20716 20733 W System.err:    at org.jetbrains.anko.AsyncKt$sam$Callable$761a5578.call(Unknown Source:2)
03-06 21:35:52.542 20716 20733 W System.err:    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
03-06 21:35:52.542 20716 20733 W System.err:    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
03-06 21:35:52.542 20716 20733 W System.err:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
03-06 21:35:52.542 20716 20733 W System.err:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
03-06 21:35:52.542 20716 20733 W System.err:    at java.lang.Thread.run(Thread.java:764)
03-06 21:35:55.029 20716 27010 I DiscoveryHandler: received device address list from local discovery
03-06 21:36:54.956 20716 27010 I DiscoveryHandler: received device address list from local discovery
03-06 21:39:24.872 20716 27332 I DiscoveryHandler: received device address list from local discovery
03-06 21:40:29.851 20716 20716 I zygote64: Deoptimizing void android.view.ViewGroup$ChildListForAccessibility.init(android.view.ViewGroup, boolean) due to JIT inline cache
03-06 21:40:55.060 20716 27437 I DiscoveryHandler: received device address list from local discovery
03-06 21:41:02.958 20716 20716 W InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
03-06 21:41:07.048 20716 20716 D FolderBrowserActivity: navigate to path = '..' from path = ''
03-06 21:41:07.283 20716 27449 I IndexBrowser: closing
Nutomic commented 5 years ago

Can you still reproduce this issue with the latest version?

l-jonas commented 5 years ago

This can not happen anymore. This happened when a ConnectionHandler had no cluster config because there was no cluster config exchange yet. Now, it handles a missing cluster config as hasFolder = false: https://github.com/syncthing/syncthing-lite/blob/1869a49c2c5d2269152bf9e64834ed52588e736b/syncthing-bep/src/main/kotlin/net/syncthing/java/bep/connectionactor/ConnectionActorWrapper.kt#L58