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

LSOpenURLsWithRole() failed with error -10810 #55

Open
kelvins opened this issue May 31, 2017 · 2 comments
Open

LSOpenURLsWithRole() failed with error -10810 #55

kelvins opened this issue May 31, 2017 · 2 comments

Comments

@kelvins
Copy link

kelvins commented May 31, 2017

Hi, I'm just trying to run the Quickstart example but I'm facing some issues.

I have installed Gallium following the step-by-step from the Installation section in the README file.

Now, I'm trying to create a new Go project following these steps:

On the Go workspace:

$ mkdir example
$ cd example
$ touch example.go
$ open example.go

I copied the following code to the example.go file:

package main

import (
  "os"
  "runtime"

  "github.com/alexflint/gallium"
)

func main() {
  runtime.LockOSThread()         // must be the first statement in main - see below
  gallium.Loop(os.Args, onReady) // must be called from main function
}

func onReady(app *gallium.App) {
  app.OpenWindow("http://example.com/", gallium.FramedWindow)
}

Then I ran the following commands:

$ go build
$ go install github.com/alexflint/gallium/cmd/gallium-bundle
$ gallium-bundle example
$ open example.app

And I got the following error message:

LSOpenURLsWithRole() failed with error -10810 for the file /Users/username/Developer/GoWorkspace/src/github.com/username/example/example.app.

Also when I try to run the go run example.go command I get it signal: killed.

I don't know if it is a Gallium issue or if I'm doing something wrong, but I couldn't figure out what is happening. If someone can help me I will appreciate.

I'm running it on MacOS Sierra Version 10.12.5 using Go version 1.8.

By the way, congratulations for the great project.

@alexflint
Copy link
Owner

  1. What happens if you just create an example.go without any references to gallium - does that build and run?

  2. What happens if you log a message at the top of main() - does it get printed?

  3. Did you install git lfs and can you post the output of du -hs $GOPATH/dist/Gallium.framework/Versions/A/Gallium?

@kelvins
Copy link
Author

kelvins commented Jun 1, 2017

  1. What happens if you just create an example.go without any references to gallium - does that build and run?

Yes, it does. I have tried with the following code and it is building and running properly.

package main

import "log"

func main() {
  log.Print("Hello")
}

Output: 2017/05/31 21:03:58 Hello

  1. What happens if you log a message at the top of main() - does it get printed?

I have tried the following code:

func main() {
  log.Print("Hello")
  runtime.LockOSThread()         // must be the first statement in main - see below
  gallium.Loop(os.Args, onReady) // must be called from main function
}

And it doesn't print the log, only the same message: signal: killed

  1. Did you install git lfs and can you post the output of du -hs $GOPATH/dist/Gallium.framework/Versions/A/Gallium?

Yes, I did. I did run the command and got the following result:

du: /Users/username/Developer/GoWorkspace//dist/Gallium.framework/Versions/A/Gallium: No such file or directory.

I have noticed that the Gallium exec is in the following directory:

/Users/username/Developer/GoWorkspace/src/github.com/alexflint/gallium/dist/Gallium.framework/Versions/A/Gallium

So, if I run the following command:

du -hs $GOPATH/src/github.com/alexflint/gallium/dist/Gallium.framework/Versions/A/Gallium

I get the following result:

1.2M /Users/username/Developer/GoWorkspace//src/github.com/alexflint/gallium/dist/Gallium.framework/Versions/A/Gallium

My $GOPATH is /Users/username/Developer/GoWorkspace/.

Any idea?
Thanks

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

No branches or pull requests

2 participants