Skip to content

Troubleshooting

Cause: Some keys have values that change constantly (timestamps, counters).

Solution: These are ephemeral keys—remove them from your config:

Terminal window
# Check which keys are drifting
macprefs plan --config my-config.json --verbose

“Apply failed: Could not write to domain”

Section titled ““Apply failed: Could not write to domain””

Cause: The domain is protected or requires elevation.

Solution:

Terminal window
# Run preflight to diagnose
macprefs preflight
# Check for MDM profiles that might restrict preferences
sudo profiles list

Cause: Some settings require restarting the affected process.

Solution:

Terminal window
# Restart common services
killall Dock # For dock settings
killall Finder # For Finder settings
killall SystemUIServer # For menu bar settings
# Or log out and back in for comprehensive refresh

Cause: JSON syntax error or schema issue.

Solution:

Terminal window
# Validate your config
macprefs validate --config my-config.json
# Common issues:
# - Trailing commas in JSON
# - Missing "version": "1.0"
# - Missing "domains" key