I'm getting an (error code -10813) when trying to set file extensions to open with a certain app in Mountain Lion 10.8.5. Where is the plist file that has those preferences so that I can delete it and hopefully end this problem?
This happens because the LaunchServices database gets corrupted.
To fix on Mountain Lion:
- Open Terminal.app in the /Applications/Utilities/ folder.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
This hint on Mac OS X Hints covers the command for other Mac OS versions over the years.
In order to resolve this problem you need to rebuild your launch services.
You can go through the steps as mentioned by David. But you can easily do the same work of rebuilding the Launch Services database using the free OnyX tool by going to the Maintenance > Rebuild > Launch Services menu option.
Error -10813 appears to mean
Data of the desired type is not available (for example, there is no kind string)
i.e., some entry in the app's plist file is missing as far as I understand. I do not know which fields are required, but I had the same error in the same situation. In my case, it could be resolved by adding a value to the field "CFBundleIdentifier".
This is best done using XCode as it displays the XML structure of the file nicely (and somehow changes the keyword names along the way, so the entry to change was "Bundle identifier" here). But any other text editor can be used as well if XCode is not available.