nextcloud / nextcloud/desktop

[Bug]: Contents of sync folder removed during temporary problem with app auth

Open
#8,511 2 comments 0 reactions 0 assignees View on GitHub
1. to develop bug confirmed feature: :arrows_counterclockwise: sync engine
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 17h
Merged PRs (30d)
123

Description

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

- [x] This is a **bug**, not a question or a configuration issue.
- [x] This issue is **not** already reported on Github (I've searched it).
- [x] Nextcloud Server and Desktop Client are **up to date**. See [Server Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) and [Desktop Releases](https://nextcloud.com/install/#install-clients) for supported versions.
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/)

### Bug description

Laptop synced to Nextcloud server with relatively large filesystem (say >200GB), probably over 100GB of hydrated files.

Whilst conducting maintenance, I un-ticked the "Allow file system access" mark on the Nextcloud server. (I had mis-identified which auth token was no-longer used, and de-selected this option as it seemed like it would just (perhaps) prevent login or present an error. (Other options only being "Revoke" or "Wipe device").

Time passes, and I later discover that the desktop client response to this (temporary) situation has been to wipe out my entire sync'd folder on the laptop - effectively scrapping all the metadata it had sync'd and tens / hundreds of gigabytes in hydrated files.

Fortunately my instance was synced with the server, so I haven't actually lost any data - but ultimately, the behaviour was unexpected. (I imagine it would have potentially caused data-loss if laptop folder had un-sync'd / newer versions of files than on the server).

..

### Steps to reproduce

1. Sync files to client
2. De-select "Allow filesystem access" for auth-token the app authenticates vi
3. Client wipes files.

...

### Expected behavior

I had anticipated the sync client would pause syncing, or fail to log into the server to retrieve files.

Client wiping behavior is explicitly unexpected since there is a separate option you can select for "Wipe device" when managing auth tokens.

...

### Which files are affected by this bug

ALL files

### Operating system

Windows

### Which version of the operating system you are running.

Windows 10

### Package

Official Windows MSI

### Nextcloud Server version

31.0.7

### Nextcloud Desktop Client version

Daily, windows-20250728.msi Reverted to 3.17.0 rc1 now.

### 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 Disabled

### Are you using an external user-backend?

- [x] Default internal user-backend
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other

### Nextcloud Server logs

```shell
No relevant logs on server
```

### Additional info

Image

I have not uploaded logs, as the subsequent resync of metadata seems to have caused them to roll over (no logs remain from the actual deletion).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.