nextcloud / android

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

Android App syncing issue #12641

Open zmaier24 opened 8 months ago

zmaier24 commented 8 months ago

⚠️ Before posting ⚠️

Steps to reproduce

1) Syncing files from the Server to the Mobile Phone by clicking the synchronise button.

Expected behaviour

Only new files shall be downloaded, all files marked with the green arrow shall be excluded.

Actual behaviour

After hitting the sync button all files (also files marked with a green arrow) are marked with the blue circle-arrows and the download from all files starts.

Android version

12

Device brand and model

Samsung S10

Stock or custom OS?

Stock

Nextcloud android app version

3.28.0

Nextcloud server version

25.0.4

Using a reverse proxy?

I don't know

Android logs

No response

Server error logs

No response

Additional information

No response

skidnik commented 8 months ago

Had the same issue. Decided to reinstall the app changing the source from Google Play to FDroid. Now I have an even weirder behavior: When I sync a directory with subdirectories in it only the directory and the files in its root get downloaded, all the subdirectories are omitted. If I sync a directory that does not have files in its root, said directory is not created locally as well. The files that are synced (have green arrow on them and are present locally) still get redownloaded each time I sync the directory that contains them.

Android version: 13 Device: Sony Xperia 10 III Nextcloud android app version: 3.28.0 Nextcloud server version: 27.1.5

Edit: Downgrading the app to 3.27.0 fixes the issue.

monolied commented 7 months ago

Same issue. I made a test with a ~6GB share. Syncing with client 3.26.0 takes about 15 seconds (on an older tablet with much less power); using client 3.28.0, same share, takes ~17 minutes and re-downloads everything.

Android version: 8,11,13 Devices: Galaxy S5e, Galaxy S6, Galaxy A10 Nextcloud android app version: 3.28.0 Nextcloud server versions: 28.0.2.5, 28.0.3.2

NoelDeMartin commented 7 months ago

I recently lost some data and I think it was related with this issue, so this may be a bigger problem than it seems.

I realized this change in behaviour a while ago, after an update, but I found this open issue so I didn't give it too much thought. However, I've been travelling for a couple of weeks and changing files directly from my phone rather than my computer. So when I got home, I did a full sync on the folder rather than syncing files one by one, and to my surprise all the changes I had done in these 2 weeks were lost 😱.

Fortunately, I had been using Obsidian to edit the files and it has a built-in file recovery system (which I didn't even know existed, thank god). So I could get back most of it, but I still lost some changes that hadn't been backed up. So I'm seriously considering downgrading the app until this is solved, but that's a bummer :(.

skidnik commented 7 months ago

Steps to reproduce

  1. Have a directory structure in nextcloud storage similar to this (with parent directory only have subdirectories and no files in it, files in the sundirectories):
    ParentDir0
    β”œβ”€β”€ ChildDir1
    β”‚Β Β  β”œβ”€β”€ 01.mp3
    β”‚Β Β  β”œβ”€β”€ 02.mp3
    β”‚Β Β  └── Cover.jpg
    └── ChildDir2
    β”œβ”€β”€ 01.mp3
    └── Cover.jpg
  2. Open Nextcloud Android app, in the 'ParentDir0' kebab menu directory press Sync
  3. See that nothing happened: nothing got downloaded, no files or directories created in local storage.
  4. in Nextcloud app go to 'ParentDir0', in the 'ChildDir1' kebab menu press Sync
  5. See in the notification area that the files from 'ChildDir1' have been downloaded, but only the directories have been created in local storage, the files have stayed in the 'tmp' directory.
  6. On 'ParentDir0' press sync.
  7. See in notification area that the files from 'ChildDir1' have been downloaded, see in the file manager that the the files have now been placed under 'ChildDir1' where they should be instead of inside 'tmp' directories.
  8. On 'ParentDir0' press sync again, see in the notification area that the files from 'ChildDir1' have been redownloaded regardless of them being already in place in local sorage.
  9. See also that despite syncing the 'ParentDir0' several times the files and the directory 'ChildDir2' and files in it have not been downloaded.

Expected behaviour

Sync from remote to local storage works recursively, files that have already been synced are redownloaded only if they have been modified in remote storage since last sync.

Actual behaviour

Sync from remote to local storage does not work recursively, files that have already been synced are redownloaded each time the sync is engaged regardless of them being up to date with remote storage.

Android version: 13 Device brand and model: Sony Xperia 10 III Stock or custom OS?: Stock Nextcloud android app version: Nextcloud dev version 20240402 Nextcloud server version: 28.0.3, hosted by Hetzner.

Android logs: nc_logs.txt

Additional information: 3.28.0 has same issues. in 3.27.0 this works correctly.

DaLiV commented 7 months ago

sadly no progress on sync from cloud to android in last 8 years made ... old bugs still there where they was android has no "2-way syncing" - only "upload" instead of "sync"

https://github.com/nextcloud/android/issues/19 ... 19 - can have meaning at very begin of project was request made ...

https://github.com/nextcloud/android/issues/5902 https://github.com/nextcloud/android/issues/7861

personally has not noticed that something synced from cloud to droid in all usage times. but some posts mentions that feature was working ... https://github.com/nextcloud/android/issues/12358

so - not sure

Schneehexe commented 5 months ago

Also here with me. The synchronization no longer works for the most part. Files that are present on the mobile device are downloaded again every time they are synchronized, even if they have not been changed at all. That wastes a lot of data volume on me. Subdirectories are created during synchronization in the mobile device, but the files in them are not downloaded at all. However, if I open the folder once in the file overview in Nextcloud, the files will also be downloaded during the next synchronization. Does anyone actually care about this problem at all?

Schneehexe commented 3 months ago

Why doesn't anyone react to this bug? Why is there no answer and no indication of a workaround? Does this problem only exist for a few users, e.g. with Google Pixel 8 pro with Graphene OS?

This bug is so annoying and makes Nextcloud for Android absolutely useless. It's like having a tire without air, or a refrigerator but no electricity.

Why is there no response to this bug?

skidnik commented 3 months ago

I've switched phones (and Android major versions) since when I made previous reports, and the behavior is still the same. So go figure how rare this bug is, maybe the sync function is just not so widely used. Anyways, no one capable of fixing this seems to care enough.

@Schneehexe, I use Round Sync for the same function and it even does it faster than the NextCloud app but requires a few more taps for each sync.

Schneehexe commented 3 months ago

Thank you very much!

Immediately tried out the β€œRound Sync”. It really is a hit! You need far fewer β€œtapps” than with Nextcloud if you create a shortcut on the home screen. But the main thing is that it synchronizes reliably, which Nextcloud for Android hasn't been able to do for a long time.

So I won't pursue this issue any further, as nothing is moving. There was also an article in 'cer CT', Europe's largest computer magazine, which dealt with such issues. Da blieb Nextcloud in keinem guten Licht, weil einfach alte, bekannte Fehler nicht behoben werden.

NoelDeMartin commented 3 months ago

I use Round Sync for the same function and it even does it faster than the NextCloud app but requires a few more taps for each sync.

Hey @skidnik, thanks for the suggestion but I've tried Round Sync, and I don't think it can substitute the sync feature :(.

In particular, what I'm trying to do (and I guess most people tracking this issue), is to automatically sync whatever I change in my local files whilst pulling new changes from the server. The way that Round Sync works, is that you have to choose whether to sync local files with remote, or remote files with local. But you can't sync both ways.

Let me share an example, in case it's not clear enough. Imagine I have a folder called "Notes", and inside I have two files: a.txt and b.txt. When I activate the sync feature, I'll have this folder with both these files in my mobile device, as well as in my laptop using the Nextcloud desktop client, etc.

Now, imagine I edit a.txt in my mobile device whilst offline, the file is saved locally but won't be saved in Nextcloud until I get an Internet connection. Then, in my laptop, I edit b.txt and that is synced automatically given that I am online in my laptop. Later on, when I get connected to Wifi in my mobile phone, I would like to push the local changes to a.txt, and pull the new changes to b.txt. After the sync is completed, both my laptop and mobile device will have the latest changes of both files. Ideally, if I edited the same file in both devices, I'd get a notice that there's been a conflict, or a new file would be created with the conflicts, etc.

The way that Round Sync works, if I decide to sync local to remote; my changes in b.txt would be overwritten with the older version. If I decide to sync remote to local instead, the local changes in a.txt would be lost.

So I'm not sure how I could use Round Sync to solve this use-case... Unless I'm missing something πŸ™ˆ.

ArneVoss commented 1 month ago

Everything worked fine in Version 3.27.0, so this is clearly a bug and no new feature. To me, the synchronisation is a core function of this app and the bug makes the app pretty useless - at least for the way I use it. The bug is now a couple of months old and I wonder why nobody cares about it??

ericzolf commented 1 month ago

I don't know if it's related but I noticed recently that even the automated uploads, which I use to back-up my photos, aren't working reliably either.