protobuf slice bounds out of range panic
What happened:
i just download this "Hello World" template and try to learn how to use it, then i build the project run the bin and panic: runtime error: slice bounds out of range [-1:] to downgrade the protobuf ? maybe i guess...
What you expected to happen:
to run the template service, i did no changes, just run as it was.
How to reproduce it (as minimally and precisely as possible):
just build the template and run will get PS C:\Users_\Desktop\go_> .\bin\Acheron.exe -conf ./configs 2026/07/19 23:53:03 maxprocs: Leaving GOMAXPROCS=24: CPU quota undefined panic: runtime error: slice bounds out of range [-1:]
goroutine 1 [running]: google.golang.org/protobuf/internal/filedesc.(*File).unmarshalSeed(0xc000161c20, {0x7ff7c5f9ba40, 0x35d, 0x35d}) C:/Users//go/pkg/mod/google.golang.org/[email protected]/internal/filedesc/desc_init.go:110 +0x1770 google.golang.org/protobuf/internal/filedesc.newRawFile({{0x7ff7c5dbf69a, 0x15}, {0x7ff7c5f9ba40, 0x35d, 0x35d}, 0x0, 0x7, 0x0, 0x0, {0x7ff7c607ecc8, ...}, ...}) C:/Users//go/pkg/mod/google.golang.org/[email protected]/internal/filedesc/desc_init.go:30 +0x1f3 google.golang.org/protobuf/internal/filedesc.Builder.Build({{0x7ff7c5dbf69a, 0x15}, {0x7ff7c5f9ba40, 0x35d, 0x35d}, 0x0, 0x7, 0x0, 0x0, {0x7ff7c607ecc8, ...}, ...}) C:/Users//go/pkg/mod/google.golang.org/[email protected]/internal/filedesc/build.go:105 +0xf8 google.golang.org/protobuf/internal/filetype.Builder.Build({{{0x7ff7c5dbf69a, 0x15}, {0x7ff7c5f9ba40, 0x35d, 0x35d}, 0x0, 0x7, 0x0, 0x0, {0x0, ...}, ...}, ...}) C:/Users//go/pkg/mod/google.golang.org/[email protected]/internal/filetype/build.go:138 +0x185 Acheron/internal/conf.file_conf_conf_proto_init() C:/Users//Desktop/go//internal/conf/conf.pb.go:512 +0x178 Acheron/internal/conf.init.0() C:/Users//Desktop/go//internal/conf/conf.pb.go:494 +0xf
Anything else we need to know?:
Environment:
- Kratos version (use
kratos -v):kratos version v3.0.0 - Go version (use
go version):go version go1.25.7 windows/amd64 - OS (e.g:
cat /etc/os-release):windows 11 - Others:
Source: go-kratos/kratos