angular-nest-grpc
angular-nest-grpc copied to clipboard
Reflections Service not implemented
I tried grpc_cli ls
per your instructions (I'm familiar with it). Seems like Reflections
was not installed in the server? BTW grpc_call...
worked fine. This is a cool project,thanks.
~/angular-nest-grpc$ grpc_cli ls localhost:50051
D0519 18:36:43.332412210 5696 ev_posix.cc:169] Using polling engine: epollex
D0519 18:36:43.332473558 5696 dns_resolver.cc:338] Using native dns resolver
D0519 18:36:43.332562163 5696 dns_resolver.cc:279] Start resolving.
I0519 18:36:43.333143564 5696 subchannel.cc:841] New connected subchannel at 0xca4970 for subchannel 0x7f6608002e80
Received an error when querying services endpoint.
I0519 18:36:43.333755422 5696 proto_reflection_descriptor_database.cc:47] Reflection request not implemented; is the ServerReflection service enabled?
I0519 18:36:43.333767009 5696 proto_reflection_descriptor_database.cc:51] ServerReflectionInfo rpc failed. Error code: 12, details: RPC method not implemented /grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo
```
Thanks Chris, glad the project is useful!
I wasn't aware of Reflection functionality but found the documentation: "The primary usecase for server reflection is to write (typically) command line debugging tools for talking to a grpc server." https://github.com/grpc/grpc/blob/master/doc/server-reflection.md
I'm not familiar with the approach, buts seems by reading that article that it is not implemented in NodeJS yet. The issue open for it: https://github.com/grpc/grpc-node/issues/79
So it doesn't looks like I can add support for it. Unless using a library like Protobuf.js which seems to support: https://github.com/protobufjs/protobuf.js#using-reflection-only
But I'm using NestJS which is it's own framework!
Hi @kmturley , Yeah, you have to enable Reflections as a service into the gRPC server itself. It's shame this doesn't come baked into nodejs or NestJs. It's a piece of cake in Python, a couple lines of code. I love it. I actually don't intend to use a JS-based server so this isn't a problem for me. I do want to try Angular, grpc-web and envoy, but with a different gRPC server, not necessarily even under my control. So your project is a great starting point. I especially like how you illustrated using docker-compose to make it a snap to get going.
Thanks, Chris.
No problem! If I have time I will definitely investigate this though, seems like it could be a useful feature.
The docker compose file makes it really quick and portable! Should be easy to swap out for a python server!