android icon indicating copy to clipboard operation
android copied to clipboard

Multi Account: When swithing to other Account all downloaded data from previous account is being deleted locally

Open fabolhak opened this issue 3 years ago • 8 comments
trafficstars

⚠️ Before posting ⚠️

  • [X] This is a bug, not a question or an enhancement.
  • [X] I've searched for similar issues and didn't find a duplicate.
  • [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • [X] I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Configure two accounts
  2. Download some data locally on first account
  3. Switch to second account
  4. force close app in settings (not sure if that is needed)
  5. Open App again
  6. Switch back to first user

Expected behaviour

Locally downloaded data for first user should still be available.

Actual behaviour

All downloads from first user deleted. Needs manual download again.

Android version

9

Device brand and model

Xiaomi Mi A1

Stock or custom OS?

Stock

Nextcloud android app version

3.22.3

Nextcloud server version

24.0.7

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

Not sure if this behavior is intended or not. For me it feels like a bug. Can provide further logs if necessary :)

fabolhak avatar Nov 12 '22 08:11 fabolhak

Cannot reproduce. Can you get a logcat from the Android device so we can see if there's any errors? Instructions here: https://github.com/nextcloud/android/blob/master/README.md#getting-debug-info-via-logcat-mag

Feel free to search and replace the server URL, username and other file names in the output.

AlvaroBrey avatar Nov 14 '22 08:11 AlvaroBrey

Hello, thank you for the quick reply. It took me a while to generate the logs and strip all personal information.

What I basically did:

  1. Initially logged in at [email protected]
  2. Switched to [email protected]
  3. Switched back to [email protected]

I had to manually download the file SomeFolder/SomeFile after I was switching back to first.account. Even though, it was already downloaded before all the switching.

Hope you can find something useful out of the logs. Let me know if there is anything missing.

nextcloud.log

fabolhak avatar Nov 23 '22 01:11 fabolhak

This has been happening to me since at least September, also on Android 9. Thank you for finding the repro conditions for this! It's nice to finally know why my files keep disappearing...

I can reproduce the file deletion with the steps given, without having to force-kill the app.

If another logcat is needed to help debug this, I can generate one too.

mrjohnson22 avatar Dec 20 '22 03:12 mrjohnson22

I have the same issue with local files sometimes deleted without knowing why, but I can't reproduce with the steps given. So for the moment I don't know why my files keep disappearing, it happens about a few times per year...

tomdereub avatar Feb 27 '23 11:02 tomdereub

@tomdereub Are you also on Android 9?

joshtrichards avatar Dec 23 '23 22:12 joshtrichards

@joshtrichards I'm on adroid 12 (lineageos 19.1).

tomdereub avatar Dec 24 '23 21:12 tomdereub

I bought a new phone which runs LineageOS 20. The issue disappeared for me and everything works fine now. I guess it was probably due to some resource limitation on my old phone which was quite old.

Not sure if I should close the issue now or keep it open.

fabolhak avatar Dec 30 '23 18:12 fabolhak

I can confirm this still happens to me (on the same device it occurred for me the last time I commented here).

Interestingly, Android's native "Open from" file picker is able to sync files from Nextcloud accounts other than the primary account that the app is logged into, and local files from any account persist on the device. The only action that wipes all of an account's local files is using the Nextcloud app to switch to a different primary account.

mrjohnson22 avatar Feb 02 '24 01:02 mrjohnson22

Update: this issue does not happen on some Android 14 phones I've installed the app on. This is consistent with the issue being absent on LineageOS 20.

Could the issue be related to Android APIs and not just resource limitations?

mrjohnson22 avatar Mar 10 '24 20:03 mrjohnson22