chenxiaolong / RSAF

An Android Storage Access Framework document provider for rclone
GNU General Public License v3.0
229 stars 6 forks source link

View Logs / can't see any files #102

Open jstride opened 2 days ago

jstride commented 2 days ago

Is there any way to see logs? I have a remote (s3) yet when I view the bucket/folder in Files it is empty (I have imported the config and know that rclone on other machines can list/view the folder). Am I missing something?

chenxiaolong commented 2 days ago

Yes, if you long press RSAF's version number, you'll get an option to save the logs.

jstride commented 1 day ago

Would any of these errors be critical/stop it showing the list of files (if I create a folder in my S3 - cloudflare it appears on cloudflare, I don't see any existing files though).

logcat.log

chenxiaolong commented 1 day ago

Can you try reproducing the problem after enabling the debug mode (long press) but before saving the logs? The file you uploaded doesn't have any access logs. Access logs only start showing up after the debug mode is enabled.

The log lines you are looking for are the ones that contain RcloneProvider. For listing files, the line will also contain queryChildDocuments. For example:

D/RcloneProvider( 3216): queryChildDocuments(test-smb:, null, _display_name ASC)
                                             ^^^^^^^^^
                                 The exact rclone path being accessed

It may be helpful to enable the Verbose rclone logs option too, but don't upload any logs created afterwards until it's disabled again and the device is rebooted. (rclone's verbose logs likely include credentials.)


Also, it might be worth testing on a non-Android device if you see the existing files when mounting the bucket with:

rclone mount <bucket>: /some/mount/path --vfs-cache-mode writes

rclone mount is equivalent to how RSAF interacts with rclone.


EDIT: When verbose logs are enabled, rclone will print the list of files it sees to the log. For example, this is what it looks like for one of my remotes:

2024-11-11 20:46:49.570358 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:49 DEBUG : : OpenFile: flags=O_RDONLY, perm=----------
2024-11-11 20:46:49.570398 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:49 DEBUG : : >OpenFile: fd=/ (r), err=<nil>
2024-11-11 20:46:49.570428 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:49 DEBUG : : Re-reading directory (6.137720625s old)
2024-11-11 20:46:50.111983 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:50 DEBUG : <name1>.docx: Reset virtual modtime
2024-11-11 20:46:50.112141 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:50 DEBUG : <name2>.xlsx: Reset virtual modtime
2024-11-11 20:46:50.112170 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:50 DEBUG : <name3>.docx: Reset virtual modtime
2024-11-11 20:46:50.112195 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:50 DEBUG : <name4>.jpg: Reset virtual modtime
2024-11-11 20:46:50.112220 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:50 DEBUG : <name5>.mp4: Reset virtual modtime
2024-11-11 20:46:50.112243 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:50 DEBUG : <name6>.pdf: Reset virtual modtime
2024-11-11 20:46:50.112271 -0500 I/GoLog   ( 3216): 2024/11/12 01:46:50 DEBUG : <name7>.xlsx: Reset virtual modtime