Closed NGuldager closed 6 months ago
What server implementation is returning that from the reflection endpoint? This seems like a clear bug in the reflection endpoint. If the type references are not qualified, they are not valid.
What server implementation is returning that from the reflection endpoint? This seems like a clear bug in the reflection endpoint. If the type references are not qualified, they are not valid.
We're using nestjs. But the grpcui is getting the correct namespace on the same server using reflection only. So I don't think it's in the server. But I might be wrong
But the grpcui is getting the correct namespace on the same server using reflection only.
This seems rather hard to understand since grpcui uses grpcurl as a library, and uses the exact same code to load/process the schemas.
What version of grpcurl and what version of grpcui?
After spending most of my day yesterday debugging and diving down into the code of various libraries. The issues seems to be with how protobufjs generates the binaries vs how protoc does.
From my understanding of grpcurl and grpcui, and please correct me if I'm wrong:
When using -protoset-out
in grpcurl it just saves the descriptor exactly like the server reflection returns.
While grpcui uses GetFullyQualifiedName
from protoreflect that does more than just show the type directly from the binary. Which also happens in grpcui, but only for the displayed values in the terminal, and not for the binary.
The issues seems to be with how protobufjs generates the binaries vs how protoc does.
Closing because I don't think this is caused by grpcurl
Using -protoset-out to generate descriptors does not seem to keep namespaces for types when using reflection.
When comparing the descriptors using
protoc --decode_raw
for the same service using either the.proto
file or reflection the field looks as followsUsing reflection on the same server using https://github.com/fullstorydev/grpcui it sees that the namespace is definitely available for reflection:
Generating grpc clients fails if the namespace is not available, for a lot of reasons using the
.proto
file directly is not easily achievable, so getting the full type to the descriptors is highly preferable