Full Diagnostic Tree & Step-by-Step Overview
What specific error message, code, or behavior occurs when you attempt to open or download a Files On-Demand cloud file?
- Error 0x8007016A: The cloud file provider is not running.
- Error 0x80070185: The cloud operation was unsuccessful or timed out.
- File status icon shows blue cloud or syncing perpetually, but double-clicking causes File Explorer to freeze without opening.
- 'Always keep on this device' option is greyed out or changes revert immediately upon selection.
What is the operational status of the OneDrive synchronization process and the underlying Windows Cloud Files Filter driver?
- OneDrive.exe process is running in Task Manager, but the CldFlt driver is unattached or disabled.
- OneDrive.exe background process continuously crashes or enters an intermittent restart loop.
- Group Policy or MDM configuration has disabled the Files On-Demand cloud sync engine.
Re-enabling and Attaching Windows Cloud Files Filter Driver (CldFlt)
Solution:
Root Cause: CldFlt Kernel Filter Driver Detachment
Error 0x8007016A occurs when the Windows Cloud Files Filter Driver (cldflt.sys) is stopped, corrupted, or unattached from the active NTFS volume. When an application requests a file stream for a placeholder (IO_REPARSE_TAG_CLOUD reparse point), the OS delegates the hydration request to cldflt.sys. If this kernel-mode filter is unresponsive, the File System minifilter pipeline breaks and returns ERROR_CLOUD_FILE_NUM_BYTES_MISMATCH or ERROR_CLOUD_FILE_NOT_RUNNING.
# Diagnostic Verification:
Open Command Prompt as Administrator and run filter manager query: fltmc filters
Verify whether cldflt is listed under Filter Name. If missing, check service configuration: reg query HKLM\SYSTEM\CurrentControlSet\Services\CldFlt /v Start
(Value 0x4 indicates the service is disabled).
# Step-by-Step Fix:
1. Re-enable CldFlt Kernel Driver in System Registry:
Open PowerShell as Administrator and set the startup mode to Auto-System Start: Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\CldFlt" -Name "Start" -Value 2
2. Force Filter Attachment to System Drive:
Attach the filter driver to your local OS drive: fltmc attach cldflt C:
3. Restart OneDrive Synchronization Daemon:
Terminate active instances and relaunch OneDrive: taskkill /f /im OneDrive.exe
Start-Process "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe"
4. Repair OS Cloud Storage API Binaries:
Execute System File Checker to re-install damaged driver files: sfc /scannow
# Prevention & Long-Term Monitoring:
Ensure third-party system optimizer or telemetry blocker applications are not configured to disable non-essential kernel drivers like CldFlt.
Resetting Corrupted OneDrive Sync Engine Database
Solution:
Root Cause: Sync Engine SQLite Cache Corruption
The OneDrive client uses local SQLite databases (
SyncEngine.db and
SafeDelete.db) inside
%LOCALAPPDATA%\Microsoft\OneDrive\settings to map remote cloud file IDs to local reparse structures. When power loss or abrupt process termination occurs during metadata write operations, database tables lock or experience corruption. This causes
OneDrive.exe to crash repeatedly upon processing hydration requests.
# Diagnostic Verification:
Open Event Viewer (eventvwr.msc) and check Windows Logs > Application.Look for Event ID 1000 errors identifying OneDrive.exe as the faulting application and kernelbase.dll or SQLite3.dll as the faulting module.# Step-by-Step Fix:
1. Execute OneDrive Command-Line Reset:
Open the Run dialog (Win + R) and run the built-in reset binary: %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
*Note: If OneDrive was installed per-machine or via Microsoft 365 Enterprise, use:* C:\Program Files\Microsoft OneDrive\onedrive.exe /reset
2. Wait and Manually Relaunch:
Wait 2 minutes for background cleanup processes to complete, then start OneDrive: Start-Process "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe"
3. Re-enable Files On-Demand:
Open OneDrive Settings > Sync and backup > Advanced settings, expand Files On-Demand, and confirm that Download all files now or Save space and download files as you use them is active.# Prevention & Long-Term Monitoring:
Keep OneDrive updated by installing stable client builds directly via Microsoft Official Support Guide documentation resources.
Clearing Group Policy & Registry Administrative Restrictions
Solution:
Root Cause: Policy Restrictions on Cloud Files Sync Engine
In enterprise environment builds or managed endpoints, Group Policy Objects (GPO) or Intune Configuration Profiles may enforce policies like PreventOneDriveFileSync or DisableOnDemandFiles. These registry keys explicitly prevent the sync driver from allocating bandwidth or spawning hydration threads for placeholder files.
# Diagnostic Verification:
Inspect registry policy paths using PowerShell: Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\OneDrive" -Name "FilesOnDemandEnabled" -ErrorAction SilentlyContinue
(A value of 0 strictly disables Files On-Demand functionality).
# Step-by-Step Fix:
1. Remove Override Registry Keys:
Open PowerShell as Administrator and delete blocking policy keys: Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\OneDrive" -Name "FilesOnDemandEnabled" -ErrorAction SilentlyContinue
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\OneDrive" -Name "DisableOnDemandFiles" -ErrorAction SilentlyContinue
2. Update Local Group Policy Objects:
Open Group Policy Editor (gpedit.msc).Navigate to Computer Configuration > Administrative Templates > OneDrive.Ensure Use OneDrive Files On-Demand is set to Not Configured or Enabled.3. Force Policy Refresh:
Update local security policy configurations: gpupdate /force
# Prevention & Long-Term Monitoring:
Verify Intune / Endpoint Manager Endpoint Protection policies to ensure conflicting sync rules are not deployed to workstation groups.
What physical or network environment condition exists during the failed cloud file hydration operation?
- The download process times out on large files over high-latency networks or VPN connections.
- Windows Storage Sense or Low Disk Space warnings are triggered on the primary OS drive.
- Third-party Security Suites (AV/EDR) block raw file stream allocation during hydration.
Adjusting Cloud Hydration Timeout and Bypassing Network Bottlenecks
Solution:
Root Cause: File System Minifilter Hydration Timeout (0x80070185)
Error 0x80070185 (ERROR_CLOUD_FILE_UNSUCCESSFUL) occurs when the I/O request packet (IRP) sent to the Cloud Files Filter Driver times out before the file payload is completely downloaded from Azure Blob Storage. When downloading large files (e.g., >1 GB) across slow or high-latency connections (such as corporate VPNs with split-tunneling disabled), the Win32 file system driver drops the pending file handle.
# Diagnostic Verification:
Open PowerShell and test throughput to Microsoft sync endpoints: Test-NetConnection -ComputerName "onedrive.live.com" -Port 443
Check if HTTP proxy or SSL inspection is interrupting HTTPS range requests required for multi-part file hydration.# Step-by-Step Fix:
1. Disable Metered Connection Setting in Windows:
Open Settings > Network & internet > Wi-Fi / Ethernet.Select your active network and set Metered connection to Off.2. Configure BITS and OneDrive Bandwidth Limitations:
Open OneDrive Settings > Sync and backup > Advanced settings.Under Download rate, set the policy strictly to Don't limit.3. Clear WinINet Proxy Cache:
Reset local proxy configurations in PowerShell as Administrator: netsh winhttp reset proxy
4. Hydrate Files via PowerShell Chunking (Workaround for Massive Files):
Use PowerShell to explicitly force hydration of targeted items without relying on File Explorer UI hooks: Get-ChildItem -Path "$env:USERPROFILE\OneDrive\TargetFile.zip" | ForEach-Object { Get-Content $_.FullName -ReadCount 1 -TotalCount 1 } > $null
# Prevention & Long-Term Monitoring:
Configure enterprise VPN clients to exclude OneDrive URL ranges (*.photos.live.com, *.sharepoint.com, *.onedrive.com) from tunnel routes.
Resolving Storage Sense Auto-Dehydration & Disk Allocation Limits
Solution:
Root Cause: Disk Allocation Failure and Storage Sense Pin Conflict
When local free disk space drops below 10%, Windows kernel allocation routines fail during placeholder hydration. Furthermore, if Windows Storage Sense is actively running, it may auto-dehydrate files (turning them back into 0-byte placeholders) concurrently while OneDrive attempts to pull the byte stream down, causing a race condition and write-lock failure.
# Diagnostic Verification:
Check available space on your OneDrive storage partition via PowerShell: Get-Volume -DriveLetter C
Review Storage Sense event logs under Applications and Services Logs > Microsoft > Windows > StorageManagement.# Step-by-Step Fix:
1. Disable Automatic Storage Sense Dehydration:
Open Settings > System > Storage.Click on Storage Sense and set Keep OneDrive content cloud-only if unopened for to Never.2. Clear Temporary System Caches to Free Space:
Run Cleanmgr as Administrator to free up disk space for incoming cloud stream buffers: cleanmgr /sagerun:1
3. Pin Essential Folders to Force Local Cache State:
Open File Explorer, right-click your root OneDrive folder or specific subfolder, and select Always keep on this device.# Prevention & Long-Term Monitoring:
Maintain at least 15% free disk capacity on the system drive hosting the local OneDrive root directory to allow adequate buffer space for uncompressed temp files.
Configuring Antivirus & EDR Filter Driver Exclusions
Solution:
Root Cause: Filter Driver Interception Lock (EDR / Antivirus Interference)
Endpoint Detection and Response (EDR) or Antivirus filter drivers (e.g., WdFilter.sys or third-party filesystem drivers) intercept I/O requests when cldflt.sys attempts to write file payload streams. If the security scanner locks the placeholder file to inspect incoming data streams before the file hydration bit flag is committed, the cloud provider thread fails with access denied errors.
# Diagnostic Verification:
Inspect active filesystem minifilter drivers and their frame altitudes: fltmc
Check if third-party antivirus filters hold an altitude higher than CldFlt (Altitude 180400 - 180499).# Step-by-Step Fix:
1. Add OneDrive Executable Exclusions to Defender / EDR:
Open PowerShell as Administrator and add process exclusions: Add-MpPreference -ExclusionProcess "OneDrive.exe"
Add-MpPreference -ExclusionProcess "FileCoAuth.exe"
2. Exclude OneDrive Sync Folder from Real-Time File System Scanning:
Add directory path exclusion: Add-MpPreference -ExclusionPath "$env:USERPROFILE\OneDrive"
3. Restart Security Center and Sync Daemon:
Restart the Microsoft Defender Antivirus Service: Restart-Service -Name "WinDefend" -Force
# Prevention & Long-Term Monitoring:
Keep Endpoint Security agents updated to builds that correctly respect Windows Cloud Files API reparse tags (IO_REPARSE_TAG_CLOUD).
What occurs when attempting to interact with stagnant cloud placeholder files inside File Explorer?
- NTFS reparse point flags are damaged, displaying invalid 0-byte sizes or missing cloud overlay icons.
- Windows Explorer shell extensions (`FileSyncShell64.dll`) crash upon retrieving cloud status.
Repairing Damaged NTFS Cloud Reparse Point Attributes
Solution:
Root Cause: Reparse Tag Metadata Corruption
Files On-Demand uses specialized NTFS reparse point flags (IO_REPARSE_TAG_CLOUD_1 or IO_REPARSE_TAG_CLOUD_A) andsparse file attributes (FILE_ATTRIBUTE_SPARSE_FILE). If a third-party migration tool, archive utility, or unexpected system crash alters these extended file attributes, the file becomes a broken stub. The OS can no longer identify the file as a managed cloud object, freezing File Explorer whenever a read handle is requested.
# Diagnostic Verification:
Open Command Prompt and check attributes of a stuck file: fsutil reparsepoint query "C:\Users\Username\OneDrive\StuckFile.pdf"
If the output returns Error: The file or directory is not a reparse point, but the file has a 0-byte local footprint, the metadata header is corrupt.# Step-by-Step Fix:
1. Delete Corrupted Reparse Stub File:
Force-remove the corrupted local placeholder using Command Prompt: del /f /q /a:p "C:\Users\Username\OneDrive\PathTo\StuckFile.pdf"
2. Force Sync Engine Rescan:
Pause and resume OneDrive sync using PowerShell to trigger an index rebuild: & "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe" /pause
Start-Sleep -Seconds 5
& "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe" /resume
3. Redownload Fresh File from Cloud Web App:
If the file does not auto-regenerate, log in to onedrive.live.com, locate the file, and download it manually or rename it on the web interface to push a fresh sync state down to the endpoint.# Prevention & Long-Term Monitoring:
Avoid using legacy file backup software or non-NTFS aware zip utilities that strip extended attribute tags during local file operations.
Re-registering OneDrive Shell Extension Handlers
Solution:
Root Cause: Corrupted Shell Extension Dynamic Link Libraries
File Explorer relies on shell extension modules (FileSyncShell64.dll) to render sync status icon overlays (green checkmarks, blue clouds) and populate right-click context menu options. If these DLLs become corrupted during a background client update, calls from explorer.exe to inspect hydration status cause memory access violations, locking up File Explorer windows.
# Diagnostic Verification:
Open Event Viewer (eventvwr.msc) and navigate to Windows Logs > Application.Look for Event ID 1000 referencing explorer.exe as the application and FileSyncShell64.dll as the faulting module.# Step-by-Step Fix:
1. Terminate File Explorer and OneDrive Daemon:
Open PowerShell as Administrator and run: Stop-Process -Name "explorer","OneDrive" -Force
2. Re-register OneDrive Shell Extension Assemblies:
Navigate to the active installation directory and re-register extension COM objects: cd "$env:LOCALAPPDATA\Microsoft\OneDrive\*\"
regsvr32 /s FileSyncShell64.dll
3. Clear Explorer Icon Overlay Cache:
Delete corrupted icon overlay registry entries or thumbcaches: Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\Windows\Explorer\iconcache*" -Force -ErrorAction SilentlyContinue
4. Restart Desktop Shell:
Start File Explorer and OneDrive: Start-Process "explorer.exe"
Start-Process "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe"
# Prevention & Long-Term Monitoring:
Avoid exceeding the Windows 15-icon overlay limit by trimming unused third-party cloud app overlays (e.g., Dropbox, Box) in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers.
What behavior occurs when toggling the Files On-Demand settings inside the OneDrive application interface?
- The Files On-Demand option toggles back to off automatically or throws a configuration error.
- Selecting 'Always keep on this device' shows a red 'X' sync icon next to the file.
Repairing Corrupted User Configuration Scopes and Registry Keys
Solution:
Root Cause: Windows User Hive Registry Write Lock
When you configure Files On-Demand, OneDrive writes settings parameters to HKCU\Software\Microsoft\OneDrive\Accounts\UserFolder. If access control lists (ACLs) on these registry keys lose write permissions for the local user SID, or if the account configuration file (ClientPolicy.ini) becomes read-only, user settings fail to persist across process restarts.
# Diagnostic Verification:
Open PowerShell and test write capabilities to the OneDrive registry branch: Test-Path "HKCU:\Software\Microsoft\OneDrive\Accounts"
Verify permissions using icacls on the OneDrive settings folder: icacls "$env:LOCALAPPDATA\Microsoft\OneDrive\settings"
# Step-by-Step Fix:
1. Reset AppData Folder Access Permissions:
Restore full access permissions to your user profile settings folder using PowerShell: icacls "$env:LOCALAPPDATA\Microsoft\OneDrive\settings" /reset /T /C
2. Clear Stale Client Policy Configuration Files:
Terminate OneDrive: Stop-Process -Name "OneDrive" -Force -ErrorAction SilentlyContinue
Remove cached .ini and .dat configuration files: Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\OneDrive\settings\*\*.ini" -Force
Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\OneDrive\settings\*\*.dat" -Force
3. Re-initialize Configuration:
Relaunch OneDrive and configure your preferences under Settings > Sync and backup > Advanced settings.# Prevention & Long-Term Monitoring:
Ensure profile migration tools or domain user provisioning scripts do not apply restrictive explicit permissions to %LOCALAPPDATA%\Microsoft\OneDrive.
Resolving Storage Exceeded, File Attribute, and Path Length Violations
Solution:
Root Cause: Storage Quota Exhaustion or Extended Path Violations
When requesting forced local hydration via 'Always keep on this device', OneDrive checks cloud storage quota and local file metadata constraints. If your cloud account exceeds its allocated storage limit (e.g., 5 GB free or 1 TB 365 tier), or if a file path exceeds the Win32 MAX_PATH limit (260 characters) without Long Paths enabled, the sync engine aborts hydration and marks the item with a red 'X' status.
# Diagnostic Verification:
Check path length of long files using PowerShell: Get-ChildItem -Path "$env:USERPROFILE\OneDrive" -Recurse | Where-Object { $_.FullName.Length -gt 240 } | Select-Object FullName
Log into the OneDrive web dashboard to confirm account storage allocation and quota limits.# Step-by-Step Fix:
1. Enable Win32 Long Path Support in Windows Registry:
Open PowerShell as Administrator and run: New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
2. Shorten Oversized File Names or Directory Paths:
Move deeply nested subfolders closer to the root OneDrive folder, or shorten file names exceeding 100 characters.3. Resolve Cloud Account Quota Violations:
Free up cloud storage space or upgrade your Microsoft 365 tier if storage capacity has been exceeded.4. Clear Pending Sync Errors:
Click the OneDrive system tray icon, select View sync errors, and click Retry all.# Prevention & Long-Term Monitoring:
Keep file paths under 200 characters to maintain full cross-platform compatibility across Windows, macOS, and mobile endpoints.