fullstorydev / grpcurl

Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers
MIT License
10.96k stars 508 forks source link

BUG - Failed to list methods for service "tamama.grpc.Tamama": Symbol not found: tamama.grpc.Tamama #433

Closed tamama closed 1 year ago

tamama commented 1 year ago

Hi there,

There seems to be an issue with grpcul / grpcui listing methods...

gRPC server+reflection is written in C++ (gRPC version = 1.59.2; grpcrul = 1.8.9)

Listing service is OK

$ grpcurl -plaintext 127.0.0.1:31201 list
grpc.reflection.v1alpha.ServerReflection
tamama.grpc.Tamama

but listing methods is NOT OK:

$ grpcurl -plaintext 127.0.0.1:31201 list tamama.grpc.Tamama
Failed to list methods for service "tamama.grpc.Tamama": Symbol not found: tamama.grpc.Tamama
tamama commented 1 year ago

@jhump FYI

tamama commented 1 year ago

I answer my own question.

Quick fix: The bug is resolved after I combine all the types into one gigantic proto file.

:)

jhump commented 1 year ago

@tamama, it is not necessary to combine everything into one file. Most likely, something else was amiss before your refactor. The most common issue that causes issues with server reflection is using incorrect import paths. The path that you use to compile a file must be the same path that other files use to import it. A mismatch will cause runtime issues with reflection. You can read more about this here.

tamama commented 1 year ago

Thanks!