ArgumentError: Error #3214: NativeProcessStartupInfo.executable does not specify a valid executable file.

ArgumentError: Error #3214: NativeProcessStartupInfo.executable does not specify a valid executable file.

Cause
The path to the executable is incorrect.

Example:

var file:File = File.applicationDirectory.resolvePath("usr/bin/osascript");

The path above is incorrect because of the missing initial “/”. The correct path should be:

var file:File = File.applicationDirectory.resolvePath("/usr/bin/osascript");

Solution
Find the correct path to the file or files.

You can use the whereis command in the Terminal to see the path to where a command is located (if it’s the file your looking for).

For example, whereis osascript returns “usr/bin/oascript” source.

Also, check the file.nativePath property to see the directory where the incorrect file is resolving to.

About Judah

Please note in the comments if this has helped you or not.
This entry was posted in AIR, Runtime. Bookmark the permalink.

2 Responses to ArgumentError: Error #3214: NativeProcessStartupInfo.executable does not specify a valid executable file.

  1. Brad says:

    Do you happen to know of a good way to troubleshoot where the problem might be? Other than the html file the error ‘happened’ in I don’t see much more information out of the error like line number or something

    • Judah says:

      If you are on a Mac you can use Command + Space bar to bring up spotlight and type the name of the file you’re looking for. Once Finder is open you can see the path the file. You can also use the whereis command to search for the file. Spotlight may not find the file if it’s hidden or in system directories. If using Windows you would use File Explorer to find the file. If the file is in the project directory you may need to move it to another directory since files in the application directories have limited permissions (also limited read / write privileges). To being enter the path the file and get a list of all the files in the directory. If that works then enter the file name. Check the permissions (executable files need the execute permission). It’s what makes operating system run the file versus read the file. For example, if a my.bat file did not have executable permissions it may open in a text editor or do nothing at all when double clicked or ran from the command line. If it does have executable permissions it would run the commands it contains.

Leave a Reply

Your email address will not be published. Required fields are marked *

Highlight your code before posting code:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">