The application "..." can't be opened' on Mac

The application "..." can't be opened'
When I try to run app on some Macs, 5\7 mac opens binary normally, but 2\7 got this message. On all Macs, the firewall is disabled. My app is notarized for developer_id and signed, also it uploaded to testflight and verified.
Workaround is:
xattr -cr </path/to/app>
But I need a real cause and solution.
logs from terminal

% open /Users/someuser/dir/App.app
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10810 "kLSUnknownErr: Unexpected internal error" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2735, NSUnderlyingError=0x6000023693b0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600002369290 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}}

Have the same issue when trying to start electron app

`
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10810 "kLSUnknownErr: Unexpected internal error" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2756, NSUnderlyingError=0x60000321c0f0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x60000321c180 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}}
`

Please provide solution

I also have the same issue. I have verified that both my app and dmg are signed and notarized. However, the issue with opening the app persists. I also tried running xattr -cr </path/to/app> before signing the app. I have also noticed that the behavior is different on x64 vs arm64 Macs (but I also do have two different versions). Any insights on how to solve this problem will be helpful.

I also have the same issue The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10810 "kLSUnknownErr: Unexpected internal error"

My App works on 2 Machines (2 machines that were used to develop it) The rest of the machines have the error. I am think it is maybe some missing dependencies ( you see the a lot in windows development). Wonder if my Xcode build process needs to be tweaked so that all dependencies are included. I am using Cocoapods and AppAuth (for authN) maybe that is where the issue is.

turned out to be a quarantine issue. need to run xattr -cr </path/to/app> like someone else above mentioned

The application "..." can't be opened' on Mac
 
 
Q