android icon indicating copy to clipboard operation
android copied to clipboard

Internal 2-way sync does not pick up files / folders created/modified/deleted outside nextcloud app

Open tobias0409 opened this issue 1 year ago • 11 comments

⚠️ 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. Enable 2-way synchronization for a folder
  2. Create a file/folder using the Android file browser, modify an existing file/folder, or delete a file/folder using the Android file browser
  3. Wait for the next synchronization to begin
  4. The Nextcloud Android App fails to detect the files, or in other words, it does not recognize the changes

Expected behaviour

It should be possible to create, modify, or delete a file or folder outside the Nextcloud app (e.g., using the phone's file browser or any other app with access to the synced folder).

Actual behaviour

When creating, modifying, or deleting a file or folder outside the Nextcloud app, the app does not recognize the changes and fails to detect the new files. Despite this issue, the sync operates normally every 15 minutes.

Android version

14

Device brand and model

Samsung Tab S7 FE

Stock or custom OS?

Stock

Nextcloud android app version

3.30.1 RC1

Nextcloud server version

29.0.6

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

I have already described the issue in detail in PR #13294 .

tobias0409 avatar Oct 09 '24 17:10 tobias0409

Thanks for opening this @tobias0409

I have the same issue on my Pixel 5a

You can see some of the details of my issue here.

superzanti avatar Oct 09 '24 20:10 superzanti

Same issue here, Pixel 8 with GrapheneOS atm

derutaramuda avatar Oct 10 '24 20:10 derutaramuda

Can also confirm this issue, Fairphone 5 with CalyxOS.

Akselmo avatar Oct 28 '24 11:10 Akselmo

Same here. Pixel 6 with GrapheneOS and Nextcloud Client 3.30.4

  1. Set up folder Logseq and sub-folders as 2-way sync.
  2. Open Logseq client and create a new journal entry (creates a new file in Logseq sub-folder).
  3. Check in Android file manager that new file actually exists.
  4. Wait.
  5. New file is not synced after a day although sync is set to 15 minutes.
  6. Upload new file manually in Nextcloud Client.
  7. File is synced to server and desktop client immediately.

motareis avatar Nov 03 '24 12:11 motareis

I hate to say it, but I ended up purchasing a license to FolderSync. For all who are waiting on a solution, I suggest you do the same - This has been a game changer for my note-taking.

I believe it will be a better solution. This has been an issue in nextcloud/android for years. FolderSync has native support for nextcloud too. And I just set it up to sync my existing nextcloud folders that I have in android. It works great and has a much higher level of configurability than I believe this feature will get anytime soon.

superzanti avatar Nov 04 '24 16:11 superzanti

@superzanti thanks for sharing. I might end up looking at that.

I have just experienced file corruption using the two way sync.

  • Set up two way sync on the android app (3.30.3) on a folder called Keepass (you do this by going to Details on the folder, then checking the sync checkbox).
  • Opened one of the keepass files within that folder from within Nextcloud. It opened the KeepassDX app.
  • Saved the file in the external (KeepassDX) app, as normal.
  • come back a day later, thinking it should be all sync-ed: file is corrupted, will not load in KeepassDX on android or KeepassXC on desktop. Had to roll back to backup; lost the new password I added.

This needs a lot more testing before being available for use. (possible other example of someone using Keepass + Nextcloud losing their data)

Incidentally: the method I outline here used to work (as long as I manually chose Sync on the file after saving).

artfulrobot avatar Nov 06 '24 12:11 artfulrobot

You know, I use keepass and haven't had this issue before. I rarely update keepass on my phone. But regardless, notes seem to sync fine.

Does this happen with just a text file? What kind of timing do you have? like is it 5 min before switching to another device and interacting with that file? 10?

superzanti avatar Nov 06 '24 17:11 superzanti

@superzanti came back a day later. So no idea at which point nextcloud corrupted the file.

artfulrobot avatar Nov 07 '24 08:11 artfulrobot

hi. a update on this, this just happened to me. if i hadnt enabled versions i would have lost my keepass password database.

i got 2 nextcloud clients on linux and windows and a android client. im pretty sure my android didnt have access to the nextcloud server a week ago (when the corrupted file got synced) i can pull up versions of both keepass and nextcloud on all 3 of my devices. as well as server version. also i can give you guys a diff of the hex of my database file before and after corruption. let me know if you guys need anything.

Soltinator avatar Jan 20 '25 14:01 Soltinator

I have the same problem. Apparently, the whole 2-way sync is just a 1-way sync, and that only every 15 minutes at least, and only via Wi-Fi. 🤷‍♂️

I'm slowly starting to regret choosing Nextcloud.

Markoise avatar Jun 04 '25 18:06 Markoise

@Markoise Gentle reminder that this is a GitHub issue discussion, not a forum board! I am also discontent with the situation, but putting aside the fact that what you might be referring to is actually Google's fault, I'd ask to keep the discussion solely on technical info.

(I am no representative of Nextcloud btw. I just like to keep GitHub issues clean from "me too!")

With the latest (working) version, ~~the files seem to sync~~ other than not syncing, they're stuck in Android/media files instead of us being able to pick somewhere in internal storage, which I'd say is the best end for this functionality.

Keyaku avatar Jun 05 '25 06:06 Keyaku

Same issue here. Went to Details and checked Sync for Notebooks/Obsidian/. Once files stopped pulling down, launched Obsidian, pointed to Notebooks/Obsidian/Notes/, and it showed existing Test1.md.

Created new note Test2.md, waited half an hour, and no such file on server. Opened Test1.md and added text, checked back twenty minutes later, and the text is on the server.

So it appears that I can update existing files and the changes will go to the server, but I cannot create new files (or folders, both of which are how the note program function).