Issue running grpc-dynamic-gateway
See original GitHub issueI am having some issues using grpc-dynamic-gateway, and I was hoping to get some ideas or help from you on getting things working (or tell me if I’m doing something wrong).
My own proto file is failing, but I tried to run it against the example/api.proto file in the repository, and I am getting the same service.children error, as ‘children’ on the service instance seems to be undefined.
C:\ grpc-dynamic-gateway-master>node example example/api.proto 5050 ./example/api.js
C:\grpc-dynamic-gateway-master\example\index.js:35
**proto[p][t].service.children.forEach(c => {**
^
**TypeError: Cannot read property 'forEach' of undefined**
at Object.keys.forEach.t (C:\Users\graham\Desktop\grpc-dynamic-gateway-master\grpc-dynamic-gateway-master\example\index.js:35:35)
at Array.forEach (native)
at Object.keys.forEach.p (C:\Users\graham\Desktop\grpc-dynamic-gateway-master\grpc-dynamic-gateway-master\example\index.js:32:25)
at Array.forEach (native)
at Object.<anonymous> (C:\Users\graham\Desktop\grpc-dynamic-gateway-master\grpc-dynamic-gateway-master\example\index.js:31:20)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
A few questions:
- Do you know why I would get an error like that?
- You have a an empty stubbed out annotations.proto file with your test.proto a. Why is it stubbed instead of the one from grpc-gateway? b. With the stub, the http options attribute wouldn’t parse it seems, or am I missing something?
- The install docs for grpc-dynamic-gateway says to do this: a. npm -g grpc-dynamic-gateway b. I presume it’s a typo and it should be npm install?
Thank you, Graham
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
An all-in-one guide to gRPC-Gateway - LogRocket Blog
gRPC -Gateway is a plugin that generates a reverse proxy server for gRPC services that convert Restful/JSON into gRPC and vice versa.
Read more >How to Interact With and Debug a gRPC Server - Medium
Let's learn how to interact with and debug a gRPC server. An issue with gRPC and protobuf, if you are used to REST-like...
Read more >gRPC Gateway - Earthly Blog
So today, I'm going to build a gRPC gateway that accepts HTTP requests and proxies it through to my gRPC service.
Read more >Customizing your gateway | gRPC-Gateway - GitHub Pages
Routing Error handler ... To override the error behavior when *runtime.ServeMux was not able to serve the request due to routing issues, use...
Read more >Configuring a gRPC Service - v3.1.x - Kong Docs
Issue the following request to create a gRPC route: curl -XPOST localhost:8001/services/grpc/routes \ --data protocols= ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry for taking so long to get back to this; grpc-dynamic-gateway seems to work now after your changes. Thank you!
Maybe try just running on the console something like this:
after you do
npm i -g grpcnode
to get grpc-client in your path.