0

I can't figure out why web calls do not find the service GetNodeChannels.

I have registered the server with the associated services here: https://github.com/lncapital/lnc/blob/frontend/cmd/lnc/lnc.go#L158-L168

And I'm creating the server struct and attaching the method here: https://github.com/lncapital/lnc/blob/frontend/server/server.go

However neither reflection nor grpc-web seems to recognize them. Reflection simply does not show them and web calls respons with Error: unknown service lncrpc.lncrpc

Normal grpc calls work, but reflection and the web wrapped server does not.

Also: when I call: fmt.Printf("%v", grpcServer.GetServiceInfo()) I get this in the terminal:

map[lightning.lncrpc:{[{GetNodeChannels false false}] lncrpc.proto}]

However I have never mentioned lightning anywhere. I do however import a proto file named lightning.proto in my proto file here: https://github.com/lncapital/lnc/blob/frontend/proto/lncrpc.proto#L3

Ole Henrik Skogstrøm
  • 6,353
  • 10
  • 57
  • 89
  • Have you gotten this to work since posting? What do you mean "reflection simply does not show them"? What reflection APIs / etc are you invoking to see them? Are you using grpcurl or grpc_cli? – Doug Fawley Dec 20 '21 at 22:14
  • I got the gprc-web to work. Have not had time to dig further in to reflection. It might be that I don't get "Evans" (grpc-cli reflection thing) to work. What tools do you use to test out reflection? – Ole Henrik Skogstrøm Jan 09 '22 at 09:39
  • `grpcurl` works well. – Doug Fawley Jan 10 '22 at 17:12

0 Answers0