files-community/Files · error · Exception
The following properties failed to save: {failedProperties}
Error message
The following properties failed to save: {failedProperties} What it means
A plain System.Exception thrown by FileProperties.SyncPropertyChangesAsync (line 237) after one or more calls to BaseStorageFile.Properties.SavePropertiesAsync threw during a single-file property save. Each failure is appended to a string as "propertyname" (no filename, since only one file is involved) and the aggregated list is rethrown once. The original exception is swallowed by a bare catch{} (lines 227-230), so the underlying cause — UnauthorizedAccessException, FileNotFoundException, ArgumentException for an invalid/typed value, or a missing/unregistered property handler — is not surfaced; only the property-name list survives.
Source
Thrown at src/Files.App/ViewModels/Properties/Items/FileProperties.cs:237
try
{
if (file.Properties is not null)
{
await file.Properties.SavePropertiesAsync(newDict);
}
}
catch
{
failedProperties += $"{prop.Name}\n";
}
}
}
}
if (!string.IsNullOrWhiteSpace(failedProperties))
{
throw new Exception($"The following properties failed to save: {failedProperties}");
}
}
public async Task ClearPropertiesAsync()
{
var failedProperties = new List<string>();
BaseStorageFile file = await FilesystemTasks.Wrap(() => StorageFileExtensions.DangerousGetFileFromPathAsync(Item.ItemPath));
if (file is null)
return;
foreach (var group in ViewModel.PropertySections)
{
foreach (FileProperty prop in group)
{
if (!prop.IsReadOnly)
{
var newDict = new Dictionary<string, object>View on GitHub (pinned to 68c68a58d4)
Solutions
- Make sure the target file is writable and not locked: clear the read-only attribute, close any app holding the file, and confirm the user has write permission on the path.
- Confirm each property is applicable to the file's type and that the value matches the expected type/range; only set properties that appeared (non-read-only) in RetrieveAndInitializePropertiesAsync for this file.
- For network/cloud/FAT locations, hydrate placeholders (OneDrive) or move the file to NTFS local storage before editing properties.
- Use the reported property-name list to retry only the failed properties after fixing the underlying blocker.
- Improve diagnostics by replacing the bare catch{} (line 227) with catch (Exception ex) that logs ex (HRESULT + type) next to the property name, so the swallowed root cause is recoverable.
Example fix
// before
try
{
if (file.Properties is not null)
await file.Properties.SavePropertiesAsync(newDict);
}
catch
{
failedProperties += $"{prop.Name}\n";
}
// after
try
{
if (file.Properties is not null)
await file.Properties.SavePropertiesAsync(newDict);
}
catch (Exception ex)
{
App.Logger?.LogWarning(ex, "SavePropertiesAsync failed for {Prop}", prop.Name);
failedProperties += $"{prop.Name}\n";
} Defensive patterns
Strategy: try-catch
Validate before calling
// Single-file gate before SavePropertiesAsync
if (file is null || file.Properties is null) return;
if (file.Attributes.HasFlag(FileAttributes.ReadOnly))
{
// Prompt to clear read-only, or abort the save for this property.
return;
}
// Only set properties that are non-read-only for this file type
// (already filtered by RetrieveAndInitializePropertiesAsync). Try / catch
// Wrap SyncPropertyChangesAsync at the call site; the message lists property names
try
{
await fileProps.SyncPropertyChangesAsync();
}
catch (Exception ex) when (ex.Message.StartsWith("The following properties failed to save:"))
{
// ex.Message contains one property name per line — show to user
// and retry once the file is unlocked / permissions are fixed.
await ShowPropertySaveFailuresAsync(ex.Message);
} Prevention
- Clear the read-only attribute and confirm write permission on the file before editing properties.
- Close any app holding a write lock on the file before applying.
- Only set properties that appear non-read-only for the file's extension; do not coerce arbitrary values into typed properties.
- For non-NTFS or cloud-placeholder locations, hydrate or move the file locally before editing.
- Replace the bare catch{} at FileProperties.cs:227 with catch (Exception ex) that logs ex so the root cause is recoverable.
When it happens
Trigger: User edits one or more properties for a single file in the Details/Properties pane and applies; for at least one property the SavePropertiesAsync call at line 224 throws. Concrete causes: file is read-only or the user lacks write permission; file is open/locked by another process; the property is not backed by the file's shell property handler (e.g. System.Photo.* on a non-image); the supplied value violates the property's type/range; the file is on FAT32/exFAT/network with no NTFS property store; a OneDrive/cloud placeholder is not hydrated.
Common situations: Editing properties of a read-only or system file without clearing the attribute; file still open in another app (image editor, office app) holding a write lock; setting a property whose type the UI let through because the value wasn't coerced; file on a non-NTFS volume where the Windows property store is absent; property handler not registered for an uncommon extension.
Related errors
- The following properties failed to save: {failedProperties}
- The method or operation is not implemented.
- Specified method is not supported.
- Can't open zip file as RW
- Moving to recycle bin is not supported.
AI-assisted analysis of files-community/Files@68c68a58d4 (2026-08-13).
Data as JSON: /api/errors/b4fa08ebeb235b15.
Report an issue: GitHub.