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

Panic when viewing web UI in 3.1.16 #1417

Closed
deaddotcodes opened this issue May 9, 2024 · 3 comments
Closed

Panic when viewing web UI in 3.1.16 #1417

deaddotcodes opened this issue May 9, 2024 · 3 comments

Comments

@deaddotcodes
Copy link

When viewing any page in the komiser web UI I receive a panic.
This happens when using SQLite or Postgres, and with any cloud provider.

Errors:

2024/05/09 11:45:58 [Recovery] 2024/05/09 - 11:45:58 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/panic.go:261 (0xe6a79f7)
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/signal_unix.go:881 (0xe6a79c5)
/home/runner/work/komiser/komiser/handlers/accounts_handler.go:66 (0x112ac805)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xfbe3599)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0xfbe3587)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xfbe23ad)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0xfbe203c)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0xfbe1b71)
/opt/hostedtoolcache/go/1.22.2/x64/src/net/http/server.go:3137 (0xe9f9e6d)
/opt/hostedtoolcache/go/1.22.2/x64/src/net/http/server.go:2039 (0xe9f5147)
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/asm_amd64.s:1695 (0xe6c5c00)



2024/05/09 11:45:58 [Recovery] 2024/05/09 - 11:45:58 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/panic.go:261 (0xe6a79f7)
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/signal_unix.go:881 (0xe6a79c5)
/home/runner/work/komiser/komiser/handlers/accounts_handler.go:42 (0x112ac507)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xfbe3599)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0xfbe3587)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xfbe23ad)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0xfbe203c)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0xfbe1b71)
/opt/hostedtoolcache/go/1.22.2/x64/src/net/http/server.go:3137 (0xe9f9e6d)
/opt/hostedtoolcache/go/1.22.2/x64/src/net/http/server.go:2039 (0xe9f5147)
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/asm_amd64.s:1695 (0xe6c5c00)



2024/05/09 11:45:58 [Recovery] 2024/05/09 - 11:45:58 panic recovered:
runtime error: invalid memory address or nil pointer dereference
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/panic.go:261 (0xe6a79f7)
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/signal_unix.go:881 (0xe6a79c5)
/home/runner/work/komiser/komiser/handlers/dashboard_handler.go:36 (0x112b53dd)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xfbe3599)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0xfbe3587)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0xfbe23ad)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0xfbe203c)
/home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0xfbe1b71)
/opt/hostedtoolcache/go/1.22.2/x64/src/net/http/server.go:3137 (0xe9f9e6d)
/opt/hostedtoolcache/go/1.22.2/x64/src/net/http/server.go:2039 (0xe9f5147)
/opt/hostedtoolcache/go/1.22.2/x64/src/runtime/asm_amd64.s:1695 (0xe6c5c00)

Following the trace I found this commit which changes how queries are performed across the board:

https://github.com/tailwarden/komiser/blame/6732ea4912c9be443ae65a56826db1ea2429a7b3/handlers/accounts_handler.go#L66

It seems the consolidation of query logic has gone awry.

Downgrading to 3.1.15 fixes this issue.

Copy link

github-actions bot commented May 9, 2024

Hey, thank you for opening your first Issue! 🙂 While a Tailwarden team member takes a look at your issue we would like to invite you to join our official Discord server, where you can interact directly with other contributors and Tailwarden team members. Link here: https://discord.tailwarden.com

@AvineshTripathi
Copy link
Collaborator

hey @deaddotcodes thanks for reporting the bug, this issue should be resolved in latest releases.

@Azanul
Copy link
Collaborator

Azanul commented Jul 11, 2024

Please re-open if not resolved

@Azanul Azanul closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants