Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

segfault adding a site #78

Closed
angrybrad opened this issue Apr 20, 2020 · 2 comments
Closed

segfault adding a site #78

angrybrad opened this issue Apr 20, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@angrybrad
Copy link
Member

angrybrad commented Apr 20, 2020

~/dev/support/craft2.support.test
❯ nitro add craft2.support.test
What should the hostname be? [craft2.support.test]: █
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1465daf]

goroutine 1 [running]:
github.com/craftcms/nitro/internal/helpers.FindWebRoot.func1(0xc000024280, 0x3f, 0x0, 0x0, 0x162ca60, 0xc00011c060, 0x0, 0xc00011a018)
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/internal/helpers/webroot.go:12 +0x2f
path/filepath.Walk(0xc000024280, 0x3f, 0xc000197758, 0xc000197768, 0x100bbab)
	/usr/local/Cellar/go/1.14.2_1/libexec/src/path/filepath/path.go:404 +0x6a
github.com/craftcms/nitro/internal/helpers.FindWebRoot(0xc000024280, 0x3f, 0x0, 0x0, 0x0, 0xc0000242c0)
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/internal/helpers/webroot.go:11 +0x66
github.com/craftcms/nitro/internal/cmd.glob..func1(0x1987be0, 0xc000075740, 0x1, 0x1, 0x0, 0x0)
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/internal/cmd/add.go:64 +0x1b29
github.com/spf13/cobra.(*Command).execute(0x1987be0, 0xc000075700, 0x1, 0x1, 0x1987be0, 0xc000075700)
	/Users/jasonmccallister/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0x198ade0, 0x0, 0x0, 0x0)
	/Users/jasonmccallister/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/jasonmccallister/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/craftcms/nitro/internal/cmd.Execute()
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/internal/cmd/root.go:53 +0x2d
main.main()
	/Users/jasonmccallister/go/src/github.com/craftcms/nitro/cmd/cli/main.go:8 +0x20

nitrol.yaml when running this command

name: nitro-local
php: "7.4"
cpus: "1"
disk: 100G
memory: 6G
mounts:
- source: ~/dev/support/craft3.support.test
  dest: /nitro/sites/craft3.support.test
databases:
- engine: mysql
  version: "5.7"
  port: "3306"
- engine: postgres
  version: "12"
  port: "5432"
sites:
- hostname: craft3.support.test
  webroot: /nitro/sites/craft3.support.test/web
@angrybrad angrybrad added the bug Something isn't working label Apr 20, 2020
@csoutham
Copy link

I'm seeing the same issue on a new Nitro machine too.

name: nitro
php: "7.4"
cpus: "1"
disk: 30G
memory: 4G
databases:
- engine: mysql
  version: "5.7"
  port: "3306"

Thought it was possibly related to the subdomain sitename (was using app.project.test) but is also an issue for project.test.

@jasonmccallister
Copy link
Contributor

I've identified this error and will resolve with the next release, which is most likely going to have breaking changes.

jasonmccallister added a commit that referenced this issue Apr 22, 2020
Signed-off-by: Jason McCallister <jason@craftcms.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants