Getting panic: proto: extension number 1042 is already registered on message google.protobuf.FileOptions

288 views
Skip to first unread message

Roopan M

unread,
Dec 24, 2023, 11:07:07 PM12/24/23
to golang-nuts
Hi Team,

When I try to run the docker compose up, getting the below issue for one of the container related to proto buf extension.

Please help to resolve,

service-cms-1        | panic: proto: extension number 1042 is already registered on message google.protobuf.FileOptions
service-cms-1        | See https://protobuf.dev/reference/go/faq#namespace-conflict
service-cms-1        |
service-cms-1        |
service-cms-1        | goroutine 1 [running]:
service-cms-1        | google.golang.org/protobuf/reflect/protoregistry.glob..func1({0x23c0160?, 0xc000467e20?}, {0x23c0160?, 0xc000467e20})
service-cms-1        |  /builder/grpc/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:56 +0x1ee
service-cms-1        | google.golang.org/protobuf/reflect/protoregistry.(*Types).RegisterExtension(0xc00011a6f0, {0x23f1cb0, 0x32e1920})
service-cms-1        |  /builder/grpc/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go:554 +0x2ef
service-cms-1        | github.com/golang/protobuf/proto.RegisterExtension(...)
service-cms-1        |  /builder/grpc/vendor/github.com/golang/protobuf/proto/registry.go:279
service-cms-1        | github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options.init.0()
service-cms-1        |  /builder/grpc/vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options/annotations.pb.go:70 +0x32

Kevin Chowski

unread,
Dec 26, 2023, 11:05:25 PM12/26/23
to golang-nuts
Please provide some more information about what you are trying to do, and how to reproduce your problem from scratch. Otherwise it will be hard to provide you any help at all. For example, what code are you using? What commands are you running? What goal are you trying to accomplish in the first place?

P.M. Roopan

unread,
Dec 28, 2023, 2:10:34 AM12/28/23
to golang-nuts
I got the issue resolved, I was having 2 protobuf package. So I have uninstalled one and it worked fine. 

Thanks,
Roopan

Reply all
Reply to author
Forward
0 new messages