nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.99k stars 785 forks source link

[Bug]: Folders deleted on Desktop Client are never deleted on the server with E2EE enabled - inconsistent sync state #5918

Open bcutter opened 1 year ago

bcutter commented 1 year ago

⚠️ Before submitting, please verify the following: ⚠️

Bug description

Folders deleted on a Windows endpoint are only deleted locally, but never on the NC server as long as E2EE is activated in the Desktop Client.

It is for sure a leftover from https://github.com/nextcloud/desktop/issues/5564 where all that mess started.

Once E2EE is disabled (in the Desktop client itself), all previous performed deletions are performed instantly, so the "folder deletion queue" is being emptied. On the server they are removed, also the activity app confirms this.

Steps to reproduce

  1. Enable E2EE (install app, activate on the Desktop client)
  2. Create a folder (no matter if done on the web, another endpoint like iOS/Android client or the same Desktop Client, also doesn't matter if inside or outside an E2EE folder - right, it also affects folders outside of E2EE folders!)
  3. Make sure the created folder exists on the server, maybe additonally check activity app
  4. Delete a folder on the endpoint with Desktop client

Expected behavior

The folder is deleted locally and on the server.

Which files are affected by this bug

Every (!) folder, no matter if empty or not

Operating system

Windows

Which version of the operating system you are running.

Windows 10

Package

Appimage

Nextcloud Server version

27.0.1.2

Nextcloud Desktop Client version

3.9.0

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 3.4.2 to 3.4.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

Are you using an external user-backend?

Nextcloud Server logs

Nothing in logs.

Additional info

bcutter commented 1 year ago

Update:

  1. Current workaround is to regularly (sometimes multiple times a day) disable E2EE on the endpoint, let NC sync everything (including deletion of folders) and re-enable E2EE with the not-so-handy passphrase again. A pain in the evening, needless to say.

Either correct sync or E2EE - both is not possible.

  1. Tested this meanwhile on multiple Windows endpoint (Win10), one with NC desktop client v3.9.0, one with v3.9.1 - same results.
bcutter commented 1 year ago

Ahm, can we have ANY response please after two weeks?

Will 3.9.2 contain anything resolving this issue maybe?

bcutter commented 1 year ago

One more month without any response.

Even 3.9.4 made no change so far. Of course not, because nobody took care of this so far... 🤨

mgallien commented 1 year ago

the fact that a non empty e2e encrypted folder cannot be deleted is on purpose you cannot recover the deleted files as they are encrypted (i.e. server does not even know their names) hence this limitation

bcutter commented 1 year ago

WRONG!

@mgallien You didn't get the point here, please read the issue description.

Folders OUTSIDE (!!!) of E2E encrypted folders are affected.

The only connection to E2E is: once you disable it in the desktop client, the "queue" of folders to be deleted (from local 2 server) or which have been deleted (from server to client) is emptied, in other words:

So reopen and let's work on that, finally.

bcutter commented 1 year ago

@mgallien See latest post. Reopen. Thanks.

bcutter commented 1 year ago

@mgallien Reminder 2.

bcutter commented 1 year ago

@mgallien reminder 3.

Do I need to open another issue for the very same bug?!? Come on.

bcutter commented 11 months ago

How can we fix this finally?!?

bcutter commented 11 months ago

@mgallien ?

bcutter commented 10 months ago

Ping @mgallien

joshtrichards commented 10 months ago

@bcutter Stop with the weekly/biweekly personal dev pings or I'll lock this issue. Thank you.

bcutter commented 10 months ago

Ok sir. So this means someone will finally have a look and fix this?

You'd be kind of motivated too if this bothers you on an every day basis creating REAL-LIFE problems.

Very frustrating to see absolutely ZERO progress after such a long time. Not even being asked to test or provide something. Really great. Sit and wait. Thank you.

bcutter commented 9 months ago

Tested with latest stable 3.10.1 on all Windows endpoints - no change. To sync deleted folders remotely/locally, one needs to

  1. disable E2EE
  2. let the client sync (deletions are now actually performed, even if they happened already days or weeks ago)
  3. re-enable E2EE

Curious to see if 3.11.0 will change something. I doubt it.

bcutter commented 8 months ago

Same with 3.11.0. I wonder if

  1. my NC is the only instance all over the world affected by this bug or if

  2. others, especially those with one (Windows) endpoint only, are affected but simply never discover this (you need to compare web/server with the endpoint) and

  3. if I could do or test or pay or provide anything on top of my current initial issue description to help devs.

At least 3) really could be answered, hopefully. I don't like the moderate to high probability this issue otherwise will end like https://github.com/nextcloud/end_to_end_encryption/issues/248#issuecomment-1879106724.

ph00lt0 commented 8 months ago

@bcutter honestly just going to tell you this isn't going to lead to anything. I used to be a naive Nextcloud fan boy basically since the company was founded. I had high hopes they would focus getting a stable FOSS solution. My frustrations are best described in tldr format here: https://discuss.privacyguides.net/t/remove-nextcloud/13907?u=ph00lt0. Just saying Nexcloud has always been like this and will stay a hobby project in the way that the current leadership is driving this car. I do feel sad about that.

bcutter commented 7 months ago

I want to share a fresh experience:

With NC Desktop client v3.12.0.20240213 (which does not contain anything related to this issue afaics according to https://github.com/nextcloud/desktop/releases/tag/v3.12.0) running since 2024-02-18, yesterday E2EE had an issue out of nowhere with adding or deleting files from one specific E2EE storage subfolder (started with one particular file - all other subfolders of E2EE encrypted storage and non-E2EE storage worked just fine), right after I had to go through the "disable E2EE locally temporarily to get other folders outside E2EE storage deleted, basically empty the deletion queue" workaround.

I then

I've gone through this "fix E2EE sync issues" in almost the very same way many times over the last years.

Today I accidentally discovered, that - with E2EE enabled (!) - folder deletions from outside E2EE folders, both locally and on the server, seem to sync just fine, meaning: folder deletions are performed instantly (normal expected behaviour, but... see the issue description). No clue why so far (I don't think it's the 3.12 release but rather the last "fix E2EE sync issue" process described above I went through) but for the moment for this single Windows endpoint it seems like the issue is not existing for now.

Unfortunately I did not have a look at the backend (NC log did not contain anything related, shown on warning level) like the lock tables in the database or sth. like that.

I will need to


Update: I was excited a bit too early. Seems like there are fundamental issues with E2EE now, discovered when I tried to use it on another endpoint (iOS), see https://github.com/nextcloud/ios/issues/2809.

How can I start from scratch with E2EE? I need (or think it's worth a try) a complete reset, including everything on the server including private keys etc.