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

Segfault when using connection specifier #85

Closed
baileywickham opened this issue Jun 5, 2024 · 10 comments
Closed

Segfault when using connection specifier #85

baileywickham opened this issue Jun 5, 2024 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@baileywickham
Copy link

baileywickham commented Jun 5, 2024

I'm getting a segfault when I attempt to use a source and a connection through the CLI. The connection errors whenever I use either a valid or invalid connection. I get no errors when only specifying the source. Link to line segfaulting here

hookdeck listen 8080 test testconn
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x10040af84]

goroutine 1 [running]:
github.com/hookdeck/hookdeck-cli/pkg/listen.getConnections(0x140001dedc0, 0x14000244960, {0x16fdbe85b, 0x8})
	/Users/runner/work/hookdeck-cli/hookdeck-cli/pkg/listen/connection.go:41 +0x2a4
github.com/hookdeck/hookdeck-cli/pkg/listen.Listen(0x140001483f0, {0x16fdbe855, 0x5}, {0x16fdbe85b, 0x8}, {0x64?}, 0x1008a7180)
	/Users/runner/work/hookdeck-cli/hookdeck-cli/pkg/listen/listen.go:54 +0xa8
github.com/hookdeck/hookdeck-cli/pkg/cmd.(*listenCmd).runListenCmd(0x1400015e820, 0x1001d2710?, {0x140001d0f90, 0x140001b3bb8?, 0x0?})
	/Users/runner/work/hookdeck-cli/hookdeck-cli/pkg/cmd/listen.go:115 +0x194
github.com/spf13/cobra.(*Command).execute(0x140001e0000, {0x140001d0f60, 0x3, 0x3})
	/Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:842 +0x4c4
github.com/spf13/cobra.(*Command).ExecuteC(0x10089dec0)
	/Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x34c
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/runner/go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/hookdeck/hookdeck-cli/pkg/cmd.Execute()
	/Users/runner/work/hookdeck-cli/hookdeck-cli/pkg/cmd/root.go:46 +0x34
main.main()
	/Users/runner/work/hookdeck-cli/hookdeck-cli/main.go:21 +0x20```
@leggetter leggetter added the bug Something isn't working label Jun 5, 2024
@leggetter
Copy link
Collaborator

@alexluong could you take a look at this, please?

@baileywickham
Copy link
Author

This might be an error on my part (let me know if it is), but a better error message would be great if it is! Thanks

@leggetter
Copy link
Collaborator

@baileywickham could you please confirm the version of the CLI you are running?

https://github.com/hookdeck/hookdeck-cli?tab=readme-ov-file#version

@baileywickham
Copy link
Author

Thanks for the quick response.

❯ hookdeck version
hookdeck version 0.10.0
A newer version of the Hookdeck CLI is available, please update to: v0.9.3

Installed via brew on macos

@alexluong
Copy link
Collaborator

I think this should be fixed by #83. This issue is because the source has a nameless connection. I assume this is the case, @baileywickham?

@baileywickham
Copy link
Author

image

I thought my connection had a name, am I missing something?

I also thought it might be related to #76, but I'm on v0.10.0.

If you want I can pull and test #83

@baileywickham
Copy link
Author

I see what you mean, one of the other connections was nameless, not bwtesting. Naming that fixed the error. Feel free to close once #83 is merged. Thanks for the quick responses.

@leggetter
Copy link
Collaborator

Thanks for the quick response.

❯ hookdeck version
hookdeck version 0.10.0
A newer version of the Hookdeck CLI is available, please update to: v0.9.3

Installed via brew on macos

Thanks for this. This flagged that we published a version on GitHub out of order.

I've just triggered the release of v0.10.1 which contains #83.

@baileywickham
Copy link
Author

Thanks, I can confirm that v0.10.1 fixed my issue.

@leggetter
Copy link
Collaborator

Thanks, @baileywickham 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants