Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

renameDocument Problem #81

Closed
x4455 opened this issue Oct 21, 2024 · 2 comments · Fixed by #90
Closed

renameDocument Problem #81

x4455 opened this issue Oct 21, 2024 · 2 comments · Fixed by #90
Assignees

Comments

@x4455
Copy link

x4455 commented Oct 21, 2024

I'm using a comic book program: Mihon.
I'm save a comic using his download function, and the comic program doesn't report an error, but it doesn't seem to be working properly.
In DocumentsUI, I see the following:

Filename Size
003.jpg 0B
003.tmp 111kB
004.jpg 678kB
005.jpg 0B
005.tmp 567kB
006.jpg 0B
006.tmp 321kB

And So on. Look like a small number of files succeeded.

More information

  • Application Ver: 1.29
  • Type: crypt
  • remote: internal storage and other remote
  • Other: Using default values

logcat

Using internal storage here.

RcloneProvider

RcloneProvider          com.chiller3.rsaf.debug              D  createDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, application/octet-stream, 043.tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  queryDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp, [mime_type])
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  openDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp, w, null)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onGetSize()
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onWrite(0, 8192, <data[131072]>)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onWrite(8192, 8192, <data[131072]>)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onWrite(16384, 8192, <data[131072]>)
......
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onWrite(204800, 7556, <data[131072]>)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onWrite(212356, 636, <data[131072]>)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onWrite(212992, 7556, <data[131072]>)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onWrite(220548, 636, <data[131072]>)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onWrite(221184, 1625, <data[131072]>)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onRelease()
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  renameDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp, 043.jpg)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onRelease() complete

Another logcat

RcloneProvider          com.chiller3.rsaf.debug              D  createDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, application/octet-stream, 043.tmp)
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp: vfs cache: queuing for upload in 0s
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp: Copied (new)
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  queryDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp, [mime_type])
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  openDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp, w, null)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onGetSize()
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onRelease()
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  renameDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp, 043.jpg)
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp: vfs cache: queuing for upload in 0s
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp: Moved (server-side) to: Mihon/downloads/Source/bookName/Episode1_tmp/043.jpg
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp: vfs cache: renamed in cache to "Mihon/downloads/Source/bookName/Episode1_tmp/043.jpg"
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp: Copied (replaced existing)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onRelease() complete

Also get some error messages in testing

RcloneProvider          com.chiller3.rsaf.debug              D  createDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, application/octet-stream, 025.tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: vfs cache: queuing for upload in 0s
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: Copied (new)
RcloneProvider          com.chiller3.rsaf.debug              D  notifyChildrenChanged(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  queryDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp, [mime_type])
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  openDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp, w, null)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp].onGetSize()
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  queryDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, [mime_type])
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  queryChildDocuments(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, [document_id, _display_name], null)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  createDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, application/octet-stream, 026.tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/026.tmp: vfs cache: queuing for upload in 0s
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp].onRelease()
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  renameDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp, 025.jpg)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: Moved (server-side) to: Mihon/downloads/Source/bookName/Episode1_tmp/025.jpg
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: vfs cache: queuing for upload in 0s
Background...torService com.chiller3.rsaf.debug              D  Received intent: Intent { act=com.chiller3.rsaf.rclone.BackgroundUploadMonitorService.add cmp=com.chiller3.rsaf.debug/com.chiller3.rsaf.rclone.BackgroundUploadMonitorService (has extras) }
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: vfs cache: renamed in cache to "Mihon/downloads/Source/bookName/Episode1_tmp/025.jpg"
RcloneProvider          com.chiller3.rsaf.debug              D  notifyChildrenChanged(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 ERROR : Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: Failed to copy: failed to open source object: lstat /data/user/0/com.chiller3.rsaf.debug/cache/rclone/vfs/TestArea/Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: no such file or directory
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  queryDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, [mime_type])
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/026.tmp: Copied (new)
GoLog                   com.chiller3.rsaf.debug              I  2000/01/01 01:02:03 ERROR : Mihon/downloads/Source/bookName/Episode1_tmp/025.jpg: vfs cache: item close failed: vfs cache: failed to transfer file from cache to remote: failed to open source object: lstat /data/user/0/com.chiller3.rsaf.debug/cache/rclone/vfs/TestArea/Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: no such file or directory
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  notifyChildrenChanged(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  queryChildDocuments(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, [document_id, _display_name], null)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              W  Error when closing file
                                                                android.system.ErrnoException: RbFile.close failed: EIO (I/O error)
                                                                	at com.chiller3.rsaf.extension.RbErrorExtensionsKt.toException(RbErrorExtensions.kt:13)
                                                                	at com.chiller3.rsaf.rclone.RcloneProvider$ProxyFd.onRelease(RcloneProvider.kt:805)
                                                                	at com.android.internal.os.FuseAppLoop.handleMessage(FuseAppLoop.java:209)
                                                                	at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                	at android.os.Looper.loopOnce(Looper.java:211)
                                                                	at android.os.Looper.loop(Looper.java:300)
                                                                	at android.os.HandlerThread.run(HandlerThread.java:67)
                                                                Caused by: java.io.IOException: vfs cache: failed to transfer file from cache to remote: failed to open source object: lstat /data/user/0/com.chiller3.rsaf.debug/cache/rclone/vfs/TestArea/Mihon/downloads/Source/bookName/Episode1_tmp/025.tmp: no such file or directory
                                                                	at com.chiller3.rsaf.extension.RbErrorExtensionsKt.toException(RbErrorExtensions.kt:13) 
                                                                	at com.chiller3.rsaf.rclone.RcloneProvider$ProxyFd.onRelease(RcloneProvider.kt:805) 
                                                                	at com.android.internal.os.FuseAppLoop.handleMessage(FuseAppLoop.java:209) 
                                                                	at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                	at android.os.Looper.loopOnce(Looper.java:211) 
                                                                	at android.os.Looper.loop(Looper.java:300) 
                                                                	at android.os.HandlerThread.run(HandlerThread.java:67) 
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/026.tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  createDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, text/xml, ComicInfo)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
GoLog                   com.chiller3.rsaf.debug              I  2024/10/21 11:06:29 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo: vfs cache: queuing for upload in 0s
GoLog                   com.chiller3.rsaf.debug              I  2024/10/21 11:06:29 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo: Copied (new)
RcloneProvider          com.chiller3.rsaf.debug              D  notifyChildrenChanged(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  queryDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo, [mime_type])
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  openDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo, w, null)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo].onGetSize()
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo].onRelease()
RcloneProvider          com.chiller3.rsaf.debug              D  isChildDocument(TestArea:Mihon, TestArea:Mihon/downloads/Source/bookName/Episode1_tmp)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
RcloneProvider          com.chiller3.rsaf.debug              D  renameDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp, Episode1)
RcloneRpc               com.chiller3.rsaf.debug              D  No backup notification required for config/dump RPC call
Background...torService com.chiller3.rsaf.debug              D  Received intent: Intent { act=com.chiller3.rsaf.rclone.BackgroundUploadMonitorService.add cmp=com.chiller3.rsaf.debug/com.chiller3.rsaf.rclone.BackgroundUploadMonitorService (has extras) }
GoLog                   com.chiller3.rsaf.debug              I  2024/10/21 11:06:29 INFO  : Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo: vfs cache: queuing for upload in 0s
ler3.rsaf.debug         com.chiller3.rsaf.debug              I  This is sticky GC, maxfree is 33554432 minfree is 8388608
GoLog                   com.chiller3.rsaf.debug              I  2024/10/21 11:06:29 ERROR : Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo: Failed to copy: open /storage/emulated/0/Documents/private/ele219n1t21hg4a40uk096t7mc/dsb0nqunvhnielqche6n8v44hs/ovqi1sfgp2dq65cen4guq0jq4l9cvv80um0af5snc8955t7fvhkg/tsk3k2er7nrnod8v7v3lu7c3djsgp1efalnmfktum46e2585emd9amcu516dfg12uc7a002ti133mrdg82me9svm6hifqrj7t3csmfoois9k08u9k9320ed3le4lpb9hlb1gg8vckogo5obkgh02smku2g/om5tcpi4n7jump0eckkm094aj0/e5r52b8u5mhr3u48ra9vsrifv7io9ah8s6fuunu4egnugapkovqg: no such file or directory
GoLog                   com.chiller3.rsaf.debug              I  2024/10/21 11:06:29 ERROR : Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo: vfs cache: item close failed: vfs cache: failed to transfer file from cache to remote: open /storage/emulated/0/Documents/private/ele219n1t21hg4a40uk096t7mc/dsb0nqunvhnielqche6n8v44hs/ovqi1sfgp2dq65cen4guq0jq4l9cvv80um0af5snc8955t7fvhkg/tsk3k2er7nrnod8v7v3lu7c3djsgp1efalnmfktum46e2585emd9amcu516dfg12uc7a002ti133mrdg82me9svm6hifqrj7t3csmfoois9k08u9k9320ed3le4lpb9hlb1gg8vckogo5obkgh02smku2g/om5tcpi4n7jump0eckkm094aj0/e5r52b8u5mhr3u48ra9vsrifv7io9ah8s6fuunu4egnugapkovqg: no such file or directory
RcloneProvider          com.chiller3.rsaf.debug              W  Error when closing file
                                                                android.system.ErrnoException: RbFile.close failed: EIO (I/O error)
                                                                	at com.chiller3.rsaf.extension.RbErrorExtensionsKt.toException(RbErrorExtensions.kt:13)
                                                                	at com.chiller3.rsaf.rclone.RcloneProvider$ProxyFd.onRelease(RcloneProvider.kt:805)
                                                                	at com.android.internal.os.FuseAppLoop.handleMessage(FuseAppLoop.java:209)
                                                                	at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                	at android.os.Looper.loopOnce(Looper.java:211)
                                                                	at android.os.Looper.loop(Looper.java:300)
                                                                	at android.os.HandlerThread.run(HandlerThread.java:67)
                                                                Caused by: java.io.IOException: vfs cache: failed to transfer file from cache to remote: open /storage/emulated/0/Documents/private/ele219n1t21hg4a40uk096t7mc/dsb0nqunvhnielqche6n8v44hs/ovqi1sfgp2dq65cen4guq0jq4l9cvv80um0af5snc8955t7fvhkg/tsk3k2er7nrnod8v7v3lu7c3djsgp1efalnmfktum46e2585emd9amcu516dfg12uc7a002ti133mrdg82me9svm6hifqrj7t3csmfoois9k08u9k9320ed3le4lpb9hlb1gg8vckogo5obkgh02smku2g/om5tcpi4n7jump0eckkm094aj0/e5r52b8u5mhr3u48ra9vsrifv7io9ah8s6fuunu4egnugapkovqg: no such file or directory
                                                                	at com.chiller3.rsaf.extension.RbErrorExtensionsKt.toException(RbErrorExtensions.kt:13) 
                                                                	at com.chiller3.rsaf.rclone.RcloneProvider$ProxyFd.onRelease(RcloneProvider.kt:805) 
                                                                	at com.android.internal.os.FuseAppLoop.handleMessage(FuseAppLoop.java:209) 
                                                                	at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                	at android.os.Looper.loopOnce(Looper.java:211) 
                                                                	at android.os.Looper.loop(Looper.java:300) 
                                                                	at android.os.HandlerThread.run(HandlerThread.java:67) 
MainApplication         com.chiller3.rsaf.debug              I  next_notification_id preference was changed; notifying backup manager
Background...torService com.chiller3.rsaf.debug              D  Received intent: Intent { act=com.chiller3.rsaf.rclone.BackgroundUploadMonitorService.remove cmp=com.chiller3.rsaf.debug/com.chiller3.rsaf.rclone.BackgroundUploadMonitorService (has extras) }
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/ComicInfo].onRelease() complete
@chenxiaolong
Copy link
Owner

Thanks for providing all the details!

This is the main issue:

RcloneProvider          com.chiller3.rsaf.debug              D  renameDocument(TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp, 043.jpg)
RcloneProvider          com.chiller3.rsaf.debug              D  ProxyFd[TestArea:Mihon/downloads/Source/bookName/Episode1_tmp/043.tmp].onRelease() complete

Mihon is creating a new file, writing the data, closing the file, and then renaming the file. However, closing a file is asynchronous on Android. So what happens is:

  1. Mihon creates a new file
  2. Mihon writes the data, which is temporarily written to rclone's internal cache
  3. Mihon closes the file, which completes immediately from Mihon's point of view
  4. rclone starts uploading the file from the internal cache
  5. Mihon renames the file while it's still being copied from the cache to the remote, which rclone does not really support

Android's (terrible) APIs have no way to make a client app wait for closing the file to actually complete.

I plan to add an option to disable caching (#79), but this only reduces the chance of the problem happening. It does not eliminate it. For cloud providers that need to perform some processing after the file is uploaded, closing the file is still not instant.

I think to actually solve this, I will need to update renameDocument, copyDocument, and moveDocument to wait for in progress uploads to complete.

@chenxiaolong
Copy link
Owner

This is fixed/worked around in #90, which will be included in the next release of RSAF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants