Related to Google Protocol Buffers, borrows its name from the .proto file extension containing a protocol schema.
Questions tagged [proto]
564 questions
5
votes
1 answer
How to import .proto when working with prost and tonic in rust?
I'm trying to build a simple gRPC client in rust using crates prost and tonic. My proto definitions are quite simple, but I suddenly stuck with using messages imported from other proto.
// file src/protos/types.proto
syntax = "proto3";
package…

ie.
- 5,982
- 1
- 29
- 44
5
votes
1 answer
How to fix conflicts with this error message?
With go mod tidy I've updated protobuf to github.com//golang/protobuf@v1.4.0
my project uses github.com/ericchiang/k8s@v1.2.0
I build binary and when I try to run it I'm getting this panic error:
panic: mismatching message name: got…

Andriy Tymkiv
- 51
- 4
5
votes
2 answers
Transport failed error when using a Java based Grpc server with a C# based client
I am developing a java based Grpc server using spring boot (2.2.2) and the grpc-server-spring-boot-starter java library.
My client application is a C# application (netcoreapp3.1). Both the applications run on my laptop for this test.
This is my…

Aaron Dsouza
- 121
- 3
- 9
5
votes
1 answer
Changing protobuff optional field to oneof
I have the following message:
message Message {
int64 id = 1;
google.protobuf.FloatValue weight = 2;
google.protobuf.FloatValue override_weight = 3;
}
and I wish to change the type of weight and override_weight(optional fields) to…

Omri Shneor
- 965
- 3
- 18
- 34
5
votes
2 answers
Trying to generate proto to dart file
I'm trying to generated proto file to dart file with protoc-plugin follow this instruction https://grpc.io/docs/quickstart/dart/ but when I run this command line
protoc --dart_out=grpc:lib/proto…

hoangquyy
- 1,893
- 2
- 14
- 29
5
votes
2 answers
Read metadata in grpc on the server side c#
I am sending token in metadata from the client side
Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure);
ItemQuery item = new ItemQuery() { Id = "abc" };
var client = new MyService.MyServiceClient(channel);
…

abhi
- 1,059
- 9
- 19
5
votes
2 answers
Java gRPC get the service name from ServerInterceptor
I am using gRPC and I need to get the name of the service of the request from the ServerInterceptor but it seems it is not possible.
Basically from an implementation of ServerInterceptor I need to know the name of the ServiceGrpc (as a string) that…

db80
- 4,157
- 1
- 38
- 38
5
votes
0 answers
R stuck in loading sqldf package
I have been trying to use the sqldf package in R, but it simply stopped at loading required package "proto". Like this:
library(sqldf)
Loading required package: DBI
Loading required package: gsubfn
Loading required package: proto
I'm using R…

J S
- 113
- 2
- 6
4
votes
1 answer
Import multiple protobuf files with common message names in a single proto file
I have several protobuf files that share some message names and for this reason I cannot have all the generated go files in one folder as I run into issues like "..re-declared in this block". I attached a minimal go project how to reproduce this…

Andrei
- 7,509
- 7
- 32
- 63
4
votes
1 answer
Import proto files from classpath (JAR) to build another proto file
I want to import a proto file from a gradle dependencies and have next structure (simplified for redability):
dependency-project:
- models:
catalog.proto
my-project:
- source:
client.proto
In a client.proto I…

Aleksandr T
- 63
- 6
4
votes
1 answer
Mocking proto.Message in Go
I wrote a function that takes a list of proto.Message objects. Looking at the documentation, it seems like proto.Message wraps protoreflect.ProtoMessage which contains a single function, ProtoReflect() Message. Looking at the documentation for…

Woody1193
- 7,252
- 5
- 40
- 90
4
votes
1 answer
--go-grpc_out: protoc-gen-go-grpc: Plugin failed with status code 1
i am getting this error when i compile my proto file:
protoc-gen-go-grpc: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
\--go-grpc_out:…

Zohaib Asif
- 71
- 1
- 3
4
votes
1 answer
Optional support in Proto3 for Go
Does optional supports in proto3 while working with Go? I tried with this:
protoc person.proto --go_out=. --experimental_allow_proto3_optional
but got this error
person.proto: is a proto3 file that contains optional fields, but code generator…

Khushi
- 39
- 1
- 5
4
votes
1 answer
Import .proto files from another project
I want to import .proto file defined in different project into my golang project and use a message type defined in it.
Proto file I want to import is: https://github.com/lyft/clutch/blob/main/api/k8s/v1/k8s.proto
I have added the import statement as…

Michael
- 123
- 1
- 8
4
votes
1 answer
Protoc doesn't create service
I am just trying to generate code for golang using protocol buffer. But unable to generate the service using protoc command.
syntax = "proto3";
package greet;
option go_package="./greet/greetpb";
service GreetService{}
Above is a dummy proto file…

Satish Kumar
- 63
- 6