Catfriend1 / syncthing-android

Syncthing-Fork - A Syncthing Wrapper for Android.
Mozilla Public License 2.0
1.2k stars 40 forks source link

Two folders fail to sync with `readdirent invalid argument` #1024

Closed parasiteoflife closed 9 months ago

parasiteoflife commented 10 months ago

Description of the issue

Since some days ago, I don't know when exactly so I'm not sure an update produced this, two of my folders are showing an error on sub-directories at the scan process. One of the subdir has 2794 files and the other 4947 files. I think they fail because of the amount of files, there is another subdir with 2243 files that is not failing though but I don't know what else could be causing this and the logs don't say much.

Reproduction Steps

Version Information

Device platform info

can't get this right now as I don't have a data cable.

Android Log

02:10:30 [3ZEBP] INFO: Scanner (folder "Whatsapp" (xxxxxxxxx), item "Media/WhatsApp Images"): scan: readdirent /storage/emulated/0/Android/media/com.whatsapp/Whatsapp/Media/WhatsApp Images: invalid argument
02:11:06 [3ZEBP] INFO: Error while trying to start filesystem watcher for folder "NekoX" (xxxxxxxxx), trying again in 32m0s: readdirent /storage/emulated/0/NekoX/videos: invalid argument
02:11:07 [3ZEBP] INFO: Scanner (folder "NekoX" (xxxxxxxxx), item "videos"): scan: readdirent /storage/emulated/0/NekoX/videos: invalid argument
02:11:09 [3ZEBP] INFO: Scanner (folder "NekoX" (xxxxxxxxx), item "videos"): scan: readdirent /storage/emulated/0/NekoX/videos: invalid argument
02:11:51 [3ZEBP] INFO: Error while trying to start filesystem watcher for folder "Whatsapp" (xxxxxxxxx), trying again in 32m0s: readdirent /storage/emulated/0/Android/media/com.whatsapp/Whatsapp/Media/WhatsApp Images: invalid argument
02:11:54 [3ZEBP] INFO: Scanner (folder "Whatsapp" (xxxxxxxxx), item "Media/WhatsApp Images"): scan: readdirent /storage/emulated/0/Android/media/com.whatsapp/Whatsapp/Media/WhatsApp Images: invalid argument
02:12:00I/Util     runShellCommandGetOutput: Exited with code 0
02:12:00I/Util     runShellCommandGetOutput: Exited with code 0
02:12:04I/yncthingandroi Background concurrent copying GC freed 339222(15MB) AllocSpace objects, 143(3872KB) LOS objects, 66% free, 13MB/39MB, paused 96us,47us total 1.463s
02:12:13I/Util     runShellCommandGetOutput: Exited with code 0
Catfriend1 commented 10 months ago

I had not seen this error before on Android...

Catfriend1 commented 9 months ago

Does it no longer sync? The log entries are from the native. On some Android's, it's normal that the file watcher does not work for certain directories (Android restriction, SELinux, ...). But the readdirent is new to me. Maybe it's caused by the previous error and belongs to it or something separate?

I'm not sure, if upstream team can help here. I don't have those errors myself on custom ROM - so can't do anything either 🤷‍♂️ .

parasiteoflife commented 9 months ago

I just checked and I'm not seeing it anymore, all folders look synced now. I don't know what happened.