[GH-ISSUE #659] runtime error: invalid memory address or nil pointer dereference #4763

Closed
opened 2026-03-01 15:35:58 +03:00 by kerem · 2 comments
Owner

Originally created by @stig1102 on GitHub (Oct 25, 2024).
Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/659

Fresh installation on Debian 12

http://:9000/#/dashboard => returns runtime error: invalid memory address or nil pointer dereference

nginx-ui[175678]: goroutine 61 [running]: nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.Recovery.func2.1() nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/middleware.go:23 +0x65 nginx-ui[175678]: panic({0x36ce840?, 0x7594300?}) nginx-ui[175678]: /opt/hostedtoolcache/go/1.23.2/x64/src/runtime/panic.go:785 +0x132 nginx-ui[175678]: github.com/0xJacky/Nginx-UI/internal/user.GetTokenUser({0xc000cd7440, 0x8b}) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/user/user.go:46 +0x39 nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.AuthRequired.func8(0xc001d6a100) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/middleware.go:61 +0x156 nginx-ui[175678]: github.com/gin-gonic/gin.(*Context).Next(0xc001d6a100) nginx-ui[175678]: /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.IPWhiteList.func4(0xc001d6a100) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/ip_whitelist.go:14 +0x4d nginx-ui[175678]: github.com/gin-gonic/gin.(*Context).Next(0xc001d6a100) nginx-ui[175678]: /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b nginx-ui[175678]: github.com/0xJacky/Ngi nginx-ui[175678]: [GIN] 2024/10/25 - 08:20:07 | 500 | 268.529<C2><B5>s | 192.168.178.89 | GET "/api/analytic/nodes?token=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnVZVzFsSWpvaVZHOXR> nginx-ui[175678]: 2024-10-25 08:20:17 ERROR middleware/middleware.go:24 runtime error: invalid memory address or nil pointer dereference nginx-ui[175678]: goroutine 64 [running]: nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.Recovery.func2.1() nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/middleware.go:23 +0x65 nginx-ui[175678]: panic({0x36ce840?, 0x7594300?}) nginx-ui[175678]: /opt/hostedtoolcache/go/1.23.2/x64/src/runtime/panic.go:785 +0x132 nginx-ui[175678]: github.com/0xJacky/Nginx-UI/internal/user.GetTokenUser({0xc000cd7560, 0x8b}) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/user/user.go:46 +0x39 nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.AuthRequired.func8(0xc001d6a100) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/middleware.go:61 +0x156 nginx-ui[175678]: github.com/gin-gonic/gin.(*Context).Next(0xc001d6a100) nginx-ui[175678]: /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.IPWhiteList.func4(0xc001d6a100) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/ip_whitelist.go:14 +0x4d nginx-ui[175678]: github.com/gin-gonic/gin.(*Context).Next(0xc001d6a100) nginx-ui[175678]: /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b nginx-ui[175678]: github.com/0xJacky/Ngi

Originally created by @stig1102 on GitHub (Oct 25, 2024). Original GitHub issue: https://github.com/0xJacky/nginx-ui/issues/659 Fresh installation on Debian 12 http://<hostname>:9000/#/dashboard => returns runtime error: invalid memory address or nil pointer dereference `nginx-ui[175678]: goroutine 61 [running]: nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.Recovery.func2.1() nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/middleware.go:23 +0x65 nginx-ui[175678]: panic({0x36ce840?, 0x7594300?}) nginx-ui[175678]: /opt/hostedtoolcache/go/1.23.2/x64/src/runtime/panic.go:785 +0x132 nginx-ui[175678]: github.com/0xJacky/Nginx-UI/internal/user.GetTokenUser({0xc000cd7440, 0x8b}) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/user/user.go:46 +0x39 nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.AuthRequired.func8(0xc001d6a100) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/middleware.go:61 +0x156 nginx-ui[175678]: github.com/gin-gonic/gin.(*Context).Next(0xc001d6a100) nginx-ui[175678]: /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.IPWhiteList.func4(0xc001d6a100) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/ip_whitelist.go:14 +0x4d nginx-ui[175678]: github.com/gin-gonic/gin.(*Context).Next(0xc001d6a100) nginx-ui[175678]: /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b nginx-ui[175678]: github.com/0xJacky/Ngi nginx-ui[175678]: [GIN] 2024/10/25 - 08:20:07 | 500 | 268.529<C2><B5>s | 192.168.178.89 | GET "/api/analytic/nodes?token=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SnVZVzFsSWpvaVZHOXR> nginx-ui[175678]: 2024-10-25 08:20:17 ERROR middleware/middleware.go:24 runtime error: invalid memory address or nil pointer dereference nginx-ui[175678]: goroutine 64 [running]: nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.Recovery.func2.1() nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/middleware.go:23 +0x65 nginx-ui[175678]: panic({0x36ce840?, 0x7594300?}) nginx-ui[175678]: /opt/hostedtoolcache/go/1.23.2/x64/src/runtime/panic.go:785 +0x132 nginx-ui[175678]: github.com/0xJacky/Nginx-UI/internal/user.GetTokenUser({0xc000cd7560, 0x8b}) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/user/user.go:46 +0x39 nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.AuthRequired.func8(0xc001d6a100) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/middleware.go:61 +0x156 nginx-ui[175678]: github.com/gin-gonic/gin.(*Context).Next(0xc001d6a100) nginx-ui[175678]: /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b nginx-ui[175678]: github.com/0xJacky/Nginx-UI/router.InitRouter.IPWhiteList.func4(0xc001d6a100) nginx-ui[175678]: /home/runner/work/nginx-ui/nginx-ui/internal/middleware/ip_whitelist.go:14 +0x4d nginx-ui[175678]: github.com/gin-gonic/gin.(*Context).Next(0xc001d6a100) nginx-ui[175678]: /home/runner/go/pkg/mod/github.com/gin-gonic/gin@v1.10.0/context.go:185 +0x2b nginx-ui[175678]: github.com/0xJacky/Ngi `
kerem 2026-03-01 15:35:58 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@0xJacky commented on GitHub (Oct 25, 2024):

beta.37 is coming soon, it should resolve this issue.

<!-- gh-comment-id:2436995548 --> @0xJacky commented on GitHub (Oct 25, 2024): beta.37 is coming soon, it should resolve this issue.
Author
Owner

@stig1102 commented on GitHub (Oct 25, 2024):

Hi,

Thx for the quick reply


Van: Jacky @.>
Verzonden: vrijdag 25 oktober 2024 08:36
Aan: 0xJacky/nginx-ui @.
>
CC: stig1102 @.>; Author @.>
Onderwerp: Re: [0xJacky/nginx-ui] runtime error: invalid memory address or nil pointer dereference (Issue #659)

beta.37 is coming soon, it should resolve this issue.


Reply to this email directly, view it on GitHubhttps://github.com/0xJacky/nginx-ui/issues/659#issuecomment-2436995548, or unsubscribehttps://github.com/notifications/unsubscribe-auth/A76LGQUIJHGBW6CZLHZPEALZ5HRGDAVCNFSM6AAAAABQSSCFDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZWHE4TKNJUHA.
You are receiving this because you authored the thread.Message ID: @.***>

<!-- gh-comment-id:2436997041 --> @stig1102 commented on GitHub (Oct 25, 2024): Hi, Thx for the quick reply ________________________________ Van: Jacky ***@***.***> Verzonden: vrijdag 25 oktober 2024 08:36 Aan: 0xJacky/nginx-ui ***@***.***> CC: stig1102 ***@***.***>; Author ***@***.***> Onderwerp: Re: [0xJacky/nginx-ui] runtime error: invalid memory address or nil pointer dereference (Issue #659) beta.37 is coming soon, it should resolve this issue. — Reply to this email directly, view it on GitHub<https://github.com/0xJacky/nginx-ui/issues/659#issuecomment-2436995548>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A76LGQUIJHGBW6CZLHZPEALZ5HRGDAVCNFSM6AAAAABQSSCFDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZWHE4TKNJUHA>. You are receiving this because you authored the thread.Message ID: ***@***.***>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-ui#4763
No description provided.