Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Catalyst: open -W after I/O inside .app Contents is flaky #611

Closed
lambdageek opened this issue May 27, 2021 · 1 comment · Fixed by #613
Closed

Catalyst: open -W after I/O inside .app Contents is flaky #611

lambdageek opened this issue May 27, 2021 · 1 comment · Fixed by #613
Labels
apple iOS/tvOS/WatchOS/Mac Catalyst area emulator Related to an emulator/Simulator

Comments

@lambdageek
Copy link
Member

It seems like doing I/O inside the Contents/ of a catalyst .app will sometimes make open -W that.app fail
with:

The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3691, _LSFunction=_LSOpenStuffCallLocal}

Investigated here: dotnet/runtime#53197 (comment)

in my case I was doing cp -R, but dotnet xharness (or dotnet helix, I'm not sure) is doing chmod +x. In either case, I think sticking in a sync before the open -W is a good idea.

@lambdageek
Copy link
Member Author

Hmm... doing some testing by modifying xharness.

Seems like sync is not enough.

This stackoverflow answer seems to suggest that we should run
lsregister -f

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /path/to/app.app

Going to give that a try

lambdageek added a commit to lambdageek/xharness that referenced this issue May 28, 2021
Without this, launching the app fails (observed on arm64 locally, but
also on x64 on dotnet/runtime CI) with

```
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3691, _LSFunction=_LSOpenStuffCallLocal}
```

Fixes dotnet#611
premun pushed a commit that referenced this issue May 28, 2021
Without this, launching the app fails (observed on arm64 locally, but
also on x64 on dotnet/runtime CI) with

```
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3691, _LSFunction=_LSOpenStuffCallLocal}
```

Fixes #611
@premun premun added the apple iOS/tvOS/WatchOS/Mac Catalyst area label May 28, 2021
@premun premun added the emulator Related to an emulator/Simulator label Jun 30, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
apple iOS/tvOS/WatchOS/Mac Catalyst area emulator Related to an emulator/Simulator
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants