LSOpenURLsWithRole() failed with error -10810 for the file /Library/...

Lhsachs
Contributor II

I had a requirement to run an application on all systems that would write report back to a server.

I made the needed changes to the application's plist for our situation. The application ran and sent the report when double clicked. I then used packagemaker to package the application, and created a shell script to run post installation: open -a /path/to/application.app. After packaging, when the .pkg was run by hand - the application was placed where I intended, and the shell script ran, and we got a report...

POLICY TIME.
I then placed the .pkg in the JSS and tested running it as a policy. The package installed successfully. The application landed in the right place, as did the post install script. At the point the script was to kick off the application, it failed with:
LSOpenURLsWithRole() failed with error -10810 for the file /path/to/application

With the files in place - I still could drag the shell script to terminal and it would kick of the application. No, I don't think it was permissions. I messed with them - sudoed everything... even took the shell script out of the package and had it run after installing the application as part of a policy - still no go....

Has anyone else seen this problem? If so, have you resolved it?

- my solution for my managers - since this application was for a software audit - was to use Casper to audit the software. (I did set it up and send them a report...)

LSOpenURLsWithRole() failed with error -10810 for the file

1 ACCEPTED SOLUTION

Lhsachs
Contributor II

The solution I found was nesting all the way to the binary of the app: ./path/to/application.app/Contents/MacOS/binary

Interesting that the script to app would run when tested by hand - but not when installed by casper...

View solution in original post

5 REPLIES 5

Lhsachs
Contributor II

The solution I found was nesting all the way to the binary of the app: ./path/to/application.app/Contents/MacOS/binary

Interesting that the script to app would run when tested by hand - but not when installed by casper...

WesWhet
Release Candidate Programs Tester

Lhsachs- I am running into a similar issue when trying to launch /path/to/application.app or /path/to/application.app/Contents/MacOS/application.app but it doesn't happen to every machine that I run this on. What did you do to solve this?

Cheers!

jthurwood
New Contributor III

I'm also having a problem with this when trying to run an app from terminal. Did you find a fix for this?

sean
Valued Contributor

When you are running it locally, you are running it as you. When you run it through Casper you are running it as root.
Depending on the version of the OS will depend what you can get away with. As you've noticed, you can probably use root to directly call the binary, but not launch the *.app

If you want to call *.app then try running the script that is launching the app as the user instead.

surquhart
New Contributor

I believe I am seeing this currently, trying to run the 'open' command. I believe it may be failing on machines that are online but have no current user logged in.