proto: duplicate proto type registered: google.protobuf.Empty

1,721 views
Skip to first unread message

Randall McPherson

unread,
Mar 8, 2016, 5:39:30 PM3/8/16
to Protocol Buffers
I'm seeing this error when running generated go code for grpc: proto: duplicate proto type registered: google.protobuf.Empty

It also occurs for other 'standard' types in the google.protobuf namespace.


How can this be prevent this in generated code? I'm happy to provide more details about the specific code if it helps. 

Feng Xiao

unread,
Mar 11, 2016, 6:33:04 PM3/11/16
to Protocol Buffers
The will happen if you run protoc twice on a proto file and include two copy of the generated file in your programs. The proto in question is included as part of protobuf library, so you don't need to run protoc on that one by yourself (otherwise you may get the error you see).
Reply all
Reply to author
Forward
0 new messages