nextcloud / android

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

Media tmp files aren't cleaned up after upload #10715

Open z3ntu opened 1 year ago

z3ntu commented 1 year ago

⚠️ Before posting ⚠️

Steps to reproduce

  1. Press + FAB -> Upload content from other apps -> (Google) Photos -> Select ~100 photos/videos (note: I uploaded to "External storage" configured in web UI which was another Local directory on my server, not sure if this makes a difference)
  2. Observe all photos being uploaded...
  3. Checking with Disk Usage app (e.g. https://f-droid.org/packages/com.google.android.diskusage/) you can see the uploaded files will be duplicated in Internal storage Android/media/com.nextcloud.client/nextcloud/myuser@myserver/ (sidenote [0]) and Internal storage Android/media/com.nextcloud.client/nextcloud/tmp/myuser@myserver/
  4. After deleting the files cached in Nextcloud app again via "On device" the app the files in Android/media/com.nextcloud.client/nextcloud/tmp/myuser@myserver/ continue to persist on disk and use up storage.

[0] I find this honestly a questionable decision because this will essentially duplicate all uploaded files and in my case I uploaded ~8GB so afterwards I had 8GB more used, but this issue is not about this.

Expected behaviour

The files in the tmp subdirectory shouldn't exist after they've been by whatever creates them.

Actual behaviour

The files in tmp subdirectory continue to exist.

Android version

11

Device brand and model

Fairphone 4

Stock or custom OS?

Stock

Nextcloud android app version

3.21.1

Nextcloud server version

24.0.4

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

No response

auroraanna commented 1 year ago

I think I'm having the same issue when trying to backup my apps and other files with Seedvault to Nextcloud. After the backup the Nextcloud app has 5.25 GB in user data and it's not going away.

z3ntu commented 1 year ago

@auroraanna If you select "On device" section in the navigation drawer, do you see any files listed there?

auroraanna commented 1 year ago

@z3ntu Not sure, I think there wasn't anything there. I uninstalled the app so I can't tell you. It took up dangerously much space to the point where Android was warning me that I only had 400 MB left.

auroraanna commented 1 year ago

Not giving Nextcloud filesystem permissions solves it though I can't use the app for much else now.

auroraanna commented 1 year ago

Nope, still taking up 5+ GB

z3ntu commented 5 months ago

The Nextcloud app on my phone again takes up around 8GB, probably mostly camera pictures/videos that are synced using the auto-upload feature. Even some (hidden) button in the settings to clean this stuff up would be great, if the bug can't be fixed anytime soon.