I try to call an application from the console and pass it an argument. This is the script I am using:


open -a "/Applications/MyApp.app/" $1

Somehow the OS is unhappy with this and complains:

FSPathMakeRef(/Applications/MyApp.app) failed with error -43.

What can I do?

  • 1
    That looks like /Applications/MyApp.app doesn't actually exist. You sure it's there?
    – Mark Reed
    Sep 13, 2014 at 2:39
  • Thanks! That was silly. Sorry for asking, but at least I now know what error 43 means ... Sep 13, 2014 at 15:32
  • Mac OS error -43 (fnfErr): File not found
    – njboot
    Sep 13, 2014 at 20:39

2 Answers 2


That looks like /Applications/MyApp.app doesn't actually exist.

You can test for that in your script, perhaps like this:

if [ ! -d "$APP" ]; then
  echo >&2 "$0: $APP not found."
  exit 1
exec open -a "$APP" "$@"

You can make sure the application exists before calling open on it! Here's a quick bit of Bash to do this:

if [ -d "/Applications/MyApp.app" ]; then
    open -a "/Applications/MyApp.app"
    echo "Application /Applications/MyApp.app does not exist!"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .