Files on Desktop are not accessible
Device, OS version and other background info:
- MacBook Pro Retina late-2013, Catalina 10.15.1
- FileVault is not enabled.
- iCloud Desktop/Document syncing is not enabled.
- Time Machine target is an external drive; auto-backup is temporarily disabled.
- Daemons, extensions and login items:
- Alfred 4
- BetterTouchTool
- DropBox
- Calendar 366
- Logitech Option
Problem description:
All files under ~/Desktop path are not accessible by most applications, including Finder:
- Double click on the file or choose from "File > Open..." within application both fail to open the file. The error message of open dialog claimed "The document XXXX could not be opened."
- Files can be renamed in Finder, can quick view the content, and can be copied to other directory, but can not be moved out of Desktop or delete.
- Files in other directory can not be copied or moved to Desktop and applications can not save files to Desktop either; the error message of save dialog claimed "The file 'Desktop' couldn't be opened".
- Finder can still create new folder on Desktop and it can be opened, but it can't be moved or deleted as well, files from other directory can be moved into these folders, but they'll become inaccessible too.
Reboot can temporarily solve this issue, but logout and re-login and this situation will happen again. Create a new account on the same machine and it is not affected by the same problem so far.
Possible cause of problem:
This problem seems to only affect applications that use Launch Service, because other applications that use conventional POSIX file I/O are not affected. All CLI utilities in Terminal can read, create, write and delete all these files, including vi, cp, mv, rm command; pipelined commands like `echo hello > ~/Desktop/hello.txt` are still functional and new files will be created on desktop, but these newly created files can not be opened by TextEdit.txt as well.
Other applications like Visual Studio Code can also open and write to the files without problem. It also worth mentioning that web browsers like Safari, Chrome and Firefox can open and read the content, but I'd guess that's because web browsers are specially coded to tolerate read error and partial contents.
FileVault is not enabled; and this is an old model so it's not T2 and file system encryption related issue. Permission is irrelevant because Visual Studio Code can access these affected files normally. Adding applications like TextEdit to full disk access does not help either.
I guess that the problem is related to Launch Service, like a broken database file or something, but I've no idea how to identify the source of trouble. Tried to search related logs in Console.app but don't know where to start.
Temporary measures: Reboot everyday; avoid saving files on Desktop.
Please help.
MacBook Pro 13", macOS 10.15