_LSOpenURLsWithCompletionHandler() failed for the application xxx with error -10671 [Solved]

Problem description

After updating the macos system and turning off SIP in mbp version 2022, the applications on the ipad installed on the system do not start properly and the following error is reported when running the open command in the terminal:

longyudeMacBookPro:~ longyu$ open -a "xxx"
_LSOpenURLsWithCompletionHandler() failed for the application /Applications/xxx.app with error -10671.
longyudeMacBookPro:~ longyu$

Note: The program name is for example only.

Equipment model and version information

mbp 2022

mac version: macOs Monterey version 12.6

 

Resolution process

  1. Checked app permissions – no exception found
  2. Tried to change application permissions – still can’t start after changing
  3. Check if there is already a process running – open activity monitor, no relevant process found
  4. Think about the items that the system modifies when it works and when it does not work
  5. Suspect a relationship with the SIP configuration.

 

Solution:

When the computer is shut down, long press the shutdown key to enter the recovery mode, open the terminal, execute csrutil enable to enable SIP, and restart the system. After re-entering the system, the program starts normally.

 

Other problems:

I searched the web for the return value of _LSOpenURLsWithCompletionHandler and did not find the meaning of the -10671 return value. The original intention of closing SIP was to use dtrace, a long-known program, normally, but since it has such a side effect after closing it can only be opened temporarily for fun, not all the time.

Read More: