You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to deploy a small web file browser for a public bucket at https://cdn.vastuncharted.space and it seems like either bucket.List or the ObjectIterator is sometimes returning a zero-length array? This doesn't seem to happen at all on my local machine, only on the server where it is deployed, and you can eventually get any given directory to come up by refreshing, so I'm not really sure where the error lies or how to troubleshoot it.
Error Message
2025/02/21 17:09:14 http: panic serving [::1]:34246: runtime error: index out of range [0] with length 0
goroutine 147 [running]:
net/http.(*conn).serve.func1()
/home/bryan/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:1947 +0xbe
panic({0x86ea20?, 0xc0003b0378?})
/home/bryan/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:785 +0x132
main.Handler({0x94d1b0, 0xc0001aa0e0}, 0xc000026f00)
/home/bryan/b2-browser/main.go:49 +0x345
net/http.HandlerFunc.ServeHTTP(0xc19a20?, {0x94d1b0?, 0xc0001aa0e0?}, 0x7523d6?)
/home/bryan/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2220 +0x29
net/http.(*ServeMux).ServeHTTP(0x46a1b9?, {0x94d1b0, 0xc0001aa0e0}, 0xc000026f00)
/home/bryan/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2747 +0x1ca
net/http.serverHandler.ServeHTTP({0xc0001b26c0?}, {0x94d1b0?, 0xc0001aa0e0?}, 0x6?)
/home/bryan/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3210 +0x8e
net/http.(*conn).serve(0xc00020c630, {0x94d848, 0xc000226a20})
/home/bryan/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:2092 +0x5d0
created by net/http.(*Server).Serve in goroutine 1
/home/bryan/go/pkg/mod/golang.org/[email protected]/src/net/http/server.go:3360 +0x485
Description
Trying to deploy a small web file browser for a public bucket at https://cdn.vastuncharted.space and it seems like either
bucket.List
or theObjectIterator
is sometimes returning a zero-length array? This doesn't seem to happen at all on my local machine, only on the server where it is deployed, and you can eventually get any given directory to come up by refreshing, so I'm not really sure where the error lies or how to troubleshoot it.Error Message
go.mod
The text was updated successfully, but these errors were encountered: