Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

unix_wait_status(256) on Mac OS Sonoma #96

Open
ilyagr opened this issue Apr 12, 2024 · 2 comments
Open

unix_wait_status(256) on Mac OS Sonoma #96

ilyagr opened this issue Apr 12, 2024 · 2 comments

Comments

@ilyagr
Copy link

ilyagr commented Apr 12, 2024

Recently, open::that started failing often with the following error for me on Mac OS:

Launcher "/usr/bin/open" "http://127.0.0.1:17376" failed with ExitStatus(unix_wait_status(256))

Usually, it will work correctly on first invocation of the program that runs open::that, but fails afterwards.

The program starts a local server at http://127.0.0.1:17376 and then runs open::that("http://127.0.0.1:17376") inside tokio::task::spawn_blocking:

https://github.com/ilyagr/diffedit3/blob/54eecca2731a56478175c640564206b3a94d0344/src/local_server.rs#L171-L184

I don't know how to reliably reproduce this, unfortunately, but I wanted to post this just in case somebody has any advice.

I'm using Mac OS Sonoma 14.4.1:

$ uname -a
Darwin macaw.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024;
root:xnu-10063.101.17~1/RELEASE_ARM64_T6020 arm64 arm Darwin

My default browser is Firefox 124.0.2


Update: This can be reproduced more easily:

$ open http://example.com
The application cannot be opened for an unexpected reason,
error=Error Domain=NSOSStatusErrorDomain Code=-600
"procNotFound: no eligible process with specified descriptor"
UserInfo={_LSLine=376, _LSFunction=_LSAnnotateAndSendAppleEventWithOptions}

Strictly speaking, this seems like an issue in Mac OS interacting with Firefox issue rather than a library issue, but I'd still track it here since the library open uses the Mac OS open utility exclusively.

See also cli/cli#2871

@Byron
Copy link
Owner

Byron commented Apr 12, 2024

Thanks for letting me know! I noticed that rarely MacOS even in prior versions can get into a state where open (CLI application) doesn't manage to open anything anymore until the machine is rebooted.

@ilyagr
Copy link
Author

ilyagr commented Apr 12, 2024

I also posted a bug on Bugzilla about this. I have no idea whether anybody will look at it.

https://bugzilla.mozilla.org/show_bug.cgi?id=1891167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants