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

darwin crash on first startup of nex. #361

Open
gedw99 opened this issue Aug 19, 2024 · 2 comments
Open

darwin crash on first startup of nex. #361

gedw99 opened this issue Aug 19, 2024 · 2 comments
Labels
defect Suspected defect such as a bug or regression

Comments

@gedw99
Copy link

gedw99 commented Aug 19, 2024

Observed behavior

./nex_0.3.0-rc1_darwin_arm64 tui
================================================================
🎉 There is a newer version [v0.2.7] of the NEX CLI available 🎉
To update, run:
     nex upgrade
================================================================

Caught panic:

interface conversion: list.Item is nil, not home.nexNode

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
	runtime/debug/stack.go:16 +0x1c
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
	github.com/charmbracelet/[email protected]/tea.go:479 +0x88
panic({0x103976900?, 0x14000482390?})
	runtime/panic.go:770 +0x124
github.com/synadia-io/nex/nex/tui/home.HomeModel.Update({0xbe, 0x3a, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, ...}, ...}, ...)
	github.com/synadia-io/nex/nex/tui/home/model.go:147 +0xd14
github.com/synadia-io/nex/nex/tui.model.Update({0xbe, 0x3a, {0x0, 0x0}, 0x0, 0x0, {0x103b12a50, 0x14000394000}, {0x0, 0x0}, ...}, ...)
	github.com/synadia-io/nex/nex/tui/update.go:41 +0x8d0
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0x14000267700, {0x103b12a80?, 0x140002e2380?}, 0x14000027320)
	github.com/charmbracelet/[email protected]/tea.go:412 +0x59c
github.com/charmbracelet/bubbletea.(*Program).Run(0x14000267700)
	github.com/charmbracelet/[email protected]/tea.go:550 +0x7ec
github.com/synadia-io/nex/nex/tui.StartTUI({0x0, 0x0})
	github.com/synadia-io/nex/nex/tui/tui.go:16 +0x12c
main.main()
	github.com/synadia-io/nex/nex/nex.go:265 +0x2184
apple@192 Downloads % ./nex_0.3.0-rc1_darwin_arm64 tui

Expected behavior

not panic on fresh install on new machine, when I open the tui.

The 2nd time you open it is does not panic, if I recall.. So you might not get this bug unless you do it on a clean machine.

Nex and NATS version

https://github.com/synadia-io/nex/releases/tag/0.3.0-rc1

Downloads % ./nex_0.3.0-rc1_darwin_arm64 --version

🎉 There is a newer version [v0.2.7] of the NEX CLI available 🎉
To update, run:
nex upgrade

v0.3.0-rc1 [c5899ff] | Built-on: 2024-08-16T00:22:43Z

Host environment

Mac m2

Steps to reproduce

download the tagged version off github and then:

xattr -dr com.apple.quarantine ./nex_0.3.0-rc1_darwin_arm64
chmod +x ./nex_0.3.0-rc1_darwin_arm64
@gedw99 gedw99 added the defect Suspected defect such as a bug or regression label Aug 19, 2024
@jordan-rash
Copy link
Contributor

jordan-rash commented Aug 19, 2024

As noted in the README (and I believe the --help as well), the tui is very experimental right now and I would expect it to break randomly.

Try running any other command and let me know if it breaks for you

If that feature isn't ready by the time we stop cutting RC tags, then it will be placed behind a build tag as to not clutter the DX

@autodidaddict
Copy link
Contributor

Yep as Jordan notes, tui is experimental and may end up moving to an entirely different place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

3 participants