jfa-go icon indicating copy to clipboard operation
jfa-go copied to clipboard

wildcards must be named with a non-empty name in path

Open MauricioDoigo opened this issue 1 year ago • 3 comments

Sorry I don't know exactly how to explain it. I'm an extremely beginner, and I'm just following the step-by-step. The generated report follows. Thank you for your understanding and assistance.

Crash report:

"```

                    An attempt has been made to remove sensitive info, but make sure to check yourself.
                    jfa-go version: 0.5.1 (46566fb9)

Socket: /tmp/jfa-go.sock 2024/08/16 09:54:43 Using internal storage [INFO] 09:54:43 Connected to DB "CENSORED" [INFO] 09:54:43 Using Jellyfin server type [INFO] 09:54:44 Authenticated with "CENSORED" [INFO] 09:54:44 User daemon started [INFO] 09:54:44 Invite daemon started [INFO] 09:54:44 Starting password reset daemon [INFO] 09:54:44 Initializing router [INFO] 09:54:44 Loading routes

wildcards must be named with a non-empty name in path '"/http:/CENSORED".net/lang/:page' goroutine 1 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x64 main.Exit({0xa44820, 0x4000f07430}) /drone/src/exit.go:73 +0x248 main.start.func2() /drone/src/main.go:177 +0x2c panic({0xa44820, 0x4000f07430}) /usr/local/go/src/runtime/panic.go:890 +0x248 github.com/gin-gonic/gin.(*node).insertChild(0x400150f988?, {0x4000e6b860?, 0x40013639e0?}, {0x4000e6b860, 0x23}, {0x4001363a80, 0x4, 0x4}) /go/pkg/mod/github.com/gin-gonic/[email protected]/tree.go:309 +0xc88 github.com/gin-gonic/gin.(*node).addRoute(0x4000277c00, {0x4000e6b860?, 0x4000e6b860?}, {0x4001363a80?, 0x4001363a80?, 0x400005d400?}) /go/pkg/mod/github.com/gin-gonic/[email protected]/tree.go:158 +0x60 github.com/gin-gonic/gin.(*Engine).addRoute(0x40003531e0, {0xbe72f3, 0x3}, {0x4000e6b860, 0x23}, {0x4001363a80, 0x4, 0x4}) /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:335 +0x208 github.com/gin-gonic/gin.(*RouterGroup).handle(0x40003531e0, {0xbe72f3, 0x3}, {0x4000e6b7a0?, 0xa44820?}, {0x4000dfba20, 0x1, 0x1c6ec?}) /go/pkg/mod/github.com/gin-gonic/[email protected]/routergroup.go:89 +0x11c github.com/gin-gonic/gin.(*RouterGroup).GET(...) /go/pkg/mod/github.com/gin-gonic/[email protected]/routergroup.go:117 main.(*appContext).loadRoutes(0x40002c5000, 0x40003531e0) /drone/src/router.go:108 +0x250 main.start(0x0, 0x41?) /drone/src/main.go:550 +0x2b3c main.main() /drone/src/main.go:780 +0xcfc

                ```"

MauricioDoigo avatar Aug 16 '24 13:08 MauricioDoigo

i do have the same issue :(

2024/12/07 21:33:35 Using external storage jfa-go version: 0.5.1 (46566fb) Socket: /tmp/jfa-go.sock [INFO] 21:33:35 Connected to DB "/data/db" [INFO] 21:33:35 Using Jellyfin server type [INFO] 21:33:36 Authenticated with "https://CENSORED" [INFO] 21:33:36 Invite daemon started [INFO] 21:33:36 Initializing router [INFO] 21:33:36 User daemon started [INFO] 21:33:36 Starting password reset daemon [INFO] 21:33:36 Loading routes

wildcards must be named with a non-empty name in path '/https:/CENSORED/lang/:page' goroutine 1 [running]: runtime/debug.Stack() /usr/local/go/src/runtime/debug/stack.go:24 +0x5e main.Exit({0xeeb640?, 0xc0011a48f0}) /opt/build/exit.go:73 +0x2d6 main.start.func2() /opt/build/main.go:177 +0x25 panic({0xeeb640?, 0xc0011a48f0?}) /usr/local/go/src/runtime/panic.go:920 +0x270 github.com/gin-gonic/gin.(*node).insertChild(0x7f35da5785b8?, {0xc00117cc30?, 0xc000180000?}, {0xc00117cc30, 0x30}, {0xc001173840, 0x4, 0x4}) /go/pkg/mod/github.com/gin-gonic/[email protected]/tree.go:309 +0xd34 github.com/gin-gonic/gin.(*node).addRoute(0xc000295dc0, {0xc00117cc30?, 0xc00117cc30?}, {0xc001173840?, 0xc001173840?, 0xc000180000?}) /go/pkg/mod/github.com/gin-gonic/[email protected]/tree.go:158 +0x5a github.com/gin-gonic/gin.(*Engine).addRoute(0xc000347ba0, {0x109d272, 0x3}, {0xc00117cc30, 0x30}, {0xc001173840, 0x4, 0x4}) /go/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:335 +0x26d github.com/gin-gonic/gin.(*RouterGroup).handle(0xc000347ba0, {0x109d272, 0x3}, {0xc00117cc00?, 0xeeb640?}, {0xc0011a8120, 0x1, 0xc0010557a0?}) /go/pkg/mod/github.com/gin-gonic/[email protected]/routergroup.go:89 +0x145 github.com/gin-gonic/gin.(*RouterGroup).GET(...) /go/pkg/mod/github.com/gin-gonic/[email protected]/routergroup.go:117 main.(*appContext).loadRoutes(0xc0000cc000, 0xc000347ba0) /opt/build/router.go:108 +0x2c9 main.start(0x0, 0xa0?) /opt/build/main.go:550 +0x3717 main.main() /opt/build/main.go:780 +0xe39

Reaster0 avatar Dec 07 '24 21:12 Reaster0

it seems that's caused by the field "url_base" that don't support url starting by https:// or http:// ?

Reaster0 avatar Dec 07 '24 22:12 Reaster0

The problem is that url_base should be empty if you're using a subdomain like jfa.example.com. Just update your config.ini:

[ui]  
url_base =  

Then restart jfa-go, and it should work. If you're running it in a subdirectory (like jf.example.com/jfa), then you set url_base = "/jfa".

mkarimdev avatar Mar 11 '25 19:03 mkarimdev