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

CLI panics if result type has multiple views #2681

Open
sm43 opened this issue Sep 21, 2020 · 0 comments
Open

CLI panics if result type has multiple views #2681

sm43 opened this issue Sep 21, 2020 · 0 comments
Labels

Comments

@sm43
Copy link

sm43 commented Sep 21, 2020

I have an example here.

If you run the service and invoke the API using CLI.

./user-cli user get

this returns

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x77205b]

goroutine 1 [running]:
github.com/sm43/user-goa/gen/http/user/client.unmarshalCompanyResponseBodyToUserviewsCompanyView(...)
	/home/smukhade/go/src/github.com/sm43/user-goa/gen/http/user/client/encode_decode.go:83
github.com/sm43/user-goa/gen/http/user/client.NewGetUserOK(0xc000012090, 0x7991c0)
	/home/smukhade/go/src/github.com/sm43/user-goa/gen/http/user/client/types.go:45 +0x8b
github.com/sm43/user-goa/gen/http/user/client.DecodeGetResponse.func1(0xc000076000, 0x0, 0x0, 0x0, 0x0)
	/home/smukhade/go/src/github.com/sm43/user-goa/gen/http/user/client/encode_decode.go:64 +0x2e9
github.com/sm43/user-goa/gen/http/user/client.(*Client).Get.func1(0x8c3ec0, 0xc0000a0000, 0x0, 0x0, 0x1e, 0x0, 0xc0000aac00, 0x0)
	/home/smukhade/go/src/github.com/sm43/user-goa/gen/http/user/client/client.go:67 +0x120
main.main()
	/home/smukhade/go/src/github.com/sm43/user-goa/cmd/user-cli/main.go:82 +0x53f

So, there are 3 cases I have created, the 3rd one seems to be breaking.
HTTP response are correct but in CLI it breaks.

cc @raphael

@sm43 sm43 changed the title CLI panics if result type has multiple views in some cases CLI panics if result type has multiple views Sep 21, 2020
@raphael raphael added the bug label Sep 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants