Enonic project install failed

Enonic version: 7.2.3
Enonic CLI version 1.2.0
OS: Windows 10 Pro

I started with the Headless CMS Starter. everything is working fine on my local machine. When I tried install the app to running XP like: “enonic project install -a su:password” I got this error:

BUILD SUCCESSFUL in 1s
4 actionable tasks: 4 up-to-date
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x30 pc=0x78c497]

goroutine 1 [running]:
net/url.(*URL).Hostname(…)
/usr/local/Cellar/go/1.12.9/libexec/src/net/url/url.go:1066
github.com/enonic/cli-enonic/internal/app/commands/common.doCreateRequest(0xa8329d, 0x4, 0xa85a80, 0xb, 0xc000072098, 0x2, 0xc00007209b, 0x5, 0xb4b160, 0xc0001b6030, …)
/Users/ase/go/src/github.com/enonic/cli-enonic/internal/app/commands/common/common.go:177 +0x6a7
github.com/enonic/cli-enonic/internal/app/commands/common.CreateRequest(0xc0000ad080, 0xa8329d, 0x4, 0xa85a80, 0xb, 0xb4b160, 0xc0001b6030, 0x4efd3d)
/Users/ase/go/src/github.com/enonic/cli-enonic/internal/app/commands/common/common.go:159 +0x12c
github.com/enonic/cli-enonic/internal/app/commands/app.createInstallRequest(0xc0000ad080, 0xc0001be060, 0x26, 0x0, 0x0, 0x0)
/Users/ase/go/src/github.com/enonic/cli-enonic/internal/app/commands/app/install.go:157 +0x1e6
github.com/enonic/cli-enonic/internal/app/commands/app.installApp(0xc0000ad080, 0xc0001be060, 0x26, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, …)
/Users/ase/go/src/github.com/enonic/cli-enonic/internal/app/commands/app/install.go:45 +0x9c
github.com/enonic/cli-enonic/internal/app/commands/app.InstallFromFile(...)
/Users/ase/go/src/github.com/enonic/cli-enonic/internal/app/commands/app/install.go:62
github.com/enonic/cli-enonic/internal/app/commands/project.glob..func7(0xc0000ad080, 0x0, 0xc0000ad080)
/Users/ase/go/src/github.com/enonic/cli-enonic/internal/app/commands/project/install.go:23 +0x75
github.com/enonic/cli-enonic/vendor/github.com/urfave/cli.HandleAction(0x9b8660, 0xaaa2c8, 0xc0000ad080, 0xc0000a6900, 0x0)
/Users/ase/go/src/github.com/enonic/cli-enonic/vendor/github.com/urfave/cli/app.go:490 +0xcf
github.com/enonic/cli-enonic/vendor/github.com/urfave/cli.Command.Run(0xa84126, 0x7, 0x0, 0x0, 0xfa7bc0, 0x1, 0x1, 0xa9d044, 0x31, 0x0, …)
/Users/ase/go/src/github.com/enonic/cli-enonic/vendor/github.com/urfave/cli/command.go:210 +0x99d
github.com/enonic/cli-enonic/vendor/github.com/urfave/cli.(*App).RunAsSubcommand(0xc0000a9a00, 0xc0000acdc0, 0x0, 0x0)
/Users/ase/go/src/github.com/enonic/cli-enonic/vendor/github.com/urfave/cli/app.go:379 +0x81f
github.com/enonic/cli-enonic/vendor/github.com/urfave/cli.Command.startApp(0xa841b2, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa925eb, 0x1e, 0x0, …)
/Users/ase/go/src/github.com/enonic/cli-enonic/vendor/github.com/urfave/cli/command.go:298 +0x828
github.com/enonic/cli-enonic/vendor/github.com/urfave/cli.Command.Run(0xa841b2, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa925eb, 0x1e, 0x0, …)
/Users/ase/go/src/github.com/enonic/cli-enonic/vendor/github.com/urfave/cli/command.go:98 +0x120a
github.com/enonic/cli-enonic/vendor/github.com/urfave/cli.(*App).Run(0xc0000a9860, 0xc0000a4000, 0x5, 0x8, 0x0, 0x0)
/Users/ase/go/src/github.com/enonic/cli-enonic/vendor/github.com/urfave/cli/app.go:255 +0x6b6
main.main()
/Users/ase/go/src/github.com/enonic/cli-enonic/internal/app/cli.go:36 +0x1e9

How can I get rid of it?

Can you try if enonic project deploy is working? install should be used if you are installing from a remote source and then you need to provide either host (-h) or file path (-f).

Hi ase,

yes “enonic project deploy” is working. I actually tested “install” command for later usage in CI/CD pipeline. So what is the correct syntax of “enonic project install”? I followed the help from here enonic-cli

If you want to deploy a local app to a remote server (http://myhost:5000) then it would be for instance

enonic project install -h myhost -p 5000 -f /path/to/my/app

You can also store host in env variable called ENONIC_CLI_REMOTE_URL so that you don’t have to specify it every time: https://developer.enonic.com/docs/enonic-cli/master#configuration

Hello ase,

thank you for your response. I found that there are 2 commands:

  • enonic project install
  • enonic app install

both commands work fine when I set the environment parameters according to the configuration you mentioned, but have problems when the environment params are not set.
Thank you one more time for help :slight_smile:

1 Like

We will investigate why it doesn’t work without the env variables.