dora icon indicating copy to clipboard operation
dora copied to clipboard

Bug: panic in type ahead search handler

Open pk910 opened this issue 9 months ago • 0 comments

Noticed a panic in the holesky dora logs:

[negroni] PANIC: runtime error: cannot convert slice with length 0 to array or pointer to array with length 32
goroutine 223955 [running]:
github.com/urfave/negroni.(*Recovery).ServeHTTP.func1()
	/go/pkg/mod/github.com/urfave/[email protected]/recovery.go:159 +0xc7
panic({0x1326780, 0xc03a70c570})
	/usr/local/go/src/runtime/panic.go:884 +0x213
github.com/pk910/dora-the-explorer/handlers.SearchAhead({0x7f14ffc0d7e0, 0xc02118a028}, 0xc00dfb8700)
	/src/handlers/search.go:308 +0x210f
net/http.HandlerFunc.ServeHTTP(0xc00dfb8600?, {0x7f14ffc0d7e0?, 0xc02118a028?}, 0x446d3c?)
	/usr/local/go/src/net/http/server.go:2122 +0x2f
github.com/gorilla/mux.(*Router).ServeHTTP(0xc000000000, {0x7f14ffc0d7e0, 0xc02118a028}, 0xc00dfb8500)
	/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0x1cf
github.com/urfave/negroni.Wrap.func1({0x7f14ffc0d7e0, 0xc02118a028}, 0x12a5d60?, 0xc01fc0c120)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:46 +0x4b
github.com/urfave/negroni.HandlerFunc.ServeHTTP(0x41e510?, {0x7f14ffc0d7e0?, 0xc02118a028?}, 0xc04dc8b900?, 0xc04dc8b978?)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:29 +0x33
github.com/urfave/negroni.middleware.ServeHTTP({{0x1817c80?, 0xc0004e6378?}, 0xc0004e63f0?}, {0x7f14ffc0d7e0, 0xc02118a028}, 0x12a5d60?)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38 +0xb6
github.com/urfave/negroni.(*Recovery).ServeHTTP(0x8?, {0x7f14ffc0d7e0?, 0xc02118a028?}, 0x0?, 0xc04dc8ba50?)
	/go/pkg/mod/github.com/urfave/[email protected]/recovery.go:193 +0x86
github.com/urfave/negroni.middleware.ServeHTTP({{0x1815e60?, 0xc0001f6960?}, 0xc0004e63d8?}, {0x7f14ffc0d7e0, 0xc02118a028}, 0x0?)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:38 +0xb6
github.com/urfave/negroni.(*Negroni).ServeHTTP(0xc0001f3aa0, {0x1824c40?, 0xc020b340e0}, 0x46e7ce?)
	/go/pkg/mod/github.com/urfave/[email protected]/negroni.go:96 +0x125
net/http.serverHandler.ServeHTTP({0xc020cfc660?}, {0x1824c40, 0xc020b340e0}, 0xc00dfb8500)
	/usr/local/go/src/net/http/server.go:2936 +0x316
net/http.(*conn).serve(0xc038e27dd0, {0x1825568, 0xc0001f3d70})
	/usr/local/go/src/net/http/server.go:1995 +0x612
created by net/http.(*Server).Serve
	/usr/local/go/src/net/http/server.go:3089 +0x5ed

pk910 avatar Sep 29 '23 03:09 pk910