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

Bug: files getting deleted when syncing from another pc #3140

Open
ShadowMarter opened this issue Feb 27, 2025 · 9 comments
Open

Bug: files getting deleted when syncing from another pc #3140

ShadowMarter opened this issue Feb 27, 2025 · 9 comments

Comments

@ShadowMarter
Copy link

Describe the bug

I can't recreate it, but it happens with files modified on another PC. Most of them are synced. I use onedriveGUI.

Image

Operating System Details

Linux ohad-zenbookux3402vaux3402va 6.13.3-arch1-1.3-g14 #1 SMP PREEMPT_DYNAMIC Sat, 22 Feb 2025 20:59:18 +0000x86_64 GNU/Linux
LSB Version:    n/a
Distributor ID: Garuda
Description:    Garuda Linux Bird of Prey
Release:        Soaring
Codename:       BirdOfPrey

Client Installation Method

From Distribution Package

OneDrive Account Type

Business | Office365

What is your OneDrive Application Version

onedrive v2.5.4

What is your OneDrive Application Configuration

Application version                          = onedrive v2.5.4
Compiled with                                = DMD 2109
Curl version                                 = libcurl/8.12.1 OpenSSL/3.4.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.64.0 nghttp3/1.8.0
User Application Config path                 = /home/ohadmartin/.config/onedrive
System Application Config path               = /etc/onedrive
Applicable Application 'config' location     = /home/ohadmartin/.config/onedrive/config
Configuration file found in config location  = false - using application defaults
Applicable 'sync_list' location              = /home/ohadmartin/.config/onedrive/sync_list
Applicable 'items.sqlite3' location          = /home/ohadmartin/.config/onedrive/items.sqlite3
Config option 'drive_id'                     =
Config option 'sync_dir'                     = ~/OneDrive
Config option 'enable_logging'               = false
Config option 'log_dir'                      = /var/log/onedrive
Config option 'disable_notifications'        = false
Config option 'skip_dir'                     =
Config option 'skip_dir_strict_match'        = false
Config option 'skip_file'                    = ~*|.~*|*.tmp|*.swp|*.partial
Config option 'skip_dotfiles'                = false
Config option 'skip_symlinks'                = false
Config option 'monitor_interval'             = 300
Config option 'monitor_log_frequency'        = 12
Config option 'monitor_fullscan_frequency'   = 12
Config option 'read_only_auth_scope'         = false
Config option 'dry_run'                      = false
Config option 'upload_only'                  = false
Config option 'download_only'                = false
Config option 'local_first'                  = false
Config option 'check_nosync'                 = false
Config option 'check_nomount'                = false
Config option 'resync'                       = false
Config option 'resync_auth'                  = false
Config option 'cleanup_local_files'          = false
Config option 'classify_as_big_delete'       = 1000
Config option 'disable_upload_validation'    = false
Config option 'disable_download_validation'  = false
Config option 'bypass_data_preservation'     = false
Config option 'no_remote_delete'             = false
Config option 'remove_source_files'          = false
Config option 'sync_dir_permissions'         = 700
Config option 'sync_file_permissions'        = 600
Config option 'space_reservation'            = 52428800
Config option 'permanent_delete'             = false
Config option 'application_id'               = d50ca740-c83f-4d1b-b616-12c519384f0c
Config option 'azure_ad_endpoint'            =
Config option 'azure_tenant_id'              =
Config option 'user_agent'                   = ISV|abraunegg|OneDrive Client for Linux/v2.5.4
Config option 'force_http_11'                = false
Config option 'debug_https'                  = false
Config option 'rate_limit'                   = 0
Config option 'operation_timeout'            = 3600
Config option 'dns_timeout'                  = 60
Config option 'connect_timeout'              = 10
Config option 'data_timeout'                 = 60
Config option 'ip_protocol_version'          = 0
Config option 'threads'                      = 8
Config option 'max_curl_idle'                = 120
Environment var 'XDG_RUNTIME_DIR'            = true
Environment var 'DBUS_SESSION_BUS_ADDRESS'   = true
Config option 'notify_file_actions'          = false

Selective sync 'sync_list' configured        = false

Config option 'sync_business_shared_items'   = false

Config option 'webhook_enabled'              = false

What is your 'curl' version

curl 8.12.1 (x86_64-pc-linux-gnu) libcurl/8.12.1 OpenSSL/3.4.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.64.0 nghttp3/1.8.0
Release-Date: 2025-02-13
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smbsmbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

/

What are all your local file system partition types

NAME        FSTYPE FSVER LABEL UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
zram0       swap   1     zram0 19c2b4ae-c68a-4bc4-9497-834621493185                [SWAP]
nvme0n1
├─nvme0n1p1 vfat   FAT32       7B9E-A9ED                             298.8M     0% /boot/efi
├─nvme0n1p2 btrfs              53c0de54-3f1b-4e4b-898f-ae3dcb6173fd  598.5G    28% /var/tmp
│                                                                                  /var/log
│                                                                                  /var/cache
│                                                                                  /srv
│                                                                                  /root
│                                                                                  /home
│                                                                                  /
├─nvme0n1p3 swap   1     swap  1f93a022-eb5f-4671-9ff8-9f6611f8f1f4                [SWAP]
└─nvme0n1p4 ntfs               3E8B800B665007EE

How do you use 'onedrive'

Personal sync between PCs

Steps to reproduce the behaviour

Happens regularly. Can't figure out why it happens only to certain files

Complete Verbose Log Output

Takes too long to generate

Screenshots

No response

Other Log Information or Details

Additional context

No response

@ShadowMarter ShadowMarter added the Bug Something isn't working label Feb 27, 2025
@abraunegg
Copy link
Owner

@ShadowMarter
Before opening new issues, please go through the Basic Troubleshooting Steps - https://github.com/abraunegg/onedrive#basic-troubleshooting-steps

Your screen shot even is telling you to implement a few of these items.

Please perform the required actions.

@abraunegg
Copy link
Owner

@ShadowMarter
Please can you respond.

@abraunegg
Copy link
Owner

@ShadowMarter
Please can you respond. If no response, this 'issue' will be closed due to lack of response.

@daniellehot
Copy link

I experience the same behaviour, and I also struggle to replicate it. As far as I can tell, it occurs when I make significant changes to a file either on another PC or online. Calling

onedrive -s

on my Linux machine will remove the file (see image 1). If I then restore the file from Trash online, onedrive syncs just fine (image 2). This behaviour does not happen when performing a dry-run (image 3). You can see my config in Image 4. My onedrive and curl versions are

onedrive --version
onedrive: /usr/local/lib/libcurl.so.4: no version information available (required by onedrive)
onedrive v2.5.4-1+np1+1.1

curl --version
curl 8.11.0 (x86_64-pc-linux-gnu) libcurl/8.11.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 libpsl/0.21.0 nghttp2/1.43.0
Release-Date: 2024-11-06
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM PSL SSL threadsafe TLS-SRP UnixSockets

Image 1
Image

Image 2
Image

Image 3
Image

Image 4
Image

@abraunegg
Copy link
Owner

@daniellehot
As per the Basic Trouble Shooting steps, please can you recreate the issue by building your client manually from 'master' and running with verbose debug logging enabled.

FYI - using dry run as an example is counter productive as everything is a no-op.

@daniellehot
Copy link

daniellehot commented Mar 6, 2025

@abraunegg Thanks for the tip, I will build the client manually and get back to you if the behaviour continues. In the meantime, please keep this issue open because, as I said before, I am unsure what triggers it. It might take a few days to confirm the bug is still present.

Also, the dry run output was to show that the file is recognized as modified. What I find strange is that the file is fully downloaded but is removed right after (Image 2).

@abraunegg
Copy link
Owner

@daniellehot

Thanks for the tip, I will build the client manually and get back to you if the behaviour continues. In the meantime, please keep this issue open because, as I said before, I am unsure what triggers it. It might take a few days to confirm the bug is still present.

If there is a bug, it will still be there - unless you are running an older version of the client - as this bugfix resolved this sort of behavior: #3015

Also, the dry run output was to show that the file is recognized as modified. What I find strange is that the file is fully downloaded but is removed right after (Image 2).

Image 2 does not show any file being deleted however.

Image 1 shows download failures - then a deletion (Issue 3015 maybe?) ..

You also seem to be using using a Debian | Ubuntu system - I do not know if you self compiled 'curl' as per #2997 or if you are using a Ubuntu default package for v2.5.4 of the client and curl 8.11.x from Ubuntu 25.04 ..... either way - when you have issues with curl - you should deploy the fixes first:

  • Upgrade 'curl'
  • Force the use of HTTP 1.1
  • Force the use of IPv4

These steps remediate much of the problematic issues caused by usually Ubuntu type platforms.

Either way - a full debug log is needed to understand what is going on under the hood under this sort of scenario.

@abraunegg abraunegg changed the title Bug:files getting deleted when syncing from another pc Bug: files getting deleted when syncing from another pc Mar 8, 2025
@abraunegg
Copy link
Owner

@ShadowMarter , @daniellehot

Any update in generating a debug log for analysis ?

@daniellehot
Copy link

@abraunegg

I followed the advice from your last comment and manually updated curl as per #2997 and then installed the latest version of the client from the source. However, I haven't used OneDrive since, so I haven't had an opportunity to confirm that the issue has been resolved. I plan to get back to you with a log or a confirmation the bug is gone in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants