NativeProcess.start() issue on MacSolved

I'm having a problem with TurboActivate when installing my Adobe AIR Application on a Mac. The problem occurs when the user already has the Adobe AIR runtime installed on their machine. I've traced the problem in the code to this point:

File: TurboActivatae.asFunction: launchSysta...process = new NativeProcess();trace("checkpoint 1"); // my injectionprocess.start(nativeProcessStartupInfo);trace("checkpoint 2"); // my injection...

I get checkpoint 1, but checkpoint 2 never happens.

Again, this only occurs if Adobe AIR is already present on the user's machine.Any suggestions?

An exception is likely thrown on the "process.start(nativeProcessStartupInfo);" line. Did you include "systa", "libTurboActivate.dylib", and the "TurboActivate.dat" files with your app?

Can you give me a detailed exception?

The Exception is Error: #3219.I'm trying to get more information now.

To answer your question, yes, I am including the Mac folder with the project, and it contains all three of those files.I confirmed that the files are included in the Mac Native Installer (the contents of the app contain Contents->Resources->Mac, where I see libTurboActivate.dylib, systa, and TurboActivate.dat).

From the exception, I am getting both the Error.toString() and the Error.message. Both of these say #3219, and aren't giving me any more information. Do you know any other way to extract a more detailed message from a Flash Exception?

All the information I could find out NativeProcess.start() error 3219 is this...

http://help.adobe.com/en_US/FlashPlatform/beta/reference/actionscript/3/flash/desktop/NativeProcess.html#start%28%29"Error #3219: The NativeProcess could not be started."

This is generally associated with running a .bat batch file. But that doesn't seem to be the case here.Unfortunately, the error itself is generic.

Any suggestions?

This could be caused by a few things:

  1. Make sure the "Mac" folder exists in your bin-debug folder.
  2. Make sure the Mac folder contains the "TurboActivate.dat" file, "systa" file (not systa.exe), the libTurboActivate.dylib file.
  3. Add a breakpoint in the "launchSysta()" before the "process.start(....)" line. See if the "file" variable contains the correct path to the "systa" file on on your disk. If not, move your "Mac" folder to the correct location.
  4. Make sure "systa" has executable rights. That is, open a command prompt window, "cd" to the folder containing systa, then type "ls -l". The output next to "systa" should have 3 "x"s.

    -rwxr-xr-x  1 wyatt  staff    26396 Mar 21 02:18 systa

1, 2, and 3 are working fine. The app works fine when Adobe AIR runtime is not already installed. This problem only occurs if the runtime is already present when my application is installed.

Regarding 4...I'm not well-versed with Mac. I'm not sure how to navigate to the location containing the systa file via command line. I used the explorer to drag a copy of systa to the Desktop, and from there I typed ls -la. The systa files has different permissions than yours:-rw-r--r--@

No x's at all. I have no idea how to provide it the correct permissions, but I assume that is what the problem is.Incidentally, I just realized that when adobe runtime is already installed, the app doesn't require a password during an installation. If adobe runtime is NOT installed, then the app installation process requires my mac admin password. I think the password is providing the necessary permissions.

I actually used the command ls -l, not ls -la. Sorry.

This problem only occurs if the runtime is already present when my application is installed.

It sounds like the problem might be that the installed runtime is too old. Make sure your runtime is Adobe AIR 2.0 or above. Try unintalling the current runtime, uninstall your app, then install the latest runtime, and reinstall your app. Does it work now?

I'm not sure how to navigate to the location containing the systa file via command line.

Here's the easy way to do it:

  1. Show the "Finder path bar"
  2. Open the terminal window.
  3. Type "cd " (notice the space after "cd") in the terminal
  4. In the newly visible "finder path bar" drag the "last" folder listed on the path bar into the terminal window. Your terminal window will look something like this:

    cd /path/to/your/app
  5. Press enter
  6. Type "ls -l" and press enter.
  7. Does the "systa" file have executable permission (i.e. the 3 "x" values)?
  8. If not, type "chmod a+x systa" and press enter
  9. Type "ls -l" and press enter again. Now "systa" should have executable permission.

Try running your AIR app again. It should run now.

Wyatt wrote:"It sounds like the problem might be that the installed runtime is too old. Make sure your runtime is Adobe AIR 2.0 or above. Try unintalling the current runtime, uninstall your app, then install the latest runtime, and reinstall your app. Does it work now?"

Nope, I already had the latest Adobe AIR Runtime installer. I'd even tried both the explicit install from http://get.adobe.com/air, and allowed the native installer DMG to handle it. Neither worked.

While I'm not exactly sure what the "Finder path bar" is, you're instructions are clear enough that I was able to use them to view the permissions set inside the installed application. Sure enough, the permissions are not sufficient:-rw-r--r--

I typed: chmod a+w systaresulting permissions: -rw-rw-rw-

Then I typed (on a tinkering hunch): chmod a+x systaresulting permissions: -rwxrwxrwx

Now I run the app and it works. So we've confirmed: it's a permissions issue, and it's only an issue if Adobe AIR Runtime is already installed on the target machine. So I just have one last issue: how do I set these permissions correctly during install if the runtime is already present? End-users shouldn't have to know about this.

Answer
I typed: chmod a+w systaresulting permissions: -rw-rw-rw-

Woops, sorry, I meant "chmod a+x systa".

So I just have one last issue: how do I set these permissions correctly during install if the runtime is already present? End-users shouldn't have to know about this.

Are you using the "native installer" that Flash Builder and/or Adobe Flash CS5 makes? Or are you using something else to install your app?

Also, does the "systa" file that's used when you build the installer have "executable" permissions set?

Wyatt wrote:"Are you using the "native installer" that Flash Builder and/or Adobe Flash CS5 makes? Or are you using something else to install your app?"

Flash CS5.5 on Windows XP is used to generated Adobe AIR 2.6 file.Adobe AIR SDK adt command is used on a Mac Snow Leopard 10.6.3 to generate the DMG (which contains the APP, which contains the systa file).

Also, does the "systa" file that's used when you build the installer have "executable" permissions set?"

Looks like it does not. And the very suggestion gave me a solution using your permission changing commands. I changed the permissions using the following method: - rip the APP file out of the DMG. - modify the permission settings of the systa file inside (navigate to it in the terminal, use chmod a+x systa) - create a new DMG using Mac's native Disk Utility and the modified APP file.If I do this, the modified permission setting seems to stick, and the TurboActivate Licensing works as desired, even if the Application is installed on a machine which already has Adobe AIR Runtime installed.

I really appreciate the help, Wyatt! Could not have done it without you.

Looks like it does not. And the very suggestion gave me a solution using your permission changing commands. I changed the permissions using the following method:- rip the APP file out of the DMG.- modify the permission settings of the systa file inside (navigate to it in the terminal, use chmod a+x systa)- create a new DMG using Mac's native Disk Utility and the modified APP file.

This seems like a lot of work. What if you just change the executable permission of the "systa" file on disk. That is, the file that's used for input to Adobe's adt command? Doesn't that fix it?

I really appreciate the help, Wyatt! Could not have done it without you.

I'm glad to help. We'll update the Adobe AIR article to mention executable permissions on Mac / Linux.