-
Notifications
You must be signed in to change notification settings - Fork 102
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
Worked once then fails with low-level macOS error #44
Comments
Hmm. The plot thickens... I just spent a few minutes committing all my code changes with the intention of restarting my laptop (as I'd seen someone say in the above thread URL that this helped them) and I thought I'd build my code one more time, where I then found it suddenly worked again and the URL I specified was opened in an existing open instance of my default browser. Not sure what would have happened in that time frame for it to suddenly work again? One thing I did do, but it didn't help, was I closed my browser and tried running my app again to see if opening the default browser afresh (rather than having the browser already open and the URL opening in a new tab) would work. It didn't work. Then I wondered if it was because I had Ctrl-c my running go program, because when it started working again (i.e. the URL was opened in a new tab of an existing browser instance) I did a Ctrl-c and then re-ran the go app and again found the error was happening. So I thought maybe it was because of the fact I've not handled signalling properly in the app and maybe the OS is not releasing some sort of file descriptor for my still open browser. But then, after waiting a period of like (I dunno, at a guess 5 minutes) and trying to run my go app again (I've not done anything else btw at this point I got distracted googling for answers), it suddently started working again!? So it would appear that there's some sort of OS issue with releasing a resource (whatever that resource is) that's not happening immediately, but when it does the Additionally, again with no code changes to my program, I was just hammering "up arrow, enter" to run my go program just while I was thinking in my head about the problem and then bang! all of sudden it worked and opened the browser!? But then for a different logic reason my program ended with a |
And just to clarify, if I force my go app to end cleanly the problem still persists and on the next run of the app the browser will fail to open. |
I have also tried https://github.com/toqueteos/webbrowser and found that it just reports:
I've also tried https://github.com/skratchdot/open-golang with even less error context:
|
OK, this is replicable outside of the package, just by running |
Going to close this now. I discovered a new terminal instance worked fine every time, and so I then killed my tmux session/server and restarted it and found that my go program works fine every time now too. Now sure what caused it to go so loopy, but that was frustrating 😬 |
👋🏻
I installed this package, and ran it once and it worked fine. I then came back and tried it again (after making some code changes) and found that no matter what URL I provided to
browser.OpenURL
the function would error with...I've failed to find much useful information on this,
but there is a long thread from another project (which may or may not be useful):
lwouis/alt-tab-macos#704
The text was updated successfully, but these errors were encountered: