macOS Error -50 (paramErr) — Parameter Error

Error -50 (paramErr, or Parameter Error) occurs when a function or command receives an invalid parameter. In macOS, this error appears across the system — in Finder operations, Terminal commands, AppleScript, and third-party applications. It generally means something is wrong with the input provided to the system: a malformed path, an invalid option, an unsupported character, or a corrupted preference file.

Common Causes

  • Invalid characters in a filename or path
  • Malformed command-line arguments
  • Corrupted application preferences
  • Invalid file type or creator code
  • Corrupted NVRAM settings
  • Application receiving unexpected data format
  • File path exceeding the maximum length

How to Fix Error -50

1. Check Command Syntax

Invalid command syntax is the most common cause of paramErr in Terminal:

# Check command options and syntax
command_name --help
man command_name

# Example: cp requires both source and destination
# Wrong:
cp /path/to/file

# Right:
cp /path/to/file /path/to/destination/

Verify each argument is valid for the command you are running.

2. Verify File Paths

Ensure the path is correctly formed and accessible:

# Check if the path exists
ls -la /path/to/file

# Test with an absolute path instead of relative
ls -la ~/Documents/file.txt

# Check for hidden characters in the filename
ls -la | cat -v

Hidden characters in filenames (from copy-pasting or bad encoding) frequently cause paramErr.

3. Check for Invalid Characters in Filenames

macOS filenames cannot contain these characters:

# These characters cause paramErr:
# : (colon)
# / (forward slash)
# \ (backslash)
# Null character

# List files, showing non-printable characters
ls -la | cat -v

# Rename a file with problematic characters
# Use the inode number for safety
ls -i /path/to/problem/file
find /path/to -inum <inode_number> -exec mv {} /path/to/good/filename.txt \;

4. Reset NVRAM

Corrupted NVRAM settings can cause paramErr system-wide:

Intel Macs:

  1. Shut down the Mac
  2. Press the power button, then immediately hold Option+Command+P+R
  3. Hold for approximately 20 seconds
  4. Release when you see the Apple logo or hear the second startup chime

Apple Silicon Macs:

NVRAM is managed automatically. Simply restart your Mac through the Apple menu.

5. Reset Application Preferences

If error -50 occurs in a specific application:

# Find the application's preferences file
ls ~/Library/Preferences/ | grep -i appname

# Move the preference file to the Desktop (backup)
mv ~/Library/Preferences/com.example.app.plist ~/Desktop/

# Relaunch the application to regenerate defaults
open -a "App Name"

For a more thorough reset:

# Remove all application support files
mv ~/Library/Application\ Support/AppName ~/Desktop/

# Remove cached files
rm -rf ~/Library/Caches/AppName/

6. Validate File Type and Data Format

Ensure the data you are passing matches what the function expects:

# Check the file type
file /path/to/file

# Check the contents are valid
hexdump -C /path/to/file | head -20

# For images, verify they are not corrupted
sips -g all /path/to/image.png

7. Use Terminal to Test Operations

Test the operation that triggers error -50 directly in Terminal to isolate the issue:

# Test a copy operation
cp -v /path/to/source /path/to/destination

# Test a move operation
mv -v /path/to/source /path/to/destination

# Test a file creation
touch /path/to/test-file.txt

# Test with a simple filename
echo "test" > /tmp/simple-test.txt

If Terminal operations succeed but Finder fails, the issue is Finder-specific.

8. Check for File Path Length Limits

macOS supports long paths, but some applications impose limits:

# Check path length
echo -n "/path/to/file" | wc -c

# Find files with very long paths
find ~ -type f -exec bash -c 'if [ ${#0} -gt 256 ]; then echo "$0"; fi' {} \;

# Shorten deep directory structures
mv /very/long/path/that/exceeds/limits/file.txt /shorter/path/file.txt

9. Run Apple Diagnostics

If paramErr occurs system-wide, there may be a hardware issue:

Intel Macs:

  1. Shut down the Mac
  2. Press the power button, then immediately hold the D key
  3. Release when you see the progress bar or language selection

Apple Silicon Macs:

  1. Shut down the Mac
  2. Press and hold the power button
  3. Release when you see “Loading startup options”
  4. Press Command+D

The diagnostics tool checks RAM, storage, and other hardware.

10. Repair Disk Permissions

Although modern macOS manages permissions automatically, you can verify them:

# Reset the permission database
sudo periodic daily weekly monthly

# Verify disk permissions for the boot volume
diskutil resetUserPermissions / $(id -u)

11. Create a New User Profile

If error -50 persists in your user account, test with a fresh profile:

# Create a new admin user from Terminal (if needed)
sudo dscl . -create /Users/testuser
sudo dscl . -create /Users/testuser UserShell /bin/zsh
sudo dscl . -create /Users/testuser RealName "Test User"
sudo dscl . -create /Users/testuser UniqueID 1010
sudo dscl . -create /Users/testuser PrimaryGroupID 80
sudo dscl . -create /Users/testuser NFSHomeDirectory /Users/testuser
sudo dscl . -passwd /Users/testuser password
sudo dscl . -append /Groups/admin GroupMembership testuser

Log in as the new user and test the operation. If it works, the issue is specific to your user profile.

AppleScript Context

In AppleScript, paramErr often means the command received an argument it does not understand:

-- Wrong: missing required parameter
tell application "Finder"
    make new folder
end tell

-- Right: provide all required parameters
tell application "Finder"
    make new folder at (path to desktop) with properties {name:"New Folder"}
end try

Handle paramErr explicitly:

try
    -- operation that may fail
on error number -50
    display dialog "Invalid parameter. Please check your input."
end try