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: Can't sync OneDrive Personal Shared Folders due to inconsistent API response values #3136

Open
rgcenteno opened this issue Feb 24, 2025 · 19 comments · May be fixed by #3116
Open

Bug: Can't sync OneDrive Personal Shared Folders due to inconsistent API response values #3136

rgcenteno opened this issue Feb 24, 2025 · 19 comments · May be fixed by #3116

Comments

@rgcenteno
Copy link

Describe the bug

Using personal paid account.
Onedrive doesn't upload my change to cloud. If it is executed on non-verbosed mode it gives this exception:

core.exception.AssertError@src/itemdb.d(892): Assertion failure
----------------
??:? _d_assertp [0x55aaba2b3350]
??:? immutable(char)[] itemdb.ItemDatabase.computePath(const(char)[], const(char)[]) [0x55aaba27a843]
??:? immutable(char)[] syncEngine.SyncEngine.computeItemPath(immutable(char)[], immutable(char)[]) [0x55aaba225e2a]
??:? bool syncEngine.SyncEngine.checkJSONAgainstClientSideFiltering(std.json.JSONValue) [0x55aaba22d5de]
??:? std.json.JSONValue syncEngine.SyncEngine.generateDeltaResponse(immutable(char)[]) [0x55aaba245ffc]
??:? void syncEngine.SyncEngine.fetchOneDriveDeltaAPIResponse(immutable(char)[], immutable(char)[], immutable(char)[]) [0x55aaba2146c3]
??:? void syncEngine.SyncEngine.syncOneDriveAccountToLocalDisk() [0x55aaba2113a5]
??:? void main.performStandardSyncProcess(immutable(char)[], monitor.Monitor) [0x55aaba0c0973]

I have tryied 3 versions of Onedrive app:

  • Distribution package
  • Docker version
  • Self Compiled version

In every compilation I have purged ~/.config/onedrive folder for trying to avoid any config missconfiguration or some sqlite3 db inconsistency

Operating System Details

OS: 
Linux rafa-laptop 5.15.0-133-generic #144-Ubuntu SMP Fri Feb 7 20:47:38 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a:
No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 21.3
Release:	21.3
Codename:	virginia

Client Installation Method

From Source

OneDrive Account Type

Personal

What is your OneDrive Application Version

onedrive v2.5.4-12-g9051d0d

What is your OneDrive Application Configuration

Application version                          = onedrive v2.5.4-12-g9051d0d
Compiled with                                = DMD 2109
Curl version                                 = libcurl/8.11.0 OpenSSL/3.0.2 zlib/1.3.1 brotli/1.0.9 libpsl/0.21.0 nghttp2/1.43.0
User Application Config path                 = /home/rafa/.config/onedrive
System Application Config path               = /etc/onedrive
Applicable Application 'config' location     = /home/rafa/.config/onedrive/config
Configuration file found in config location  = false - using application defaults
Applicable 'sync_list' location              = /home/rafa/.config/onedrive/sync_list
Applicable 'items.sqlite3' location          = /home/rafa/.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 'disable_permission_set'       = false
Config option 'transfer_order'               = default
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 'write_xattr_data'             = 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-12-g9051d0d
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
Compile time option --enable-notifications   = 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.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

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=7778208k,nr_inodes=1944552,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1576964k,mode=755,inode64)
/dev/nvme0n1p2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=22343)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
none on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
tmpfs on /run/qemu type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/nvme0n1p3 on /home type ext4 (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
overlay on /var/lib/docker/overlay2/dd3580c1bf91107d673664116b93099a9f664271413222b6a114767fc753b5c0/merged type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/2WKOBL6JMPOUQVWSS7CAEUM4X6:/var/lib/docker/overlay2/l/SL7PSIHCZO5KKIWGRSZYQP23P3:/var/lib/docker/overlay2/l/IT5VGODNH2VIHGEVITUTVPNRFJ:/var/lib/docker/overlay2/l/SED27DUPGJZIX5TF42XCMAO5FB:/var/lib/docker/overlay2/l/IVYQWLYL273XDGQOQEOHP2XV6S:/var/lib/docker/overlay2/l/QAKY5IVQ3X2B6KYZ25WDZTVVRJ:/var/lib/docker/overlay2/l/ITETU3BO5ZAR3QLFC6A4IKCGIA:/var/lib/docker/overlay2/l/QOKM4GLVLQZAIIVXLQ4N3Z4KNC:/var/lib/docker/overlay2/l/MDHANSWMSMFKZBGNGDSZDOKRPY:/var/lib/docker/overlay2/l/QRKJ6KVVT77FRFOGWKTC6BVU5D:/var/lib/docker/overlay2/l/WXTLNWVSQJXP3PINNBMG3TAF4W:/var/lib/docker/overlay2/l/P5HQGO3PJBLRVU2FUX6BQ4GM5O:/var/lib/docker/overlay2/l/L6YIXB5FVV6QUTGBMDGIWITLFS:/var/lib/docker/overlay2/l/N445EP7BXATMQO4Y6FPUPATUPA:/var/lib/docker/overlay2/l/WMKHZDBJRRJDVRKQKRWJ3LI2HV:/var/lib/docker/overlay2/l/XM6EU2NBSGQUOP6ZDDW5UR5ZLT:/var/lib/docker/overlay2/l/2FZCNPAHUOFGZTSATXVUD5ER75:/var/lib/docker/overlay2/l/IKH4QZFWDAF66L4ELZVWQTNYZH:/var/lib/docker/overlay2/l/7VQKW3F2P2HLJT2Y46QCYYBLD5,upperdir=/var/lib/docker/overlay2/dd3580c1bf91107d673664116b93099a9f664271413222b6a114767fc753b5c0/diff,workdir=/var/lib/docker/overlay2/dd3580c1bf91107d673664116b93099a9f664271413222b6a114767fc753b5c0/work)
overlay on /var/lib/docker/overlay2/1099e75d8f92d54b7fe35d177a0235fd744aa9c2fb8b819254153f99d5300350/merged type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/W64WMKQ4OYIO5K7GHMABZVZTRM:/var/lib/docker/overlay2/l/XYCHSMPGI3KMMJPVP3ONBMVH3V:/var/lib/docker/overlay2/l/34R3FSWROHWVGM2RM47JE5EBLI:/var/lib/docker/overlay2/l/LECQNBYXKW4XDUGL5ZGPUGL6HJ:/var/lib/docker/overlay2/l/ICVDYPYW74EEIXYQ4SKID6JZT4:/var/lib/docker/overlay2/l/DXU5N3355X5TFFCMKFNHNWC7BQ:/var/lib/docker/overlay2/l/OJTGGOTEOBAHIZ7S66LXNXR7AY:/var/lib/docker/overlay2/l/3PV64GAIHKJXD4XCKZL6GWOY6X:/var/lib/docker/overlay2/l/HALJXCFFLOBOWOIQIMJM3NXANU:/var/lib/docker/overlay2/l/PZSL6PE5C3SM4CNAGDUO4RF2OL:/var/lib/docker/overlay2/l/OZIIISWRQZH6SWPSGE5JJBP2G3:/var/lib/docker/overlay2/l/TM4FI75OQDH77LA6ACWPRS3BUY,upperdir=/var/lib/docker/overlay2/1099e75d8f92d54b7fe35d177a0235fd744aa9c2fb8b819254153f99d5300350/diff,workdir=/var/lib/docker/overlay2/1099e75d8f92d54b7fe35d177a0235fd744aa9c2fb8b819254153f99d5300350/work)
nsfs on /run/docker/netns/535c89e252ab type nsfs (rw)
nsfs on /run/docker/netns/3c8aa597e731 type nsfs (rw)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1576960k,nr_inodes=394240,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sda1 on /media/rafa/Timeshift type ext4 (rw,nosuid,nodev,relatime,errors=remount-ro,uhelper=udisks2)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
overlay on /var/lib/docker/overlay2/4ec4edb465cc7dbd07db857a925e0c771690a2a9bd2fb4e2e05342c5f82d5833/merged type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/IECBFVFT3CFFV7MILO3URS3RN3:/var/lib/docker/overlay2/l/SL7PSIHCZO5KKIWGRSZYQP23P3:/var/lib/docker/overlay2/l/IT5VGODNH2VIHGEVITUTVPNRFJ:/var/lib/docker/overlay2/l/SED27DUPGJZIX5TF42XCMAO5FB:/var/lib/docker/overlay2/l/IVYQWLYL273XDGQOQEOHP2XV6S:/var/lib/docker/overlay2/l/QAKY5IVQ3X2B6KYZ25WDZTVVRJ:/var/lib/docker/overlay2/l/ITETU3BO5ZAR3QLFC6A4IKCGIA:/var/lib/docker/overlay2/l/QOKM4GLVLQZAIIVXLQ4N3Z4KNC:/var/lib/docker/overlay2/l/MDHANSWMSMFKZBGNGDSZDOKRPY:/var/lib/docker/overlay2/l/QRKJ6KVVT77FRFOGWKTC6BVU5D:/var/lib/docker/overlay2/l/WXTLNWVSQJXP3PINNBMG3TAF4W:/var/lib/docker/overlay2/l/P5HQGO3PJBLRVU2FUX6BQ4GM5O:/var/lib/docker/overlay2/l/L6YIXB5FVV6QUTGBMDGIWITLFS:/var/lib/docker/overlay2/l/N445EP7BXATMQO4Y6FPUPATUPA:/var/lib/docker/overlay2/l/WMKHZDBJRRJDVRKQKRWJ3LI2HV:/var/lib/docker/overlay2/l/XM6EU2NBSGQUOP6ZDDW5UR5ZLT:/var/lib/docker/overlay2/l/2FZCNPAHUOFGZTSATXVUD5ER75:/var/lib/docker/overlay2/l/IKH4QZFWDAF66L4ELZVWQTNYZH:/var/lib/docker/overlay2/l/7VQKW3F2P2HLJT2Y46QCYYBLD5,upperdir=/var/lib/docker/overlay2/4ec4edb465cc7dbd07db857a925e0c771690a2a9bd2fb4e2e05342c5f82d5833/diff,workdir=/var/lib/docker/overlay2/4ec4edb465cc7dbd07db857a925e0c771690a2a9bd2fb4e2e05342c5f82d5833/work)
nsfs on /run/docker/netns/f56e68ab7d35 type nsfs (rw)

What are all your local file system partition types

NAME        FSTYPE FSVER LABEL     UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                    
└─sda1      ext4   1.0   Timeshift e3d652ef-cfd3-4162-a9ad-9a89f92dabb3    274G    65% /media/rafa/Timeshift
nvme0n1                                                                                
├─nvme0n1p1 vfat   FAT32           9B5A-7642                             233,2M     3% /boot/efi
├─nvme0n1p2 ext4   1.0             2f007ba7-c1d5-4666-8f16-ab371103f64e  163,8G    26% /
├─nvme0n1p3 ext4   1.0             ea6f65cf-7cfd-45a3-93c1-f2eba494e007  236,2G    60% /home
└─nvme0n1p4 swap   1               cc858d75-0bc9-428a-aa95-fdec02f2e690                [SWAP]

How do you use 'onedrive'

My main computer is the computer which halts error. Only Linux Mint OS installed.

When I am using other computer, I use OneDrive via web. I use Onedrive on Android Mobile with official cliente an also in a Boox note air 4c with the tool that is integrated in this device.

Steps to reproduce the behaviour

Only needed to perform manually a sync:

onedrive --sync

It fails also with

onedrive --sync --resync

Complete Verbose Log Output

https://1drv.ms/u/s!Asos2XZUuAPZyZIgEu871JnPKI8Erg?e=PeHmpE

Password sent by email.

Screenshots

Console error when running onedrive --sync

Attempting to contact Microsoft OneDrive Login Service
Successfully reached Microsoft OneDrive Login Service
Configuring Global Azure AD Endpoints
Fetching items from the OneDrive API for Drive ID: *************** ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 
Processing 277935 applicable JSON items received from Microsoft OneDrive ........................Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
.Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
Skipping item - invalid symbolic link: Documents/@Documentos importantes/@@Destinos/5 - IES Pazo da Merce/CD/Modulo Contornos Desenvolvemento 21-22-editables
.....................Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Rául
..Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Rául
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Prepa
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Prepa
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Libro Eslava
..Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas ECOEM
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/TEMAS_JORGE
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Libro Eslava
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas ECOEM
..Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Rául
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Rául
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Prepa
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Libro Eslava
.Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Rául
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Prepa
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas ECOEM
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/TEMAS_JORGE
Skipping item - invalid symbolic link: Documents/@Opos/Apuntes/Temas propios/Selección/Temas Libro Eslava
................................................................................................................. 
Syncing this OneDrive Personal Shared Folder: ./Boda
Generating a /delta response from the OneDrive API for this Drive ID: ************ and Item ID: *******!2728 .........Attempting to perform a database vacuum to optimise database
Database vacuum is complete
core.exception.AssertError@src/itemdb.d(892): Assertion failure
----------------
??:? _d_assertp [0x55aaba2b3350]
??:? immutable(char)[] itemdb.ItemDatabase.computePath(const(char)[], const(char)[]) [0x55aaba27a843]
??:? immutable(char)[] syncEngine.SyncEngine.computeItemPath(immutable(char)[], immutable(char)[]) [0x55aaba225e2a]
??:? bool syncEngine.SyncEngine.checkJSONAgainstClientSideFiltering(std.json.JSONValue) [0x55aaba22d5de]
??:? std.json.JSONValue syncEngine.SyncEngine.generateDeltaResponse(immutable(char)[]) [0x55aaba245ffc]
??:? void syncEngine.SyncEngine.fetchOneDriveDeltaAPIResponse(immutable(char)[], immutable(char)[], immutable(char)[]) [0x55aaba2146c3]
??:? void syncEngine.SyncEngine.syncOneDriveAccountToLocalDisk() [0x55aaba2113a5]
??:? void main.performStandardSyncProcess(immutable(char)[], monitor.Monitor) [0x55aaba0c0973]
??:? _Dmain [0x55aaba0bd7c9]

Other Log Information or Details

Additional context

No response

@rgcenteno rgcenteno added the Bug Something isn't working label Feb 24, 2025
@iron9light
Copy link

+1
Ubuntu 24.04

@abraunegg
Copy link
Owner

@iron9light

+1 Ubuntu 24.04

This is 100% unhelpful .... a +1 means zero ... you have an issue .. great .. however your issue may not be this actual issue.

There are 2 problems at the moment:

  1. An account issue - please read: Account Root ID contains the string 'sea8cc6beffdb43d7976fbc7da445c639' #3132
  2. An issue where the API provides invalid data for Shared Folders - please read: Bug: Application crash when calculating path due to 15 character driveId API bug #3115

So .. in future .. please do not use '+1' and actually provide some meaningful information or potentially perform the Basic Troubleshooting Steps to determine your actual issue and then quantify with data that this is your issue ... adding a +1 and your use of Ubuntu is unhelpful

@abraunegg
Copy link
Owner

@rgcenteno
Many thanks for your debug log.

I have sent a request for another file, please can you review your email.

@abraunegg abraunegg added this to the v2.5.5 milestone Feb 24, 2025
@K1ngjulien
Copy link

Same here, final output of onedrive -vvvvv --sync --resync before it crashes:

...
DEBUG: HTTP instance shutdown and destroyed: SNkrJbhKFB4UfwnO
DEBUG: CurlEngine destroyed
DEBUG: CurlEngine releaseAllCurlInstances() completed
DEBUG: Shutting down Client Side Filtering instance
DEBUG: Shutdown of Client Side Filtering instance is complete
DEBUG: Shutting down Database instance
DEBUG: Merge contents of WAL and SHM files into main database file before shutting down database
DEBUG: Attempting to perform a database checkpoint to merge temporary data
DEBUG: Counting open SQL statements
DEBUG: Database checkpoint is complete
DEBUG: Attempting to perform a database vacuum to optimise database
DEBUG: Counting open SQL statements
DEBUG: Database vacuum is complete
DEBUG: Removing items.sqlite3-shm as it still exists for some reason
DEBUG: Shutdown of Database instance is complete
DEBUG: Shutting down Application Configuration instance
DEBUG: Shutdown of Application Configuration instance is complete
DEBUG: Application is exiting
DEBUG: Shutting down Application Logging instance
core.exception.AssertError@src/itemdb.d(892): Assertion failure
----------------
??:? _d_assertp [0x5e9fb5507ce0]
??:? immutable(char)[] itemdb.ItemDatabase.computePath(const(char)[], const(char)[]) [0x5e9fb54cd937]
??:? immutable(char)[] syncEngine.SyncEngine.computeItemPath(immutable(char)[], immutable(char)[]) [0x5e9fb5490cee]
??:? bool syncEngine.SyncEngine.checkJSONAgainstClientSideFiltering(std.json.JSONValue) [0x5e9fb549763a]
??:? std.json.JSONValue syncEngine.SyncEngine.generateDeltaResponse(immutable(char)[]) [0x5e9fb54b0998]
??:? void syncEngine.SyncEngine.fetchOneDriveDeltaAPIResponse(immutable(char)[], immutable(char)[], immutable(char)[]) [0x5e9fb5480073]
??:? void syncEngine.SyncEngine.syncOneDriveAccountToLocalDisk() [0x5e9fb547cd55]
??:? void main.performStandardSyncProcess(immutable(char)[], monitor.Monitor) [0x5e9fb532da73]
??:? _Dmain [0x5e9fb532a8c9]
[~ (1)]: onedrive --version
onedrive v2.5.4

stacktrace looks the same, anything else relevant I can provide? I can try building from source if that helps

@abraunegg
Copy link
Owner

abraunegg commented Feb 24, 2025

@K1ngjulien

stacktrace looks the same, anything else relevant I can provide? I can try building from source if that helps

Please re-build your client from 'master' and provide a debug log via email if you are encountering an issue.

This will rule 'in' or 'out' the API Bug 'sea8xxxxxx' for your DriveID as a very specific error message is displayed.

The debug log then will be checked for 15 character drive id lengths (#3115) which is currently being looked at and awaiting further evidence to finish resolving.

This issue (#3136) appears to be 100% new - not related to the other 2 items.

The challenge is - all of these manifest and crash the exact same way with v2.5.4 - however they are distinctly 3 separate issues.

@abraunegg abraunegg changed the title Bug: Can's sync Bug: Can's sync OneDrive Personal Shared Folders Feb 24, 2025
@abraunegg abraunegg changed the title Bug: Can's sync OneDrive Personal Shared Folders Bug: Can't sync OneDrive Personal Shared Folders Feb 24, 2025
@K1ngjulien
Copy link

I built from source and ran ./onedrive -vvvvv --sync --resync |& tee log.txt. Still the same stacktrace after "Database Vacuum is complete"

[~/code/onedrive (master:4) (1)]: ./onedrive --version
onedrive v2.5.4-12-g9051d0d
...
DEBUG: Attempting to perform a database vacuum to optimise database
DEBUG: Counting open SQL statements
DEBUG: Database vacuum is complete
DEBUG: Removing items.sqlite3-shm as it still exists for some reason
DEBUG: Shutdown of Database instance is complete
DEBUG: Shutting down Application Configuration instance
DEBUG: Shutdown of Application Configuration instance is complete
DEBUG: Application is exiting
DEBUG: Shutting down Application Logging instance
core.exception.AssertError@src/itemdb.d(892): Assertion failure
----------------
??:? _d_assertp [0x5614547f1330]
??:? immutable(char)[] itemdb.ItemDatabase.computePath(const(char)[], const(char)[]) [0x5614547b8823]
??:? immutable(char)[] syncEngine.SyncEngine.computeItemPath(immutable(char)[], immutable(char)[]) [0x561454763e0a]
??:? bool syncEngine.SyncEngine.checkJSONAgainstClientSideFiltering(std.json.JSONValue) [0x56145476a76a]
??:? std.json.JSONValue syncEngine.SyncEngine.generateDeltaResponse(immutable(char)[]) [0x561454783fdc]
??:? void syncEngine.SyncEngine.fetchOneDriveDeltaAPIResponse(immutable(char)[], immutable(char)[], immutable(char)[]) [0x5614547526a3]
??:? void syncEngine.SyncEngine.syncOneDriveAccountToLocalDisk() [0x56145474f385]
??:? void main.performStandardSyncProcess(immutable(char)[], monitor.Monitor) [0x5614545fe953]
??:? _Dmain [0x5614545fb7a9]

I don't think I'm hitting the DriveID bug as I'm not seeing any "ERROR:"s in the log:

[~/code/onedrive (master:4) (130)]: grep -i "ERROR:" log.txt
[~/code/onedrive (master:4) (1)]:

These "ERROR" lines would be expected in the output for that bug, no?

onedrive/src/sync.d

Lines 740 to 750 in 9051d0d

// Issue #2957 Handling for the Personal Account Root ID issues. Shared Folders coming from another account where this issue exists will need a different approach.
// If the returned data for appConfig.defaultRootId contains the string 'sea8cc6beffdb43d7976fbc7da445c639' .. this account has account issues with Microsoft
// This is only applicable for Microsoft Personal Accounts
if (appConfig.accountType == "personal") {
// Does the string 'sea8cc6beffdb43d7976fbc7da445c639' exist in the root id for the account?
if (canFind(appConfig.defaultRootId, "sea8cc6beffdb43d7976fbc7da445c639")) {
// Yes ... flag account issue, we cannot proceed
addLogEntry();
addLogEntry("ERROR: You have a Microsoft OneDrive Account Problem. Please raise a support request with Microsoft. You cannot use Microsoft OneDrive at this point in time.", ["info", "notify"]);
addLogEntry("ERROR: Account Root ID contains the string 'sea8cc6beffdb43d7976fbc7da445c639'.");
addLogEntry("ERROR: Please refer to https://github.com/OneDrive/onedrive-api-docs/issues/1890 for further details.");

@abraunegg
Copy link
Owner

@K1ngjulien
Correct - if you have the 'sea8cc6beffdb43d7976fbc7da445c639' the application would just terminate and display the error message.

Please can you provide via email:

  • A verbose debug log with the crash
  • The items.sqlite3 file associated with the application run .. line 19 of the debug output starts with DEBUG: databaseFilePath = ... it is this file that is needed

@abraunegg
Copy link
Owner

@rgcenteno
Many thanks for your debug log and sqlite file.

So .. correlation of data shows that you are actually impacted by #3115

I will send this evidence and analysis via email to you.

Post doing this, please can you use the details in #3115 to build your client from PR #3116 and generate a new debug log using this specific PR.

@K1ngjulien
Please can you provide your data as soon as possible.

@abraunegg
Copy link
Owner

@rgcenteno , @K1ngjulien
Please can you test the following PR to potentially resolve your issue.

I cannot replicate your issue, thus I need you to test this PR to work around the API Bug.

To test the PR, first install all the require platform dependencies to build the client on your respective platforms. Please read https://github.com/abraunegg/onedrive/blob/master/docs/install.md#building-from-source---high-level-requirements and then follow correctly for your platform.

Important

Currently there is an issue with installing the DMD or LDC compiler using the documentation instructions:
curl -fsS https://dlang.org/install.sh | bash -s dmd or curl -fsS https://dlang.org/install.sh | bash -s ldc

This is not something I can solve and I have emailed the appropriate folk and raised dlang/dmd#20830

Please augment the installation of DMD or LDC with your distribution version if it is available

Once this is done, to clone the PR to resolve your issue, you can use a script like the following:

#!/bin/bash

PR=3116

rm -rf ./onedrive-pr${PR}
git clone https://github.com/abraunegg/onedrive.git onedrive-pr${PR}
cd onedrive-pr${PR}
git fetch origin pull/${PR}/head:pr${PR}
git checkout pr${PR}

# Configure and Build
./configure --enable-debug --enable-notifications; make clean; make;
./onedrive --version

This script will create a local folder called onedrive-pr3116 with the PR version.

To run the PR, you need to run the client from the PR build directory:

./onedrive <any other options needed>

To install the PR, you will need to perform sudo make install to install the PR version to your system.

When running the PR, your version should be: onedrive v2.5.4-27-g47a8685 or greater.

If you still encounter an issue, please generate a new verbose debug log following this process: https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support

@abraunegg abraunegg changed the title Bug: Can't sync OneDrive Personal Shared Folders Bug: Can't sync OneDrive Personal Shared Folders due to 15 character driveId API bug Feb 25, 2025
@abraunegg
Copy link
Owner

@rgcenteno , @K1ngjulien

Based on the latest debug logs, please can you rebuild your client to onedrive v2.5.4-28-gc803fb9 or greater from PR #3116

I sincerely appreciate your patience while we worked through this issue, which was particularly challenging as it could not be directly replicated. The problem arises when a Shared Folder has a drive ID of 16 characters starting with a zero, causing the OneDrive API to respond inconsistently by dropping the leading zero in some cases, turning the drive ID into a 15-character invalid item.

Please can you advise if this now resolves your issue or if there is still a further problem in your environment.

@simonbusstra
Copy link

I got the same error as rgcenteno. I did share a new folder last night, although I'm not 100% sure the error hasn't been there before. I tried the #3116 PR / v2.5.4-28-gc803fb9 and I'm not getting the error anymore now. Syncing works as before. Thanks!

@abraunegg
Copy link
Owner

@simonbusstra
Thankyoi for testing the PR and confirming potential resolution

@abraunegg
Copy link
Owner

To those watching | impacted by this bug(s)

I was working on this issue heavily yesterday (1st March 2025) and the solution was working rather well with all testing.

This morning, when I was re validating the code, overnight there has been an account change to all of my OneDrive Personal accounts where the accounts now have the 'sea8cc6beffdb43d7976fbc7da445c639' Microsoft change.

As such, when I now query the API for all the folders online, the /delta query that this client heavily uses no longer is providing the Shared Folder JSON data that the /delta query was providing yesterday before the 'sea8cc6beffdb43d7976fbc7da445c639' account change.

I have raised a bug with Microsoft for this issue - but until this data quality issue from the Microsoft OneDrive API is fixed, a full resolution for this insideous series of bugs caused by this 'sea8cc6beffdb43d7976fbc7da445c639' change cannot be resolved.

The new API bug is listed here: OneDrive/onedrive-api-docs#1891

@abraunegg abraunegg changed the title Bug: Can't sync OneDrive Personal Shared Folders due to 15 character driveId API bug Bug: Can't sync OneDrive Personal Shared Folders due to inconsistent API response values Mar 1, 2025
@abraunegg abraunegg added OneDrive API Inconsistency OneDrive API Bug OneDrive API Bug and removed Duplicate This issue or pull request already exists labels Mar 1, 2025
@abraunegg
Copy link
Owner

To those watching | impacted by this bug(s)

Caution

This maybe a 100% coding fix - however at the moment this needs a workaround to also be implemented by impacted users

Please can you test this updated PR and provide valuable feedback.

To test the PR, first install all the require platform dependencies to build the client on your respective platforms. Please read https://github.com/abraunegg/onedrive/blob/master/docs/install.md#building-from-source---high-level-requirements and then follow correctly for your platform.

Important

Currently there is an issue with installing the DMD or LDC compiler using the documentation instructions:
curl -fsS https://dlang.org/install.sh | bash -s dmd or curl -fsS https://dlang.org/install.sh | bash -s ldc

This is not something I can solve and I have emailed the appropriate folk and raised dlang/dmd#20830

Please augment the installation of DMD or LDC with your distribution version if it is available

Once this is done, to clone the PR to resolve your issue, you can use a script like the following:

#!/bin/bash

PR=3116

rm -rf ./onedrive-pr${PR}
git clone https://github.com/abraunegg/onedrive.git onedrive-pr${PR}
cd onedrive-pr${PR}
git fetch origin pull/${PR}/head:pr${PR}
git checkout pr${PR}

# Configure and Build
./configure --enable-debug --enable-notifications; make clean; make;
./onedrive --version

This script will create a local folder called onedrive-pr3116 with the PR version.

Important

Before running this PR please add to your configuration file force_children_scan = "true"

This will bypass the new OneDrive API /delta bug OneDrive/onedrive-api-docs#1891 where OneDrive Personal Folder details are no longer sent in the /delta response when your account has been migrated to the new Microsoft OneDrive platform. You can tell when you are impacted as when you run the application in verbose mode, it will look like this:

The OneDrive API was initialised successfully
Opening the item database ...
Forcing client to use /children API call rather than /delta API to retrieve objects from the OneDrive API
Application Version:   onedrive v2.5.4-29-g5d836ad
Account Type:          personal
Default Drive ID:      66D53BE8A5056ECA
Default Root ID:       66D53BE8A5056ECA!sea8cc6beffdb43d7976fbc7da445c639
Microsoft Data Centre: Australia Southeast

To run the PR, you need to run the client from the PR build directory:

./onedrive <any other options needed>

To install the PR, you will need to perform sudo make install to install the PR version to your system.

When running the PR, your version should be: onedrive v2.5.4-29-g5d836ad or greater.

If you still encounter an issue, please generate a new verbose debug log following this process: https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support

@abraunegg
Copy link
Owner

To those watching | impacted by this bug(s)

Please rebuild your PR client version to onedrive v2.5.4-30-g43ba76c

A further UPPERCASE / lowercase API inconsistency has been uncovered, that required remediation as part of this PR.

Please can you ensure you are running this version + apply the force_children_scan = "true" temporary work around to get your system back into an operational state.

Whilst your client will run slower due to manually building a /delta response, Microsoft need to fix their API to provide again the Shared Folder data in the /delta API query, that is now removed when your account is moved to their new backend platform.

Please read OneDrive/onedrive-api-docs#1891 for details.

@abraunegg abraunegg added the Duplicate This issue or pull request already exists label Mar 2, 2025
@rgcenteno
Copy link
Author

I have run v2.5.4-29-g5d836ad with debug model. Command
./onedrive --sync --verbose --verbose --resync --resync-auth > debug_output-pr3116-3.log 2>&1 && poweroff

After some time, it halts execution with a segmentation fault.

rafa@rafa-ROG-Zephyrus-G14:~/Descargas/onedrive-pr3116$ ./onedrive --sync --verbose --verbose --resync --resync-auth > debug_output-pr3116-3.log 2>&1 && poweroff Fallo de segmento (rexistráronse os datos da memoria)

Translation:

rafa@rafa-ROG-Zephyrus-G14:~/Descargas/onedrive-pr3116$ ./onedrive --sync --verbose --verbose --resync --resync-auth > debug_output-pr3116-3.log 2>&1 && poweroff
Segmentation fault (Registered memory data)

Local changes hasn't been reflected on cloud storage.

Today I will test version v2.5.4-30-g43ba76c and I will post results.

@rgcenteno
Copy link
Author

I have run v2.5.4-30-g43ba76c. Same error segmentation fault on console output:

rafa@rafa-ROG-Zephyrus-G14:~/Descargas/onedrive-pr3116$ ./onedrive --sync --verbose --verbose --resync --resync-auth > debug_output-pr3116-3.log 2>&1
Fallo de segmento (rexistráronse os datos da memoria)

Executions has taken too long 5 or 6 hours. I guess force_children_scan = "true" is the reason.

I'm sending sqlite3 and debug file by email.

@abraunegg
Copy link
Owner

abraunegg commented Mar 7, 2025

To those watching | impacted by this bug(s)

Please rebuild your PR client version to onedrive v2.5.4-33-gd45ca81

It potentially appears that Microsoft has resolved the /delta API query bug that failed to send OneDrive Personal Shared Folder details, thus potentially you may be able to stop the use of the force_children_scan = "true" temporary workaround.

If you get this sort of error or similar without force_children_scan = "true" ..

ERROR: Microsoft OneDrive API returned an error with the following message:
  Error Message:    HTTP request returned status code 404 (Not Found)
  Error Reason:     Item not found
  Error Code:       itemNotFound
  Error Timestamp:  2025-03-07T04:17:05
  API Request ID:   65c928ec-97b5-4c63-9379-d905dedd9706
  Calling Function: syncEngine.performNewFileUpload()

You need to re-enable force_children_scan = "true"

When using this client version, please use --resync --resync-auth to ensure that your local database is cleaned up to remove any of the old database entries.

Please can you test this client version and advise.

@rgcenteno
Copy link
Author

I have run onedrive v2.5.4-33-gd45ca81
It took too long, about 7h (3 times average resync in previous versions without force_children_scan).
Execution finished with this exception.

core.exception.RangeError@/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/json.d(1636): Range violation
----------------
??:? onRangeError [0x565404bcf0d2]
??:? _d_arrayboundsp [0x565404b63ba9]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/json.d:1636 @safe void std.json.toJSON!(void delegate(scope const(char)[]) pure nothrow @safe).toJSON(ref void delegate(scope const(char)[]) pure nothrow @safe, ref const(std.json.JSONValue), in bool, in std.json.JSONOptions).toValueImpl(ref const(std.json.JSONValue), ulong).emit!(immutable(char)[][]).emit(immutable(char)[][]) [0x565404aa7193]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/json.d:1660 @trusted void std.json.toJSON!(void delegate(scope const(char)[]) pure nothrow @safe).toJSON(ref void delegate(scope const(char)[]) pure nothrow @safe, ref const(std.json.JSONValue), in bool, in std.json.JSONOptions).toValueImpl(ref const(std.json.JSONValue), ulong) [0x565404aa636e]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/json.d:1645 @safe void std.json.toJSON!(void delegate(scope const(char)[]) pure nothrow @safe).toJSON(ref void delegate(scope const(char)[]) pure nothrow @safe, ref const(std.json.JSONValue), in bool, in std.json.JSONOptions).toValueImpl(ref const(std.json.JSONValue), ulong).emit!(immutable(char)[][]).emit(immutable(char)[][]) [0x565404aa7232]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/json.d:1660 @trusted void std.json.toJSON!(void delegate(scope const(char)[]) pure nothrow @safe).toJSON(ref void delegate(scope const(char)[]) pure nothrow @safe, ref const(std.json.JSONValue), in bool, in std.json.JSONOptions).toValueImpl(ref const(std.json.JSONValue), ulong) [0x565404aa636e]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/json.d:1761 @safe void std.json.toJSON!(void delegate(scope const(char)[]) pure nothrow @safe).toJSON(ref void delegate(scope const(char)[]) pure nothrow @safe, ref const(std.json.JSONValue), in bool, in std.json.JSONOptions) [0x565404aa61ff]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/json.d:924 const @safe void std.json.JSONValue.toString!(void delegate(scope const(char)[]) pure nothrow @safe).toString(void delegate(scope const(char)[]) pure nothrow @safe, in std.json.JSONOptions) [0x565404aa61d8]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/format/internal/write.d:2165 @safe void std.format.internal.write.formatObject!(std.array.Appender!(immutable(char)[]).Appender, std.json.JSONValue, char).formatObject(ref std.array.Appender!(immutable(char)[]).Appender, ref std.json.JSONValue, scope ref const(std.format.spec.FormatSpec!(char).FormatSpec)) [0x565404a06901]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/format/internal/write.d:2516 @safe void std.format.internal.write.formatValueImpl!(std.array.Appender!(immutable(char)[]).Appender, std.json.JSONValue, char).formatValueImpl(ref std.array.Appender!(immutable(char)[]).Appender, ref std.json.JSONValue, scope ref const(std.format.spec.FormatSpec!(char).FormatSpec)) [0x565404a06851]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/format/write.d:1239 @safe void std.format.write.formatValue!(std.array.Appender!(immutable(char)[]).Appender, std.json.JSONValue, char).formatValue(ref std.array.Appender!(immutable(char)[]).Appender, ref std.json.JSONValue, scope ref const(std.format.spec.FormatSpec!(char).FormatSpec)) [0x5654049f73df]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/conv.d:138 @safe immutable(char)[] std.conv.toStr!(immutable(char)[], std.json.JSONValue).toStr(std.json.JSONValue) [0x5654049f7360]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/conv.d:1107 @safe immutable(char)[] std.conv.toImpl!(immutable(char)[], std.json.JSONValue).toImpl(std.json.JSONValue) [0x5654049f7325]
/home/rafa/dlang/dmd-2.109.1/linux/bin64/../../src/phobos/std/conv.d:210 @safe immutable(char)[] std.conv.to!(immutable(char)[]).to!(std.json.JSONValue).to(std.json.JSONValue) [0x5654049f7309]
src/sync.d:1654 void syncEngine.SyncEngine.processDeltaJSONItem(std.json.JSONValue, long, int, long, bool) [0x565404ac3c39]
src/sync.d:1512 void syncEngine.SyncEngine.fetchOneDriveDeltaAPIResponse(immutable(char)[], immutable(char)[], immutable(char)[]) [0x565404ac2f87]
src/sync.d:839 void syncEngine.SyncEngine.syncOneDriveAccountToLocalDisk() [0x565404abf90d]
src/main.d:1369 void main.performStandardSyncProcess(immutable(char)[], monitor.Monitor) [0x56540496bf49]
src/main.d:857 _Dmain [0x565404968c4d]

Debug file was sent by email.
Thanks for your kindly support.

@abraunegg abraunegg removed the Duplicate This issue or pull request already exists label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants