nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.28k stars 1.77k forks source link

Image in /storage/emulated/0 breaks auto upload #8019

Closed delbonis closed 3 years ago

delbonis commented 3 years ago

I'm not 100% sure what I think is happening is actually the source of the issue, but this is what my understanding of it is. I ran into this situation because I used the VeoRide app to rent an electric scooter in my city (it's the kind it charges you like 5 cents per minute and you use it for like 20 minutes), and when you finish riding the scooter it has you take an image of where you left the scooter, but they don't clean up the temporary file it generated when you take the picture.

Steps to reproduce

  1. Put an image (for me it was named like image.jpeg) in /storage/emulated/0, not in any subdirectory. You don't have to try to make the app sync that dir to cause the issue.
  2. Try to use auto-upload with any other directories, like /storage/emulated/0/Pictures.

Expected behaviour

Actual behaviour

Environment data

Android version: 10

Device model: Pixel XL (2016)

Stock or customized system: stock

Nextcloud app version: 3.15.0

Nextcloud server version: 19.0.7

Reverse proxy: nginx, whatever the current version from Debian is.

Logs

There wasn't anything relevant on the server (since it seems like purely client issue). I can probably try to recreate the problem and share logcat if that's needed.

tobiasKaminsky commented 3 years ago

Does AutoUpload work with a subdirectory?

delbonis commented 3 years ago

The UI doesn't show any issues and lets you configure auto-upload on all the subdirectories you'd expect it to (like Downloads, the actual camera pictures dir, etc.), but it never actually does anything. When you delete the bugged picture in the root it goes back to behaving normally.

tobiasKaminsky commented 3 years ago

image

First is /storage/emulated/0 Second is /storage/14E8-2E10 (sdcard)

Still upload works fine.

delbonis commented 3 years ago

That's interesting, I can try to recreate the issue and get back to you with an actual logcat.

jeffWelling commented 3 years ago

@delbonis Can you share how many files are in the directory you're trying to auto upload? AutoUpload is failing for me as well and I'm wondering if it's related to the number of files in the directory. In another ticket it's mentioned that they might not run tests against directories with lots and lots of files already in there. (https://github.com/nextcloud/android/issues/8119)

delbonis commented 3 years ago

@jeffWelling There was on the order of 5000 files total between each sync group. Split up there were fewer in each once I had deleted the image directly in /storage/emulated/0, so that might have had something to do with it.

github-actions[bot] commented 3 years ago

This bug report did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!