I am getting the following Segfault when running a svc deploy command:
I have tried deleting the service and deleting the environment. It was previously working.
3ee270f20d54: Layer already exists
4ef4adca5c3b: Layer already exists
deee8f2e: digest: sha256:a2f012700428635cc54bccf4fe00c9deef0339c99411f6c5f9a72ce980821430 size: 3260
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1924b73]
goroutine 1 [running]:
github.com/aws/copilot-cli/internal/pkg/manifest.LoadBalancedWebService.ApplyEnv(0xc000408aa0, 0xc0004086e0, 0xc000408c60, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/codebuild/output/src115976474/src/internal/pkg/manifest/lb_web_svc.go:210 +0xf3
github.com/aws/copilot-cli/internal/pkg/deploy/cloudformation/stack.NewLoadBalancedWebService(0xc0005da000, 0xc00003a390, 0x4, 0xc00003a378, 0x8, 0xc00045dea0, 0xc0005bc000, 0x8d, 0xc000805ad0, 0x0, ...)
/codebuild/output/src115976474/src/internal/pkg/deploy/cloudformation/stack/lb_web_svc.go:55 +0x1b8
github.com/aws/copilot-cli/internal/pkg/cli.(deploySvcOpts).stackConfiguration(0xc00035e820, 0xc0005bc000, 0x8d, 0xc000259ee0, 0xc00055fb10, 0x10f3ceb, 0xc000259ee0)
/codebuild/output/src115976474/src/internal/pkg/cli/svc_deploy.go:419 +0x3a5
github.com/aws/copilot-cli/internal/pkg/cli.(deploySvcOpts).deploySvc(0xc00035e820, 0xc0005bc000, 0x8d, 0x0, 0x0)
/codebuild/output/src115976474/src/internal/pkg/cli/svc_deploy.go:433 +0x5d
github.com/aws/copilot-cli/internal/pkg/cli.(deploySvcOpts).Execute(0xc00035e820, 0x0, 0x0)
/codebuild/output/src115976474/src/internal/pkg/cli/svc_deploy.go:170 +0x39a
github.com/aws/copilot-cli/internal/pkg/cli.buildSvcDeployCmd.func1(0xc000374780, 0x369db90, 0x0, 0x0, 0xc00021fd48, 0x0)
/codebuild/output/src115976474/src/internal/pkg/cli/svc_deploy.go:515 +0x114
github.com/aws/copilot-cli/internal/pkg/cli.runCmdE.func1(0xc000374780, 0x369db90, 0x0, 0x0, 0x0, 0x0)
/codebuild/output/src115976474/src/internal/pkg/cli/cli.go:66 +0x6d
github.com/spf13/cobra.(Command).execute(0xc000374780, 0x369db90, 0x0, 0x0, 0xc000374780, 0x369db90)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x47c
github.com/spf13/cobra.(Command).ExecuteC(0xc00032f400, 0x0, 0x0, 0x0)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:960 +0x375
github.com/spf13/cobra.(Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:897
main.main()
/codebuild/output/src115976474/src/cmd/copilot/main.go:25 +0x2b
False alarm. My app manifest had incorrect syntax. I had added environment variables in the root rather than within the variables section
@efekarakus I think this is a good opportunity for us to consider to implement a validate subcommand or something like that to check the manifest schema to show friendly error messages to users. Do you mind if I create a new issue for that? Let me know if you have other thoughts on this☺️
@toricls I think that makes sense! Sorry for the crazy error messages above, we should definitely be able to display something that's friendlier 🙇 so I think it's worthwhile creating a separate issue.
I don't know yet if we necessarily need a new command as a solution 🤔, maybe we can display nice error messages prior to deploying when running copilot svc deploy or when translating to a cfn template with copilot svc package
Thanks for following up on this. I agree, it would be great if svc
deploy and others could perform a validate step. This would be more useful
than a separate command as people would likely forget to use it and run in
to the same error message.
On Tue, Apr 27, 2021 at 3:36 AM Efe Karakus @.*>
wrote:
@toricls https://github.com/toricls I think that makes sense! Sorry for
the crazy error messages above, we should definitely be able to display
something that's friendlier 🙇 .I don't know yet if we necessarily need a new command 🤔, maybe we can
display nice error messages prior to deploying when running copilot svc
deploy or when translating to a cfn template with copilot svc package—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/aws/copilot-cli/issues/2212#issuecomment-827021990,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA6WI3LNF4KR3CY2EJUKXLTKWQATANCNFSM43QWVCQQ
.
Most helpful comment
@efekarakus I think this is a good opportunity for us to consider to implement a
validatesubcommand or something like that to check the manifest schema to show friendly error messages to users. Do you mind if I create a new issue for that? Let me know if you have other thoughts on this☺️