bensadeh / circumflex

🌿 It's Hacker News in your terminal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caught panic: could not fetch url: URL is not a HTML document

clauseggers opened this issue · comments

Opening this URL https://www.devever.net/~hl/webcrypto (second link from top on HN at time of writing) will consistently crash clx

Caught panic:

could not fetch url: URL is not a HTML document

Restoring terminal...

goroutine 1 [running]:
runtime/debug.Stack()
	/opt/hostedtoolcache/go/1.19.10/x64/src/runtime/debug/stack.go:24 +0x64
runtime/debug.PrintStack()
	/opt/hostedtoolcache/go/1.19.10/x64/src/runtime/debug/stack.go:16 +0x1c
github.com/charmbracelet/bubbletea.(*Program).Run.func1()
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:440 +0x8c
panic({0x103a240c0, 0x1400059c3a0})
	/opt/hostedtoolcache/go/1.19.10/x64/src/runtime/panic.go:890 +0x258
clx/bubble/list.Model.Update({0x1, 0x1, 0x1, {0x10370d62e, 0x4}, {{0x1040944d0, 0x140001e18f0, {0x0, 0x0}}, {0x0, ...}, ...}, ...}, ...)
	/home/runner/work/circumflex/circumflex/bubble/list/list.go:551 +0x1894
clx/bubble.model.Update(...)
	/home/runner/work/circumflex/circumflex/bubble/bubble.go:30
github.com/charmbracelet/bubbletea.(*Program).eventLoop(0x1400029d440, {0x103ab62e8?, 0x14000312300?}, 0x1032305b8?)
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:373 +0x5f0
github.com/charmbracelet/bubbletea.(*Program).Run(0x1400029d440)
	/home/runner/go/pkg/mod/github.com/charmbracelet/bubbletea@v0.24.2/tea.go:503 +0x730
clx/bubble.Run(0x10376076b?, 0xc?)
	/home/runner/work/circumflex/circumflex/bubble/bubble.go:46 +0x1b8
clx/cmd.Root.func1(0x14000300900?, {0x103721b4b?, 0x0?, 0x0?})
	/home/runner/work/circumflex/circumflex/cmd/root.go:54 +0x2a0
github.com/spf13/cobra.(*Command).execute(0x14000300900, {0x1400001e240, 0x0, 0x0})
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x5b0
github.com/spf13/cobra.(*Command).ExecuteC(0x14000300900)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x35c
github.com/spf13/cobra.(*Command).Execute(...)
	/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
main.main()
	/home/runner/work/circumflex/circumflex/main.go:9 +0x20

Hi @clauseggers !

Thanks for letting me know about this. Unfortunately there isn't a lot we can do on our end since this an error from go-readability. The contents of the website indeed looks like it is a good fit for reader mode, however it is outside my control.

In any case, I do think it is a good idea to not panic when this happens. So in 3.1.3, it should no longer crash when this happens.