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: Onedrive 2.5.3 does not sync with business account. Error code "itemNotFound". #3040

Closed
ilchimicopazzo opened this issue Dec 11, 2024 · 12 comments · Fixed by #3051
Closed
Labels
Bug Something isn't working Fixed OneDrive Business
Milestone

Comments

@ilchimicopazzo
Copy link

ilchimicopazzo commented Dec 11, 2024

Describe the bug

Onedriver does not sync my business account but can connect and start the monitoring phase.

I have updated Onedriver from 2.5.2 to 2.5.3 to solve the issue but it still stands.
I use Onedriver with OnedriveGUI on Debian 12 with curl 8.11.0.

Operating System Details

$ uname -a
Linux pazzo2 6.1.0-27-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

Client Installation Method

From 3rd Party Source (PPA, OpenSuSE Build Service etc)

OneDrive Account Type

Business | Office365

What is your OneDrive Application Version

v2.5.3-1+np1+1.1

What is your OneDrive Application Configuration

$ onedrive --display-config
Application version                          = onedrive v2.5.3-1+np1+1.1
Compiled with                                = LDC 2100
Curl version                                 = libcurl/8.11.0 OpenSSL/3.0.15 zlib/1.2.13 libpsl/0.21.2 nghttp2/1.52.0
User Application Config path                 = /home/homereddu/.config/onedrive
System Application Config path               = /etc/onedrive
Applicable Application 'config' location     = /home/homereddu/.config/onedrive/config
Configuration file found in config location  = false - using application defaults
Applicable 'sync_list' location              = /home/homereddu/.config/onedrive/sync_list
Applicable 'items.sqlite3' location          = /home/homereddu/.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 '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.3-1+np1+1.1
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 --version
curl 8.11.0 (x86_64-pc-linux-gnu) libcurl/8.11.0 OpenSSL/3.0.15 zlib/1.2.13 libpsl/0.21.2 nghttp2/1.52.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 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'

$ mount
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=6049384k,nr_inodes=1512346,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=1215852k,mode=755,inode64)
/dev/sdb2 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)
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=868)
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)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/dev/sdb3 on /home type ext4 (rw,relatime)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /mnt/sda1 type ext4 (rw,nosuid,nodev,relatime,x-gvfs-show)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1215848k,nr_inodes=303962,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)
Nextcloud-3.1.3-x86_64.AppImage on /tmp/.mount_NextclQvRhtB type fuse.Nextcloud-3.1.3-x86_64.AppImage (ro,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

What are all your local file system partition types

$ lsblk -f
NAME   FSTYPE FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                 
└─sda1 ext4   1.0   DiscoBackup 0e69004b-3081-44cc-a8f4-75a66f4e2413   47,3G    85% /mnt/sda1
sdb                                                                                 
├─sdb1 swap   1                 25b65447-7e7e-46cc-bfdf-a735676eb487                [SWAP]
├─sdb2 ext4   1.0               b58b066e-9af4-488f-8eea-6ebc5818fdb7      3G    87% /
└─sdb3 ext4   1.0               bf82b6d1-ff28-4cda-9964-e572bf932b52    9,6G    93% /home
sdc                                                                                 
sr0

How do you use 'onedrive'

I'm using my account to share data between my devices (PC and notebook, both with Deabin 12) and share data with other colleagues (MS Windows 10 & 11). Some Onedrive's folders are used as "backup".

Steps to reproduce the behaviour

When I run OnedriveGUI, the Onedrive connects with my business account, reads the config file, and starts the monitoring (as trusted by the log file). At a point, Onedriver stops and the log file reports

Attempting to perform a database vacuum to optimise database
onedrive.OneDriveException@src/onedrive.d(1415): HTTP request returned status code 404 (Not Found)
{
"error": {
"code": "itemNotFound",
"message": "The resource could not be found."
}
}

In my opinion, the error occurs when the client is trying to upload files.

Complete Verbose Log Output

$ onedrive --synchronize --verbose --verbose > debug_output.log 2>&1

DEBUG: Application started
DEBUG: Process ID: 7F7897919A00
DEBUG: User UID:   1000
DEBUG: User GID:   1000
DEBUG: User Name:  homereddu
DEBUG: Application Version: onedrive v2.5.3-1+np1+1.1
DEBUG: Application Compiled With: LDC 2100
DEBUG: Passed in 'cliArgs': ["onedrive", "--synchronize"]
DEBUG: Note: --confdir and --verbose are not listed in 'cliArgs' array
DEBUG: Passed in --confdir if present: 
DEBUG: Passed in --verbose count if present: 2
DEBUG: runtime_environment: HOME environment variable detected, expansion of '~' should be possible
DEBUG: runtime_environment: Calculated defaultHomePath: /home/homereddu
DEBUG: configDirBase: WARNING - no XDG_CONFIG_HOME environment variable set
DEBUG: configDirBase: /home/homereddu/.config
DEBUG: configDirName: Configuring application to use calculated config path
DEBUG: refreshTokenFilePath =   /home/homereddu/.config/onedrive/refresh_token
DEBUG: deltaLinkFilePath =      /home/homereddu/.config/onedrive/delta_link
DEBUG: databaseFilePath =       /home/homereddu/.config/onedrive/items.sqlite3
DEBUG: databaseFilePathDryRun = /home/homereddu/.config/onedrive/items-dryrun.sqlite3
DEBUG: uploadSessionFilePath =  /home/homereddu/.config/onedrive/session_upload
DEBUG: userConfigFilePath =     /home/homereddu/.config/onedrive/config
DEBUG: syncListFilePath =       /home/homereddu/.config/onedrive/sync_list
DEBUG: systemConfigFilePath =   /etc/onedrive/config
DEBUG: configBackupFile =       /home/homereddu/.config/onedrive/.config.backup
DEBUG: configHashFile =         /home/homereddu/.config/onedrive/.config.hash
DEBUG: syncListHashFile =       /home/homereddu/.config/onedrive/.sync_list.hash
DEBUG: runtime_environment: XDG_RUNTIME_DIR exists with value: /run/user/1000
DEBUG: runtime_environment: DBUS_SESSION_BUS_ADDRESS exists with value: unix:path=/run/user/1000/bus
DEBUG: D-Bus message bus daemon is available; GUI notifications are now enabled
DEBUG: D-Bus message bus daemon server details: ServerInfo("gnome-shell", "GNOME", "43.9", "1.2")
DEBUG: 
DEBUG: DEPRECIATION WARNING: --synchronize has been deprecated in favour of --sync or -s
DEBUG: DEPRECIATION WARNING: Deprecated commands will be removed in a future release.
DEBUG: 
DEBUG: Configuring Client Side Filtering (Selective Sync)
DEBUG: Configuring skip_dir ...
DEBUG: skip_dir: 
DEBUG: Selective Sync Directory Mask: Regex!char("^$", "i")
DEBUG: Configuring skip_dir_strict_match ...
DEBUG: skip_dir_strict_match: false
DEBUG: Configuring skip_dotfiles ...
DEBUG: skip_dotfiles: false
DEBUG: Configuring skip_file ...
DEBUG: skip_file: ~*|.~*|*.tmp|*.swp|*.partial
DEBUG: Selective Sync File Mask: Regex!char("^~.*$|^\\.~.*$|^.*\\.tmp$|^.*\\.swp$|^.*\\.partial$", "i")
DEBUG: sync_dir: Setting runtimeSyncDirectory from config value 'sync_dir'
DEBUG: sync_dir: A '~' was found in the configured 'sync_dir', automatically expanding as SHELL and USER environment variable is set
DEBUG: sync_dir: runtimeSyncDirectory set to: /home/homereddu/OneDrive
DEBUG: --------------- Application Runtime Configuration ---------------
DEBUG: Application version                          = onedrive v2.5.3-1+np1+1.1
DEBUG: Compiled with                                = LDC 2100
DEBUG: Curl version                                 = libcurl/8.11.0 OpenSSL/3.0.15 zlib/1.2.13 libpsl/0.21.2 nghttp2/1.52.0
DEBUG: User Application Config path                 = /home/homereddu/.config/onedrive
DEBUG: System Application Config path               = /etc/onedrive
DEBUG: Applicable Application 'config' location     = /home/homereddu/.config/onedrive/config
DEBUG: Configuration file found in config location  = false - using application defaults
DEBUG: Applicable 'sync_list' location              = /home/homereddu/.config/onedrive/sync_list
DEBUG: Applicable 'items.sqlite3' location          = /home/homereddu/.config/onedrive/items.sqlite3
DEBUG: Config option 'drive_id'                     = 
DEBUG: Config option 'sync_dir'                     = ~/OneDrive
DEBUG: Config option 'enable_logging'               = false
DEBUG: Config option 'log_dir'                      = /var/log/onedrive
DEBUG: Config option 'disable_notifications'        = false
DEBUG: Config option 'skip_dir'                     = 
DEBUG: Config option 'skip_dir_strict_match'        = false
DEBUG: Config option 'skip_file'                    = ~*|.~*|*.tmp|*.swp|*.partial
DEBUG: Config option 'skip_dotfiles'                = false
DEBUG: Config option 'skip_symlinks'                = false
DEBUG: Config option 'monitor_interval'             = 300
DEBUG: Config option 'monitor_log_frequency'        = 12
DEBUG: Config option 'monitor_fullscan_frequency'   = 12
DEBUG: Config option 'read_only_auth_scope'         = false
DEBUG: Config option 'dry_run'                      = false
DEBUG: Config option 'upload_only'                  = false
DEBUG: Config option 'download_only'                = false
DEBUG: Config option 'local_first'                  = false
DEBUG: Config option 'check_nosync'                 = false
DEBUG: Config option 'check_nomount'                = false
DEBUG: Config option 'resync'                       = false
DEBUG: Config option 'resync_auth'                  = false
DEBUG: Config option 'cleanup_local_files'          = false
DEBUG: Config option 'classify_as_big_delete'       = 1000
DEBUG: Config option 'disable_upload_validation'    = false
DEBUG: Config option 'disable_download_validation'  = false
DEBUG: Config option 'bypass_data_preservation'     = false
DEBUG: Config option 'no_remote_delete'             = false
DEBUG: Config option 'remove_source_files'          = false
DEBUG: Config option 'sync_dir_permissions'         = 700
DEBUG: Config option 'sync_file_permissions'        = 600
DEBUG: Config option 'space_reservation'            = 52428800
DEBUG: Config option 'application_id'               = d50ca740-c83f-4d1b-b616-12c519384f0c
DEBUG: Config option 'azure_ad_endpoint'            = 
DEBUG: Config option 'azure_tenant_id'              = 
DEBUG: Config option 'user_agent'                   = ISV|abraunegg|OneDrive Client for Linux/v2.5.3-1+np1+1.1
DEBUG: Config option 'force_http_11'                = false
DEBUG: Config option 'debug_https'                  = false
DEBUG: Config option 'rate_limit'                   = 0
DEBUG: Config option 'operation_timeout'            = 3600
DEBUG: Config option 'dns_timeout'                  = 60
DEBUG: Config option 'connect_timeout'              = 10
DEBUG: Config option 'data_timeout'                 = 60
DEBUG: Config option 'ip_protocol_version'          = 0
DEBUG: Config option 'threads'                      = 8
DEBUG: Config option 'max_curl_idle'                = 120
DEBUG: Environment var 'XDG_RUNTIME_DIR'            = true
DEBUG: Environment var 'DBUS_SESSION_BUS_ADDRESS'   = true
DEBUG: Config option 'notify_file_actions'          = false
DEBUG: 
DEBUG: Selective sync 'sync_list' configured        = false
DEBUG: 
DEBUG: Config option 'sync_business_shared_items'   = false
DEBUG: 
DEBUG: Config option 'webhook_enabled'              = false
DEBUG: 
DEBUG: --------------------DEVELOPER_OPTIONS----------------------------
DEBUG: Config option 'force_children_scan'          = false
DEBUG: 
DEBUG: -----------------------------------------------------------------
DEBUG: Configuring default new folder permissions as: 700
DEBUG: Configuring default new file permissions as: 600
DEBUG: Using IPv4 and IPv6 (if configured) for all network operations
DEBUG: Testing network to ensure network connectivity to Microsoft OneDrive Service
DEBUG: Attempting to contact Microsoft OneDrive Login Service
DEBUG: Successfully reached Microsoft OneDrive Login Service
DEBUG: applicationVersion:       2.5.3
DEBUG: latestVersion:            2.5.3
DEBUG: publishedDate:            2024-Nov-15 21:37:46Z
DEBUG: currentTime:              2024-Dec-11 16:04:48Z
DEBUG: releaseGracePeriod:       2024-Dec-15 21:37:46Z
DEBUG: CurlEngine getCurlInstance() called
DEBUG: CurlEngine curlEnginePool current size: 0
DEBUG: CurlEngine curlEnginePool is empty - constructing a new CurlEngine instance
DEBUG: Created new CurlEngine instance id: INnamU9yL2JWBrH4
DEBUG: Configuring Global Azure AD Endpoints
DEBUG: Authorised State: true
DEBUG: Configured clientId          d50ca740-c83f-4d1b-b616-12c519384f0c
DEBUG: Configured userAgent         ISV|abraunegg|OneDrive Client for Linux/v2.5.3-1+np1+1.1
DEBUG: Configured authScope:        &scope=Files.ReadWrite%20Files.ReadWrite.All%20Sites.ReadWrite.All%20offline_access&response_type=code&prompt=login&redirect_uri=
DEBUG: Configured authUrl:          https://login.microsoftonline.com/common/oauth2/v2.0/authorize
DEBUG: Configured redirectUrl:      https://login.microsoftonline.com/common/oauth2/nativeclient
DEBUG: Configured tokenUrl:         https://login.microsoftonline.com/common/oauth2/v2.0/token
DEBUG: Configured driveUrl:         https://graph.microsoft.com/v1.0/me/drive
DEBUG: Configured driveByIdUrl:     https://graph.microsoft.com/v1.0/drives/
DEBUG: Configured sharedWithMeUrl:  https://graph.microsoft.com/v1.0/me/drive/sharedWithMe
DEBUG: Configured itemByIdUrl:      https://graph.microsoft.com/v1.0/me/drive/items/
DEBUG: Configured itemByPathUrl:    https://graph.microsoft.com/v1.0/me/drive/root:/
DEBUG: Configured siteSearchUrl:    https://graph.microsoft.com/v1.0/sites?search
DEBUG: Configured siteDriveUrl:     https://graph.microsoft.com/v1.0/sites/
DEBUG: OneDrive API releaseCurlEngine() Called
DEBUG: CurlEngine releaseEngine() called on instance id: INnamU9yL2JWBrH4
DEBUG: CurlEngine curlEnginePool size before release: 0
DEBUG: Release Timestamp for CurlEngine INnamU9yL2JWBrH4: 2024-Dec-11 16:04:48.3338814Z
DEBUG: CurlEngine cleanup() called on instance id: INnamU9yL2JWBrH4
DEBUG: CurlEngine curlEnginePool size after release: 1
DEBUG: SQLite Threadsafe database value: 1
DEBUG: Initialised TaskPool worker with threads: 8
DEBUG: Using Curl defaults for HTTP operational protocol version (potentially HTTP/2)
DEBUG: CurlEngine getCurlInstance() called
DEBUG: CurlEngine curlEnginePool current size: 1
DEBUG: CurlEngine INnamU9yL2JWBrH4 time since last use: 6 secs, 136 ms, 653 μs, and 5 hnsecs
DEBUG: CurlEngine was in a valid state - returning existing CurlEngine instance
DEBUG: Using CurlEngine instance ID: INnamU9yL2JWBrH4
DEBUG: Read token from appConfig
DEBUG: Authorised State: true
DEBUG: CurlEngine getCurlInstance() called
DEBUG: CurlEngine curlEnginePool current size: 0
DEBUG: CurlEngine curlEnginePool is empty - constructing a new CurlEngine instance
DEBUG: Created new CurlEngine instance id: BmyQkTWIbdh9HCX6
DEBUG: Read token from appConfig
DEBUG: Authorised State: true
DEBUG: Getting Account Default Drive Details
DEBUG: Request URL = https://graph.microsoft.com/v1.0/me/drive
DEBUG: Microsoft OneDrive Access Token has expired. Must generate a new Microsoft OneDrive Access Token
DEBUG: Need to generate a new access token for Microsoft OneDrive
DEBUG: Request URL = https://login.microsoftonline.com/common/oauth2/v2.0/token
DEBUG: HTTP Response Headers: ["strict-transport-security":"max-age=31536000; includeSubDomains", "x-ms-ests-server":"2.1.19683.3 - NEULR1 ProdSlices", "x-xss-protection":"0", "p3p":"CP=\"DSP CUR OTPi IND OTRi ONL FIN\"", "x-ms-request-id":"371f27c2-8d95-47d5-b889-934417226400", "x-ms-srs":"1.P", "content-security-policy-report-only":"object-src 'none'; base-uri 'self'; script-src 'self' 'nonce-N4Hz6Uf8__2Q_fCHalBpJw' 'unsafe-inline' 'unsafe-eval' https://*.msauth.net https://*.msftauth.net https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com https://*.bing.com 'report-sample'; img-src 'self' data: https://*.msauth.net https://*.msftauth.net https://*.msftauthimages.net https://*.msauthimages.net https://*.msidentity.com https://*.microsoftonline-p.com https://*.microsoftazuread-sso.com https://*.azureedge.net https://*.outlook.com https://*.office.com https://*.office365.com https://*.microsoft.com https://*.bing.com 'report-sample'; report-uri https://csp.microsoft.com/report/ESTS-UX-All", "date":"Wed, 11 Dec 2024 16:04:54 GMT", "x-content-type-options":"nosniff", "content-length":"3285", "set-cookie":"stsservicecookie=estsfd; path=/; secure; samesite=none; httponly", "cache-control":"no-store, no-cache", "expires":"-1", "pragma":"no-cache", "content-type":"application/json; charset=utf-8"]
DEBUG: HTTP Status Line: 200  (2.0)
DEBUG: CurlEngine cleanup() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: Updating appConfig.refreshToken with updated refreshToken
DEBUG: Updating refreshToken on disk
DEBUG: Setting file permissions for: /home/homereddu/.config/onedrive/refresh_token
DEBUG: HTTP Response Headers: ["strict-transport-security":"max-age=31536000", "x-ms-ags-diagnostic":"{\"ServerInfo\":{\"DataCenter\":\"Switzerland North\",\"Slice\":\"E\",\"Ring\":\"3\",\"ScaleUnit\":\"001\",\"RoleInstance\":\"ZRH2EPF000000EB\"}}", "odata-version":"4.0", "date":"Wed, 11 Dec 2024 16:04:54 GMT", "client-request-id":"86bf39c9-19df-40b8-bae4-46c59efbd781", "request-id":"86bf39c9-19df-40b8-bae4-46c59efbd781", "cache-control":"no-store, no-cache", "content-type":"application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8"]
DEBUG: HTTP Status Line: 200  (2.0)
DEBUG: CurlEngine cleanup() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: OneDrive Account Default Drive Details:      {"@odata.context":"https:\/\/graph.microsoft.com\/v1.0\/$metadata#drives\/$entity","createdBy":{"user":{"displayName":"Account di sistema"}},"createdDateTime":"2023-02-05T00:42:03Z","description":"","driveType":"business","id":"b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U","lastModifiedBy":{"user":{"displayName":"ANDREA MARCHIONNI","email":"[email protected]","id":"5f7e7c2b-8dae-43e3-b926-250fa5c41215"}},"lastModifiedDateTime":"2024-12-11T14:31:48Z","name":"Documenti","owner":{"user":{"displayName":"ANDREA MARCHIONNI","email":"[email protected]","id":"5f7e7c2b-8dae-43e3-b926-250fa5c41215"}},"quota":{"deleted":301444744,"remaining":5388727795689,"state":"normal","total":5497558138880,"used":108528898447},"webUrl":"https:\/\/cnrsc-my.sharepoint.com\/personal\/andrea_marchionni_cnr_it\/Documents"}
DEBUG: CurlEngine getCurlInstance() called
DEBUG: CurlEngine curlEnginePool current size: 0
DEBUG: CurlEngine curlEnginePool is empty - constructing a new CurlEngine instance
DEBUG: Created new CurlEngine instance id: 9Crf5EGhqYtUlaW2
DEBUG: Read token from appConfig
DEBUG: Authorised State: true
DEBUG: Seeking available quota for this drive id: b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U
DEBUG: Request URL = https://graph.microsoft.com/v1.0/drives/b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U/?select=quota
DEBUG: Existing Microsoft OneDrive Access Token Expires: 2024-Dec-11 18:08:27.814456
DEBUG: HTTP Response Headers: ["strict-transport-security":"max-age=31536000", "x-ms-ags-diagnostic":"{\"ServerInfo\":{\"DataCenter\":\"Switzerland North\",\"Slice\":\"E\",\"Ring\":\"3\",\"ScaleUnit\":\"002\",\"RoleInstance\":\"ZR2PEPF000000BB\"}}", "odata-version":"4.0", "date":"Wed, 11 Dec 2024 16:04:54 GMT", "client-request-id":"db4125b0-108c-4dee-a259-ee20fcd0cb55", "request-id":"db4125b0-108c-4dee-a259-ee20fcd0cb55", "cache-control":"no-store, no-cache", "content-type":"application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8"]
DEBUG: HTTP Status Line: 200  (2.0)
DEBUG: CurlEngine cleanup() called on instance id: 9Crf5EGhqYtUlaW2
DEBUG: OneDrive API releaseCurlEngine() Called
DEBUG: CurlEngine releaseEngine() called on instance id: 9Crf5EGhqYtUlaW2
DEBUG: CurlEngine curlEnginePool size before release: 0
DEBUG: Release Timestamp for CurlEngine 9Crf5EGhqYtUlaW2: 2024-Dec-11 16:04:55.3259193Z
DEBUG: CurlEngine cleanup() called on instance id: 9Crf5EGhqYtUlaW2
DEBUG: CurlEngine curlEnginePool size after release: 1
DEBUG: Quota Details: {"@odata.context":"https:\/\/graph.microsoft.com\/v1.0\/$metadata#drives\/$entity","quota":{"deleted":301444744,"remaining":5388727795689,"state":"normal","total":5497558138880,"used":108528898447}}
DEBUG: Reported Available Online Quota for driveID 'b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U': 5388727795689
DEBUG: onlineDriveDetails: ["b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U":const(DriveDetailsCache)("b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U", false, true, 5388727795689)]
DEBUG: appConfig.accountType                 = business
DEBUG: appConfig.defaultDriveId              = b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U
DEBUG: cachedOnlineDriveData.quotaRemaining  = 5388727795689
DEBUG: cachedOnlineDriveData.quotaAvailable  = true
DEBUG: cachedOnlineDriveData.quotaRestricted = false
DEBUG: OneDrive API releaseCurlEngine() Called
DEBUG: CurlEngine releaseEngine() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: CurlEngine curlEnginePool size before release: 1
DEBUG: Release Timestamp for CurlEngine BmyQkTWIbdh9HCX6: 2024-Dec-11 16:04:55.3269188Z
DEBUG: CurlEngine cleanup() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: CurlEngine curlEnginePool size after release: 2
DEBUG: CurlEngine getCurlInstance() called
DEBUG: CurlEngine curlEnginePool current size: 2
DEBUG: CurlEngine BmyQkTWIbdh9HCX6 time since last use: 707 μs and 6 hnsecs
DEBUG: CurlEngine was in a valid state - returning existing CurlEngine instance
DEBUG: Using CurlEngine instance ID: BmyQkTWIbdh9HCX6
DEBUG: Read token from appConfig
DEBUG: Authorised State: true
DEBUG: Getting Account Default Root Details
DEBUG: Request URL = https://graph.microsoft.com/v1.0/me/drive/root
DEBUG: Existing Microsoft OneDrive Access Token Expires: 2024-Dec-11 18:08:27.814456
DEBUG: HTTP Response Headers: ["strict-transport-security":"max-age=31536000", "x-ms-ags-diagnostic":"{\"ServerInfo\":{\"DataCenter\":\"Switzerland North\",\"Slice\":\"E\",\"Ring\":\"3\",\"ScaleUnit\":\"001\",\"RoleInstance\":\"ZRH2EPF000000EB\"}}", "date":"Wed, 11 Dec 2024 16:04:55 GMT", "client-request-id":"5d062fb5-1263-4d88-85d2-910c211f566c", "request-id":"5d062fb5-1263-4d88-85d2-910c211f566c", "cache-control":"no-store, no-cache", "content-type":"application/json; odata.metadata=minimal; odata.streaming=true; IEEE754Compatible=false; charset=utf-8"]
DEBUG: HTTP Status Line: 200  (2.0)
DEBUG: CurlEngine cleanup() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: OneDrive Account Default Root Details:       {"@odata.context":"https:\/\/graph.microsoft.com\/v1.0\/$metadata#Collection(driveItem)\/$entity","createdDateTime":"2023-02-05T00:42:03Z","fileSystemInfo":{"createdDateTime":"2023-02-05T00:42:03Z","lastModifiedDateTime":"2024-12-11T14:31:48Z"},"folder":{"childCount":52},"id":"012KGAFKN6Y2GOVW7725BZO354PWSELRRZ","lastModifiedDateTime":"2024-12-11T14:31:48Z","name":"root","parentReference":{"driveId":"b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U","driveType":"business"},"root":{},"size":104897487734,"webUrl":"https:\/\/cnrsc-my.sharepoint.com\/personal\/andrea_marchionni_cnr_it\/Documents"}
DEBUG: appConfig.defaultRootId      = 012KGAFKN6Y2GOVW7725BZO354PWSELRRZ
DEBUG: saveItem - creating DB item from this JSON: {"@odata.context":"https:\/\/graph.microsoft.com\/v1.0\/$metadata#Collection(driveItem)\/$entity","createdDateTime":"2023-02-05T00:42:03Z","fileSystemInfo":{"createdDateTime":"2023-02-05T00:42:03Z","lastModifiedDateTime":"2024-12-11T14:31:48Z"},"folder":{"childCount":52},"id":"012KGAFKN6Y2GOVW7725BZO354PWSELRRZ","lastModifiedDateTime":"2024-12-11T14:31:48Z","name":"root","parentReference":{"driveId":"b!JOBgna73W0uKFlNcTc82Og9hSowGVXFNjmsfOo935Wmobvtgz05zRb8dLDl_fE7U","driveType":"business"},"root":{},"size":104897487734,"webUrl":"https:\/\/cnrsc-my.sharepoint.com\/personal\/andrea_marchionni_cnr_it\/Documents"}
DEBUG: Flagging object as a directory
DEBUG: Updating DB Item object with correct values as this is a 'root' object
DEBUG: ROOT JSON Item HAS parentReference .... setting item.driveId = jsonItem['parentReference']['driveId'].str
DEBUG: OneDrive API releaseCurlEngine() Called
DEBUG: CurlEngine releaseEngine() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: CurlEngine curlEnginePool size before release: 1
DEBUG: Release Timestamp for CurlEngine BmyQkTWIbdh9HCX6: 2024-Dec-11 16:04:55.5920553Z
DEBUG: CurlEngine cleanup() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: CurlEngine curlEnginePool size after release: 2
DEBUG: OneDrive API releaseCurlEngine() Called
DEBUG: CurlEngine releaseEngine() called on instance id: INnamU9yL2JWBrH4
DEBUG: CurlEngine curlEnginePool size before release: 2
DEBUG: Release Timestamp for CurlEngine INnamU9yL2JWBrH4: 2024-Dec-11 16:04:55.5929667Z
DEBUG: CurlEngine cleanup() called on instance id: INnamU9yL2JWBrH4
DEBUG: CurlEngine curlEnginePool size after release: 3
DEBUG: runtimeSyncDirectory: Configured 'sync_dir' is missing locally. Creating: /home/homereddu/OneDrive
DEBUG: 
DEBUG: An application cache state issue has been detected where a --resync is required
DEBUG: 
DEBUG: Exit scope was called
DEBUG: performSynchronisedExitProcess called by: exitScope
DEBUG: Shutting down Sync Engine instance
DEBUG: SyncEngine: Waiting for all internal threads to complete
DEBUG: Shutting down processPool in a thread blocking manner
DEBUG: Shutdown Sync Engine instance is complete
DEBUG: CurlEngine releaseAllCurlInstances() called
DEBUG: CurlEngine curlEnginePool size to release: 3
DEBUG: CurlEngine cleanup() called on instance id: 9Crf5EGhqYtUlaW2
DEBUG: CurlEngine shutdownCurlHTTPInstance() called on instance id: 9Crf5EGhqYtUlaW2
DEBUG: HTTP instance still active: 9Crf5EGhqYtUlaW2
DEBUG: HTTP instance isStopped state before http.shutdown(): false
DEBUG: HTTP instance isStopped state post http.shutdown(): true
DEBUG: HTTP instance shutdown and destroyed: 9Crf5EGhqYtUlaW2
DEBUG: CurlEngine destroyed
DEBUG: CurlEngine cleanup() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: CurlEngine shutdownCurlHTTPInstance() called on instance id: BmyQkTWIbdh9HCX6
DEBUG: HTTP instance still active: BmyQkTWIbdh9HCX6
DEBUG: HTTP instance isStopped state before http.shutdown(): false
DEBUG: HTTP instance isStopped state post http.shutdown(): true
DEBUG: HTTP instance shutdown and destroyed: BmyQkTWIbdh9HCX6
DEBUG: CurlEngine destroyed
DEBUG: CurlEngine cleanup() called on instance id: INnamU9yL2JWBrH4
DEBUG: CurlEngine shutdownCurlHTTPInstance() called on instance id: INnamU9yL2JWBrH4
DEBUG: HTTP instance still active: INnamU9yL2JWBrH4
DEBUG: HTTP instance isStopped state before http.shutdown(): false
DEBUG: HTTP instance isStopped state post http.shutdown(): true
DEBUG: HTTP instance shutdown and destroyed: INnamU9yL2JWBrH4
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: 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

Screenshots

No response

Other Log Information or Details

Part of OnedriveGUI Log file

2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] Attempting to perform a database vacuum to optimise database
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] onedrive.OneDriveException@src/onedrive.d(1415): HTTP request returned status code 404 (Not Found)
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] {
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] "error": {
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] "code": "itemNotFound",
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] "message": "The resource could not be found."
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] }
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] }
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ----------------
2024-12-11 15:32:15,084 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77b0436d]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77b00eca]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77adbe4c]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77ae6de8]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77ae210c]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77ae17a3]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77b79d8b]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77b7751f]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll() [0x7f847c39db7b]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? _d_run_main2 [0x7f847c39d995]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? _d_run_main [0x7f847c39d7ed]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77baa321]
2024-12-11 15:32:15,085 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x7f847c0db249]
2024-12-11 15:32:15,086 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? __libc_start_main [0x7f847c0db304]
2024-12-11 15:32:15,086 [OneDriveGUI.py:2022][fn=read_stdout][INFO] - [[email protected]] ??:? [0x55cf77a77260]
2024-12-11 15:32:16,093 [OneDriveGUI.py:2559][fn=<lambda>][INFO] - finished worker [email protected]
2024-12-11 15:32:16,093 [OneDriveGUI.py:1956][fn=stop_worker][INFO] - [[email protected]] Waiting for worker to finish...
2024-12-11 15:32:16,093 [OneDriveGUI.py:1960][fn=stop_worker][INFO] - [[email protected]] Quitting thread
2024-12-11 15:32:16,093 [OneDriveGUI.py:1963][fn=stop_worker][INFO] - [[email protected]] Removing thread info
2024-12-11 15:32:16,093 [OneDriveGUI.py:1966][fn=stop_worker][INFO] - [GUI] Remaining running workers: {}

Additional context

No response

@ilchimicopazzo ilchimicopazzo added the Bug Something isn't working label Dec 11, 2024
@abraunegg
Copy link
Owner

@ilchimicopazzo

Please provide the full unredacted verbose debug log via email for analysis

@abraunegg abraunegg changed the title Bug: Onedriver 2.5.3 does not sync with business account. Error code "itemNotFound". Bug: Onedrive 2.5.3 does not sync with business account. Error code "itemNotFound". Dec 11, 2024
@abraunegg
Copy link
Owner

@ilchimicopazzo

An application cache state issue has been detected where a --resync is required

Additionally, as per the application log output - have you performed a --resync ??

@ilchimicopazzo
Copy link
Author

@ilchimicopazzo

An application cache state issue has been detected where a --resync is required

Additionally, as per the application log output - have you performed a --resync ??

Hi, I read only now this suggestion. In my opinion it is created after that I quickly closed the program. However, I will do as soon as possible.

I will send you also the log file.

Thank you for the support!

@abraunegg
Copy link
Owner

@ilchimicopazzo

Please can you provide the correct debug log for your OneDrive Business Account usage.

As you are using the OneDrive GUI , this creates separate configuration files for each account type.

When performing the creation of a debug log, you must specify the --confdir parameter to correctly pass in the configuration directory that is being used.

If this is an issue for you , please raise a bug report / discussion on the OneDrive GUI https://github.com/bpozdena/OneDriveGUI to ask for help in creating the correct debug log for your problem.

@ilchimicopazzo
Copy link
Author

@ilchimicopazzo

Please can you provide the correct debug log for your OneDrive Business Account usage.

As you are using the OneDrive GUI , this creates separate configuration files for each account type.

When performing the creation of a debug log, you must specify the --confdir parameter to correctly pass in the configuration directory that is being used.

If this is an issue for you , please raise a bug report / discussion on the OneDrive GUI https://github.com/bpozdena/OneDriveGUI to ask for help in creating the correct debug log for your problem.

Thank you for your suggestions.
I will try tomorrow when I will be back in the office.

@abraunegg
Copy link
Owner

@ilchimicopazzo

Thank you for your suggestions.
I will try tomorrow when I will be back in the office.

Please can you do this with urgency. I cannot reproduce your issue. This bug is holding up the v2.5.4 release train now.

@abraunegg
Copy link
Owner

@ilchimicopazzo

Please can you respond

@ilchimicopazzo
Copy link
Author

@ilchimicopazzo

Please can you respond

I have send a message to [email protected] right now.

Yesterday, I did the resync and the normal sync recording log in a zip file. Please, let me know if it is useful for you.

Have a nice day,
Andrea

@abraunegg
Copy link
Owner

@ilchimicopazzo

Thankyou for the debug log - will analyse shortly.

You have a number of issues because you are also using the OneDrive GUI that creates incorrect application configuration files.

Please refer to my email for further details.

@abraunegg
Copy link
Owner

abraunegg commented Dec 25, 2024

@ilchimicopazzo
I can now reproduce this issue. This issue is caused by:

  1. A Shared Folder link in your account pointing to a directory on a SharePoint Library
  2. The link, is pointing now to a non-existent Folder on the SharePoint Library

reproduction example with current 'master':

Reading configuration file: /home/alex/.config/onedrive/config
Configuration file successfully loaded
Using 'user' configuration path for application config and state data: /home/alex/.config/onedrive
D-Bus message bus daemon is available; GUI notifications are now enabled

ERROR: Unable to create /var/log/onedrive
ERROR: Please manually create '/var/log/onedrive' and set appropriate permissions to allow write access for your user to this location.
ERROR: The requested client activity log will instead be located in your users home directory

Using the following path to store the runtime application log: /home/alex
The item database is incompatible, re-creating database table structures
Deleting the saved application sync status ...
Using IPv4 and IPv6 (if configured) for all network operations
Attempting to contact Microsoft OneDrive Login Service
Successfully reached Microsoft OneDrive Login Service
Checking Application Version ...
Attempting to initialise the OneDrive API ...
Configuring Global Azure AD Endpoints
The OneDrive API was initialised successfully
Opening the item database ...
Application Version:  onedrive v2.5.3-27-g71a71da
Account Type:         business
Default Drive ID:     b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
Default Root ID:      01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Remaining Free Space: 1022.62 GB (1098031941728 bytes)
Sync Engine Initialised with new Onedrive API instance
All application operations will be performed in the configured local 'sync_dir' directory: /home/alex/OneDrive
Fetching /delta response from the OneDrive API for Drive ID: b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
Processing API Response Bundle: 1 - Quantity of 'changes|items' in this bundle to process: 9
Finished processing /delta JSON response from the OneDrive API
Processing 8 applicable changes and items received from Microsoft OneDrive
Processing OneDrive JSON item batch [1/1] to ensure consistent local state
Creating local directory: ./Sub Folder 2
WARNING: OneDrive quota information is being restricted. Please fix by speaking to your OneDrive / Office 365 Administrator.
Creating local directory: ./L18N
Creating local directory: ./L18N/α
Creating local directory: ./L18N/เอกสาร
Creating local directory: ./L18N/Bücher
Creating local directory: ./bad_url_decode
Creating local directory: ./test_folder_in_3040
Number of items to download from Microsoft OneDrive: 1
Downloading file: bad_url_decode/BTINserye%20Anti-Terror%20Law%20sa%20Wikang%20Filipino%20-%2.mp4 ... done
Syncing this OneDrive Business Shared Folder: Sub Folder 2
Generating a /delta response from the OneDrive API from this Item ID: 01TZRSBFDUQZAUOGZ7BJGZ24DDTBCLCGWI
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from the OneDrive Shared Folder
Finished processing self generated /delta JSON response from the OneDrive API
Processing 2 applicable changes and items received from Microsoft OneDrive
Processing OneDrive JSON item batch [1/1] to ensure consistent local state
Number of items to download from Microsoft OneDrive: 1
Downloading file: Sub Folder 2/shared_folder_new_file.txt ... done
Syncing this OneDrive Business Shared Folder: test_folder_in_3040

ERROR: Microsoft OneDrive API returned an error with the following message:
  Error Message:    HTTP request returned status code 404 (Not Found)
  Error Reason:     The resource could not be found.
  Error Code:       itemNotFound
  Calling Function: generateDeltaResponse()


CODING TO DO: The query of OneDrive API to getPathDetailsById generated an invalid JSON response - thus we cant build our own /delta simulated response ... how to handle?

As I now can reproduce this, I can work on a fix for this particular issue.

@abraunegg abraunegg linked a pull request Dec 25, 2024 that will close this issue
abraunegg added a commit that referenced this issue Dec 25, 2024
* Update PR with fix for Issue #3040
@abraunegg
Copy link
Owner

@ilchimicopazzo
This issue is now resolved with PR #3051

To test this 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.

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

#!/bin/bash

PR=3051

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-pr3051 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.3-33-gd323e46 or greater.

Expected Result

  1. Shared Folders (Personal & Business) should operate as normal
  2. Shared Folders (Personal & Business) when include|excluded via 'sync_list' should be handled correctly
  3. Shared Folders (a Link to a SharePoint Document Library root) should operate as normal
  4. Shared Folders that are a broken link in your account, will now not error out

This PR has a DB Schema Change due to fixing how Shared Folders (all types) is handled, thus, a --resync will automatically happen due to the DB Schema Change.

I have attempted to test this as much as possible, however there are 100% nuances I cannot test, especially with the API differences in Europe.

resolution evidence using PR #3051

Reading configuration file: /home/alex/.config/onedrive/config
Configuration file successfully loaded
Using 'user' configuration path for application config and state data: /home/alex/.config/onedrive
D-Bus message bus daemon is available; GUI notifications are now enabled

ERROR: Unable to create /var/log/onedrive
ERROR: Please manually create '/var/log/onedrive' and set appropriate permissions to allow write access for your user to this location.
ERROR: The requested client activity log will instead be located in your users home directory

Using the following path to store the runtime application log: /home/alex
Deleting the saved application sync status ...
Using IPv4 and IPv6 (if configured) for all network operations
Attempting to contact Microsoft OneDrive Login Service
Successfully reached Microsoft OneDrive Login Service
Checking Application Version ...
Attempting to initialise the OneDrive API ...
Configuring Global Azure AD Endpoints
The OneDrive API was initialised successfully
Opening the item database ...
Application Version:  onedrive v2.5.3-34-g6e82ee4
Account Type:         business
Default Drive ID:     b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
Default Root ID:      01WIXGO5V6Y2GOVW7725BZO354PWSELRRZ
Remaining Free Space: 1022.62 GB (1098031942563 bytes)
Sync Engine Initialised with new Onedrive API instance
All application operations will be performed in the configured local 'sync_dir' directory: /home/alex/OneDrive
Fetching /delta response from the OneDrive API for Drive ID: b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
Processing API Response Bundle: 1 - Quantity of 'changes|items' in this bundle to process: 9
Finished processing /delta JSON response from the OneDrive API
Processing 8 applicable JSON items received from Microsoft OneDrive
Processing OneDrive JSON item batch [1/1] to ensure consistent local state

WARNING: The OneDrive Shared Folder link target 'test_folder_in_3040' cannot be found online using the provided online data.
WARNING: This is potentially a broken online OneDrive Shared Folder link or you no longer have access to it. Please correct this error online.

Syncing this OneDrive Business Shared Folder: Sub Folder 2
Generating a /delta response from the OneDrive API from this Item ID: 01TZRSBFDUQZAUOGZ7BJGZ24DDTBCLCGWI
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from the OneDrive Shared Folder
Finished processing self generated /delta JSON response from the OneDrive API
Processing 2 applicable JSON items received from Microsoft OneDrive
Processing OneDrive JSON item batch [1/1] to ensure consistent local state
WARNING: OneDrive quota information is being restricted. Please fix by speaking to your OneDrive / Office 365 Administrator.
Syncing this OneDrive Business Shared Folder: test_folder_in_3040

WARNING: The OneDrive Shared Folder link target 'test_folder_in_3040' cannot be found online using the provided online data.
WARNING: This is potentially a broken online OneDrive Shared Folder link or you no longer have access to it. Please correct this error online.

No changes or items that can be applied were discovered while processing the data received from Microsoft OneDrive
Performing a database consistency and integrity check on locally stored data
Processing DB entries for this Drive ID: b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
Processing: ~/OneDrive
The directory has not changed
Processing: L18N
The directory has not changed
Processing: L18N/α
The directory has not changed
Processing: L18N/เอกสาร
The directory has not changed
Processing: L18N/Bücher
The directory has not changed
Processing: bad_url_decode
The directory has not changed
Processing: bad_url_decode/BTINserye%20Anti-Terror%20Law%20sa%20Wikang%20Filipino%20-%2.mp4
The file has not changed
Processing DB entries for this Drive ID: b!fZgJhK-pU0eTQpylvmoYCkE4YgH_KRNDlxjRx9OWNqmV9Q_E_uWdRJKIB5L_ruPN
WARNING: OneDrive quota information is being restricted. Please fix by speaking to your OneDrive / Office 365 Administrator.
Processing: ~/OneDrive
The directory has not changed
Processing: Sub Folder 2
The directory has not changed
Processing: Sub Folder 2/shared_folder_new_file.txt
The file has not changed
Scanning the local file system '~/OneDrive' for new data to upload
Performing a last examination of the most recent online data within Microsoft OneDrive to complete the reconciliation process
Fetching /delta response from the OneDrive API for Drive ID: b!bO8V7s9SSk6r7mWHpIjURotN33W1W2tEv3OXV_oFIdQimEdOHR-1So7CqeT1MfHA
Processing API Response Bundle: 1 - Quantity of 'changes|items' in this bundle to process: 0
Finished processing /delta JSON response from the OneDrive API
No changes or items that can be applied were discovered while processing the data received from Microsoft OneDrive
Syncing this OneDrive Business Shared Folder: Sub Folder 2
Generating a /delta response from the OneDrive API from this Item ID: 01TZRSBFDUQZAUOGZ7BJGZ24DDTBCLCGWI
Adding OneDrive folder details for processing
Adding 1 OneDrive items for processing from the OneDrive Shared Folder
Finished processing self generated /delta JSON response from the OneDrive API
Processing 2 applicable JSON items received from Microsoft OneDrive
Processing OneDrive JSON item batch [1/1] to ensure consistent local state
Syncing this OneDrive Business Shared Folder: test_folder_in_3040

WARNING: The OneDrive Shared Folder link target 'test_folder_in_3040' cannot be found online using the provided online data.
WARNING: This is potentially a broken online OneDrive Shared Folder link or you no longer have access to it. Please correct this error online.

No changes or items that can be applied were discovered while processing the data received from Microsoft OneDrive

Sync with Microsoft OneDrive is complete
Attempting to perform a database vacuum to optimise database
Database vacuum is complete

As I can reproduce this, and confirmed this fix, marking this as resolved, fixed and closing issue.

@abraunegg abraunegg added Fixed and removed In Progress Currently being worked on labels Dec 25, 2024
@abraunegg
Copy link
Owner

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Repository owner locked as resolved and limited conversation to collaborators Jan 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Fixed OneDrive Business
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants