The application "XYZ" can't be opened!
I faced the same problem here, and after investigating, I realized the problem was due to the number of processes my mac was running.

In my case, a cronjob was triggering multiple httpd threads (more than a hundred).

You can: 


open activity monitor and kill those processes; 
check your crontab -e and look for suspicious jobs