Skip to content

cli crashes if no .env or empty .env file #795

@jimfrimmel

Description

@jimfrimmel

Environment: MacOS Tahoe 26.3.1, M2 mbp, using zsh, brew and pip.
When I tried to create an app, cli crashes. I had two issues when it happened: 1) not in a true project, 2) no .env file. I fixed this, works now.

Requesting better user feedback for these two user errors.

(rtagent) ➜ ringtell lk app create
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10365c684]
goroutine 1 [running]:
main.setupTemplate({0x105d30e98, 0x1a059e389a10}, 0x105ede3e0)
github.com/livekit/livekit-cli/v2/cmd/lk/app.go:304 +0x544
github.com/urfave/cli/v3.(*Command).run(0x105ede3e0, {0x105d30e98, 0x1a059e389a10}, {0x1a059e7a5e10, 0x1, 0x1})
github.com/urfave/cli/v3@v3.4.1/command_run.go:344 +0x1e7c
github.com/urfave/cli/v3.(*Command).run(0x105ede160, {0x105d30e98, 0x1a059e3898f0}, {0x1a059e43e260, 0x2, 0x2})
github.com/urfave/cli/v3@v3.4.1/command_run.go:278 +0x1898
github.com/urfave/cli/v3.(*Command).run(0x1a059e154f08, {0x105d30e98, 0x1a059e2f0060}, {0x1a059e2224b0, 0x3, 0x3})
github.com/urfave/cli/v3@v3.4.1/command_run.go:278 +0x1898
github.com/urfave/cli/v3.(*Command).Run(...)
github.com/urfave/cli/v3@v3.4.1/command_run.go:94
main.main()
github.com/livekit/livekit-cli/v2/cmd/lk/main.go:92 +0xd0c
(rtagent) ➜ ringtell

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions