-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
MacOS Big Sur "open" command no error response #46542
Comments
This appears to be a question about development on MacOS Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
@seankhliao The programming language returns no error message. You're stating that this is not a Go issue, and it's strictly an OS issue? Remember, this works in terminal. If the programming language cannot accurately return an error state, then what's the point of the error response? |
Taking a look at the Fyne.io implementation: https://github.com/fyne-io/fyne/blob/d85af0115040a05096191c1f55c2f8330f9349df/app/app_darwin.go#L49 There is additional handling for Go by assigning OS error output (since Go doesn't accurately return error response). The response is:
Definitely a permission issue that is uncaught. |
I don't see any additional handling? It uses |
@Stoyvo you are calling Or to do it in one line, use |
@AlexRouSg Yes this is a good callout. I did change to .Run() and there is still no error message... However, there is a CONSOLE output.
In the code above, there is no content to "err" variable (no message in the log.Println), but if you're watching run/debug console there is an error. In my specific situation there is an unescaped character that breaks the "open" command (must be a change in Big Sur command arguments):
The MacOS Big Sur is breaking the URL structure. I'm still at a loss why exec.Command("open", "https:/ /google.com/").Run() returns no error response, and instead I MUST use: "cmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr" before calling .Run(). I still strongly believe that |
When you run Can you be more specific about what url you're working with? It's hard for us to reproduce without giving us a full program that's failing. |
Here is a usable example:
Output:
This error is not helpful. Now, lets modify our function:
Output:
Why should "exec" not return the cause of "exit status 1"? |
That's what |
It looks like the @bradfitz who wrote the capture code in |
What version of Go are you using (
go version
)?Description of Issue
For a typical oauth flow from a distributed application, a web browser (users default) would open and user can authenticate. When the "open" command is executed with the "exec" package, there is no error response and there is no web browser opened. This appears to be a permission issue on Big Sur.
One possible solution is to code-sign and allow accessibility to the application, but this doesn't work for development purposes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Expected log entry.
What did you see instead?
No error response returned, however web browser does not open (permission issue?)
The text was updated successfully, but these errors were encountered: