Skip to content

[Bug]: Client deletes server files after power loss during initial sync #9280

@DanieliusKib

Description

@DanieliusKib

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

Bug description

Summary

The Nextcloud desktop client incorrectly deletes files from the server after a power outage occurs during initial sync. Files that were queued for download but not yet completed are marked as "deleted locally" and removed from the server without user confirmation.

client debug.zip

Evidence from Logs

20251228_0943_permanent_delete.log

Steps to reproduce

  1. Fresh Linux installation with Nextcloud desktop client (Flatpak version)
  2. Configure client to sync a large folder from server to local machine (first-time sync)
  3. Begin initial sync - files start downloading from server
  4. Simulate power loss (hard shutdown of PC) while sync is in progress
  5. Restart PC and Nextcloud client
  6. Client resumes sync

Actual Behavior

  • Client deletes files from server that were in download queue but incomplete
  • No warning or confirmation dialog
  • Files silently moved to server trash
  • User discovers data loss only when checking server thrashbin

Expected behavior

  • Client should recognize incomplete initial sync state
  • Files that were queued but not downloaded should resume downloading
  • Client should NOT propagate local deletions to server during initial sync
  • At minimum, prompt user before deleting files from server
  • Industry standard behavior: initial sync should be download-only until complete

Which files are affected by this bug

VID_20191005_204223.mp4 (178 MB), VID_20191005_213450.mp4 (116 MB), received_1037655676441536.mp4 (15 MB)

Operating system

Linux

Which version of the operating system you are running.

Bazzite 43

Package

Community FlatPak

Nextcloud Server version

32.0.2 (internal version: 32.0.2.2)

Nextcloud Desktop Client version

4.0.4 (Flatpak, stable branch)

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

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

  • Default internal user-backend
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Nextcloud Server logs

Server logging level: Warning (limited verbosity)
No relevant server-side logs found for the deletion operations at time where issue occured
Client-side logs (attached) provide complete context of the issue.

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions