How to avoid this error: The application cannot be opened for an unexpected reason

DBrowning
Valued Contributor II

We have a script that is running with a trigger of login and some machines it runs without issues on, some we get the following when it fails:  

The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10673 "(null)" UserInfo={_LSLine=3878, _LSFunction=_LSOpenStuffCallLocal}

 

The script is pretty simple:

#!/bin/sh

CU=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
su "$CU" -c 'open https://company.sharepoint.com'

 

Any help would be appreciated.  Thanks

2 REPLIES 2

DaneAbernathy
New Contributor III

Were you ever able to figure this out?

DBrowning
Valued Contributor II

Nope.