fullstorydev / grpcurl

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

Fail to inspect custom `gRPC` server #432

Closed cmgsj closed 7 months ago

cmgsj commented 7 months ago

Listing available services works correctly.

$ grpcurl -plaintext localhost:9090 list    
demo.v1.DemoService
grpc.health.v1.Health
grpc.reflection.v1.ServerReflection
grpc.reflection.v1alpha.ServerReflection

However, describing a "custom" service fails, while the rest of the grpc.* services do not.

$ grpcurl -plaintext localhost:9090 describe demo.v1.DemoService                
Failed to resolve symbol "demo.v1.DemoService": proto: invalid syntax: "<unknown:0>"

Is this a know issue? Should I register only either v1 or v1alpha reflection services?

Related: https://github.com/fullstorydev/grpcui/issues/279

jhump commented 7 months ago

See #423. The issue is twofold: 1) Your server is written in Go, and is exhibiting these issues:

cmgsj commented 7 months ago

See #423. The issue is twofold:

  1. Your server is written in Go, and is exhibiting these issues:

  2. The above issues are triggered by one or more of the files in the schema you are trying to download use the wrong import path when importing a dependency. By "wrong", I mean they are using a path different than the one the file was actually compiled with (more details can be found here).

@jhump Thank you for the quick response 🙏 I fixed the import paths in my proto files based on the docs you referenced, and everything is now working as expected.

I will close this non-issue.