Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow 2-way-sync #19

Open
ThomasSteinbach opened this issue Jun 14, 2016 · 136 comments
Open

Allow 2-way-sync #19

ThomasSteinbach opened this issue Jun 14, 2016 · 136 comments

Comments

@ThomasSteinbach
Copy link

ThomasSteinbach commented Jun 14, 2016

When 'syncronizing' a folder in the nextCloud app, actually changes from the remote server become propagated on the mobile device. However changes on the mobile device aren't uploaded back to the remote server.

How the nextCloud app should behave:

  • files added to a synchronized folder should be scanned/recognized
  • changes to files (create, update, delete) of a synchronized folder should be propagated back to the server
  • conflicting changes should open a dialog (overwrite on device/server, rename)
@AndyScherzinger
Copy link
Member

@przybylski @tobiasKaminsky can you take a look at this issue? I thought we already this (or have a branch for this) and also I thought we do this for files (but maybe not for folders yet).

@tobiasKaminsky
Copy link
Member

As far as I know there is no real 2 way sync yet.
I started to implement that any folder can be instant uploaded to server, but that is still an enhanced one way sync...

@mabkenar
Copy link
Member

The current situation is this: If you change a file in the phone, you have to open the Nextcloud app, go to the directory where the updated file resides, and drag down with your finger to force a refresh in that directory. Only then your changed file is uploaded to the server and appear on your other devices.

@AndyScherzinger
Copy link
Member

@mabkenar Does this also happen, when you mark the file as a favorite?

@mabkenar
Copy link
Member

Yes. As far as I can tell, making the file favorite (or recently, "Set as available offline") has no effect.

@AndyScherzinger
Copy link
Member

@tobiasKaminsky is this a bug or a works as designed and needs an improvement?

@tobiasKaminsky
Copy link
Member

@mabkenar do you have enabled sync in android -> settings -> accounts -> nextcloud?
Only then the sync is working, AFAIR

@mabkenar
Copy link
Member

Oh I see. I never touched the sync setting after I added my Nextcloud account, and now I see that sync was disabled by default (This is strange. Is this a design decision?).

Now with sync enabled, when I change a file on the server, it only appears in Android if the file is "Set as available offline". For non-"Set as available offline" files, no sync happens.

For the reverse situation: only changes made to "Set as available offline" files are propagated back to the server. All other files remain in the local device until a change in the server causes a conflict.

@mabkenar
Copy link
Member

mabkenar commented Jun 24, 2016

The situation for non-available-as-offline files that are changed from the server is problematic because while an older version of the files is downloaded to the client (say from 1 day ago), there is still a green tick mark next to the file that implies this file is up-to-date, and the client even says "last changed 10 minutes ago" (but this refers to the change in the server that has not been synced to the client). The file is never updated unless a manual "Synchronize" is issued from the client.

@mabkenar
Copy link
Member

mabkenar commented Jun 24, 2016

Oh before I confuse anyone, I am using Nextcloud provided by F-Droid, and I don't have Google's non-free stuff installed on my device. Could this make any difference?

@LeonardoGentile
Copy link

As a potential new user this is not very clear to me. Could someone from the organization clarify this? Is this feature (2-way-sync) working/planned/workaround? possibly point us to the docs?

@AndyScherzinger
Copy link
Member

@mabkenar f-droid version with any Google service shouldn't be an issue
@LeonardoGentile at the moment the status would be "planned", thus the discussion/issue

@LeonardoGentile
Copy link

@AndyScherzinger any update or timeline for this?

@AndyScherzinger
Copy link
Member

Hi @LeonardoGentile as stated by #19 (comment) we don't really have a two way sync at the moment. We are working on the first step towards folder sync #285 -> #358. The two way sync is basically the last step planned to be added to that new implementation. A timeline is hard to tell since at the moment all people actively working on the app a community contributors. Since @tobiasKaminsky is aiming at having two way sync this feature has a high priority, not sure if he could name any timeline from his point of view. So for now we only have the road map outlined in #285.

On a file level "Set as available offline" should do the trick at the moment, so you should be able to activate this on a file basis but you can't do it on a (arbitrary) folder level.

@pascalBokBok
Copy link

Is this the right issue if I just want my phone's camera folder to be synchronized with a folder on Nextcloud, including deletions?

@mario
Copy link
Contributor

mario commented Feb 25, 2017 via email

@thibaultmol
Copy link

Bountysource

@BentHaase
Copy link

!remind me in 6 years

@clawoflight
Copy link

What's the state on this? Can someone clarify what does and does not work - e.g. if I mark a folder as synced, will files available in that folder be synced if I make local changes?

@LiZhenhuan1019
Copy link

LiZhenhuan1019 commented Oct 15, 2019

As I tested on my phone, with client version 3.8.1, 2-way-sync has only been partially implemented.

Here is the result:

  • Add file in the cloud and press sync button on parent directory in android app: Local file will appear.

  • Remove file in the cloud: Local file will automatically disappear.

  • Add file locally: The file will not be uploaded to cloud even pressing sync in android app, except when there's already a not synced file with same name and path in the cloud, in which case the local file will override the cloud file after pressing sync.

    The only way to upload a new file to cloud in android app is to press "Upload files" and select the file manually.

  • Remove file locally: The file will remain in the cloud, and no longer be synced in android app.

  • Rename file: Renaming is treated to be removing old file and adding new file.

    So, renaming in the cloud will make local file disappear and new file not synced. Press sync will make the file sync and local file with new name appear.

    However, renaming local file will only make cloud file not synced. Thus, pressing sync will only download file with old name and make the old file and new file both exist in local file system, which is not acceptable.

  • The good news is that: Press sync and modification to file content will be propagated to the other side.

    Content conflict will trigger conflict resolution as expected, which let the user choose to keep either or both files.

Here is what has been done and what need to to:

  • Propagate changes to file content to the other side.
    • No need to press sync every time manually: It should be done automatically.
  • Propagate adding and removing files from cloud to local.
    • No need to press sync every time when there's new file added in the cloud.
    • No need to press sync every time when there's file removed in the cloud.
  • Propagate adding and removing files from local to cloud.
    • No need to press sync or upload every time.
  • Correctly handles local file renaming, which should be automatically done if local file adding and removing is propagated to cloud.
    • Detect file renaming and update local/cloud without downloading/uploading file content.

Currently the most important case as I see, propagation of changes to local file content, has been implemented, though it need to be triggered manually.

Hope to see android client work the same way as desktop client.

@rt87

This comment has been minimized.

@hockeymikey

This comment has been minimized.

@unf0rg0tt3n
Copy link

Based on the labels on nextcloud/files-clients#42, it seems to be planned for later this year.

Can't wait until October, November or December 😀

@GTP95
Copy link

GTP95 commented May 20, 2024

As long as there's some coordination with the Nextcloud team, there's no reason to stop working on this feature. @hax0rbana-adam, did you contact Nextcloud devs to see how to coordinate your effort with them?

@Bluejanis
Copy link

@hax0rbana-adam If you want to get paid then apply to nextcloud. They have an open position for Android Developer: https://nextcloud.com/jobs/
Nothing interesting there, sadly.

Do you really use PHP for the backend?

@Bluejanis
Copy link

Bluejanis commented Jul 11, 2024

@SuborbitalPigeon Why the downvotes? Have you been working on it? Because it is still not working as of today 👎
Or was it just to show your unrelated frustration about the world?

@SuborbitalPigeon
Copy link

SuborbitalPigeon commented Jul 11, 2024

@SuborbitalPigeon Why the downvotes? Have you been working on it? Because it is still not working as of today 👎 Or was it just to show your unrelated frustration about the world?

No, I just have a dislike for comments which add nothing (things like '+1') or other useless noise. This applies across any project, I don't contribute to this one. Yes, I appreciate the irony.

Or was it just to show your frustration with your job as a mechanical engineer?

If only. If anyone has any work going, please get in touch.

@CptCurk
Copy link

CptCurk commented Aug 5, 2024

Hello,
I was looking for this feature "two-way sync", as I store all my music files on my server. Actually I can sync manually. But that would be amazing if that "make offline feature" would be like a 2 way sync, or having both choices, as having offline files is important too for bkp somehow.

Any way if it's there and I missed it, I'm sorry ! :D

@essys
Copy link

essys commented Aug 5, 2024

I've read the contributing guidelines, setup instructions, how to get help, and will check out that public (voice?) chat link when I start diving into the code. I have two test phones charged and looked up the build instructions. Basically a bunch of prep work that I can do when I have an extra 20 minutes of free time, but no real work yet.

I'm still trying to clear up time on my schedule to actually start work on this. I expect it'll be another month or two before I really start making any real progress.

I appreciate the words of encouragement and everyone's patience with me being slow to get started. ❤️

It's been five months since your last message.
Is there anything we 'non-programmers' can do to support you?

@sunjam
Copy link

sunjam commented Aug 7, 2024

It's been five months since your last message.

See the linked pull request under active development a few posts earlier in the thread. Here #13294

@hax0rbana-adam
Copy link

I've had some things in my life take priority over working on this, but I am thrilled to see there is an .apk that is available for testing.

The biggest thing non-programmers (or, frankly, programmers who are not already familiar with this code base) can do would be to test it out and report back which parts work and which don't.

Be sure to include things like what version of Android you're using, your make and model of phone, and what version of Nextcloud the server is using. If you can give step by step instructions so others can reproduce any problems, that's extremely valuable.

But remember, just hearing back that people have treated it and it works well is helpful. Knowing that it was independently tested and works well is helpful to people considering to merge the changes onto the default branch so they can make it into the next official release!

#13294 (comment)

@jancborchardt jancborchardt moved this from 🏗️ At engineering to 🧭 Planning evaluation / ideas in 🖍 Design team Sep 5, 2024
@miltuss
Copy link

miltuss commented Oct 2, 2024

It doesn't work, clicking on the internal 2-way-sync nextcloud parameter sends me to a blank page. And I'm not the only one in this situation!

2024-10-02_Sélection_001

How to solve this problem?

@Hannes-Schniz
Copy link

It doesn't work, clicking on the internal 2-way-sync nextcloud parameter sends me to a blank page. And I'm not the only one in this situation!

2024-10-02_Sélection_001

How to solve this problem?

I had the same issue. The newest PR fixed it for me. I hope this comes with the next official release. #13612

@joshtrichards joshtrichards removed the feature: transfers [WIP] Any uploading / downloading matters that aren't auto upload or sync specific label Oct 3, 2024
@miltuss
Copy link

miltuss commented Oct 8, 2024

I had the same issue. The newest PR fixed it for me. I hope this comes with the next official release. #13612

@Hannes-Schniz Thanks for the information. Can you explain to me how you were able to install it with the patch on Android?

@Hannes-Schniz
Copy link

I had the same issue. The newest PR fixed it for me. I hope this comes with the next official release. #13612

@Hannes-Schniz Thanks for the information. Can you explain to me how you were able to install it with the patch on Android?

You simply download the apk listed in the issue and install it. Itll install next to your existing without any issue. Then you should have all the functionality. Beware that its a separate app tho and youll get a separate app folder. So you need to open a new vault in obsidian. Hope this helps

@miltuss
Copy link

miltuss commented Oct 9, 2024

You simply download the apk listed in the issue and install it. Itll install next to your existing without any issue. Then you should have all the functionality. Beware that its a separate app tho and youll get a separate app folder. So you need to open a new vault in obsidian. Hope this helps

I did exactly that, but this APK has the exact same bug !
The blank page is still there

@NeroBurner
Copy link

Android 14 in Pixel 6a. Nexctcloud 3.30.4 from FDroid

Two way sync was enabled without my interaction and it uses all of the available mobile data and drains battery. I first didn't know what happened. Always syncing and redownloading everything. Even if I cancel the sync or delete the local files. They are synced again.

Not even disabling the two waysync feature stops this. Neither disabling all folders nor disabling the feature.

It started with audiobooks in Antennapod that I already finished and removed again. Only way to stop it was to remove the filders from nextcloud server.

But now the Android client downloads everything else! Please help!

@unf0rg0tt3n
Copy link

Android 14 in Pixel 6a. Nexctcloud 3.30.4 from FDroid

Two way sync was enabled without my interaction and it uses all of the available mobile data and drains battery. I first didn't know what happened. Always syncing and redownloading everything. Even if I cancel the sync or delete the local files. They are synced again.

Not even disabling the two waysync feature stops this. Neither disabling all folders nor disabling the feature.

It started with audiobooks in Antennapod that I already finished and removed again. Only way to stop it was to remove the filders from nextcloud server.

But now the Android client downloads everything else! Please help!

You are running the dev version? Because all other release builds are 3.29.2. You shouldn't run test in your personal production if you're not prepared for the consequences. But that's my 2 cents

@mrwsl
Copy link

mrwsl commented Nov 8, 2024

You are running the dev version?

3.30.4 is the latest release.

But now the Android client downloads everything else! Please help!

Reinstalling helped me.

@sclu1034
Copy link

sclu1034 commented Nov 8, 2024

all other release builds are 3.29.2. You shouldn't run test in your personal production if you're not prepared for the consequences. But that's my 2 cents

@unf0rg0tt3n On F-Droid, I see Nextcloud and Nextcloud Dev. Given that the latter exists, the former looks like a release build to me. It lists versions 3.30.2, 3.30.3 and 3.30.4.

@unf0rg0tt3n
Copy link

all other release builds are 3.29.2. You shouldn't run test in your personal production if you're not prepared for the consequences. But that's my 2 cents

@unf0rg0tt3n On F-Droid, I see Nextcloud and Nextcloud Dev. Given that the latter exists, the former looks like a release build to me. It lists versions 3.30.2, 3.30.3 and 3.30.4.

Strange this morning mine still said 3.29.2, it now shows updates. Google play store still doesn't show updates. Is it a different source?

@NeroBurner
Copy link

You are running the dev version?

3.30.4 is the latest release.

But now the Android client downloads everything else! Please help!

Reinstalling helped me.

Manually uninstall and then reinstall (and loose all configs) or reinstalling the APK without loosing configs?

@b3
Copy link

b3 commented Nov 8, 2024

I use also the Nextcloud android app from F-Droid which is version 3.30.4.

It also switches on the Bidirectional intern sync without warning me, and it also started to fill my phone space.

In order to stop filling the phone I add to :

  1. go to Settings > Bidirectional intern sync
  2. disable Enable two way sync
  3. manually find and remove the already copied folders.

I like that feature and will use (I will choose some specific folder only) it but the fact that it is on by default on upgrade is not nice at all.

I hoped that it may have warned me that this new features is on by default and on the full distant server or offer to choose which folder to sync and on which local phone folder (as on the desktop version).

I fear that a lot of non-technical aware users may be very disappointed and may have a lot of difficulties to identify the problem with their phone filling up. Once they will discover it comes from this app some kind of trust on the app (and Nextcloud in general) may be lost :-(

@Croydon
Copy link

Croydon commented Nov 9, 2024

I was already wondering why the latest version is not in the Play Store available. 3.30.4 is tagged on GitHub as the latest stable version. If it isn't meant to be a stable version then it should be tagged as a pre-release. If it's meant to be stable, then why isn't it available in the Play Store?

@unf0rg0tt3n
Copy link

I was already wondering why the latest version is not in the Play Store available. 3.30.4 is tagged on GitHub as the latest stable version. If it isn't meant to be a stable version then it should be tagged as a pre-release. If it's meant to be stable, then why isn't it available in the Play Store?

My thought exactly

@frederikb96
Copy link

I use also the Nextcloud android app from F-Droid which is version 3.30.4.

It also switches on the Bidirectional intern sync without warning me, and it also started to fill my phone space.

In order to stop filling the phone I add to :

1. go to _Settings > Bidirectional intern sync_

2. disable _Enable two way sync_

3. manually find and remove the already copied folders.

I like that feature and will use (I will choose some specific folder only) it but the fact that it is on by default on upgrade is not nice at all.

I hoped that it may have warned me that this new features is on by default and on the full distant server or offer to choose which folder to sync and on which local phone folder (as on the desktop version).

I fear that a lot of non-technical aware users may be very disappointed and may have a lot of difficulties to identify the problem with their phone filling up. Once they will discover it comes from this app some kind of trust on the app (and Nextcloud in general) may be lost :-(

I also have a friend, having exactly the same problem. Overall, I am very glad that so much progress have been made. But would be important to not auto enable this when updating to this new version 😃

@haeringer
Copy link

haeringer commented Dec 19, 2024

I am very happy to see two-way-sync finally implemented! During testing, however, I noticed that subdirectories are not synchronised, i.e. they are not downloaded from the server. In the app, however, the "synchronise" checkbox is automatically ticked for the subdirectories if it is active in the parent directory, which makes sense and implies that these contents should also be synchronised.

Is this something known? @ZetaTom I couldn't find an issue for this, but I can't imagine that nobody has noticed it yet ;) Version is 3.30.6 on Android 15 / Pixel 6a.

@sol8712
Copy link

sol8712 commented Dec 26, 2024

I am very happy to see two-way-sync finally implemented! During testing, however, I noticed that subdirectories are not synchronised, i.e. they are not downloaded from the server. In the app, however, the "synchronise" checkbox is automatically ticked for the subdirectories if it is active in the parent directory, which makes sense and implies that these contents should also be synchronised.

Is this something known? @ZetaTom I couldn't find an issue for this, but I can't imagine that nobody has noticed it yet ;) Version is 3.30.6 on Android 15 / Pixel 6a.

The app has never reliably synced subfolders as tracked in #269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🧭 Planning evaluation / ideas
Development

No branches or pull requests