Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
33.76k stars 1.88k forks source link

gRPC Server Reflection gives error message #6380

Open hawkaa opened 11 months ago

hawkaa commented 11 months ago

Expected Behavior

When I press "Click to use server reflection" I expect to get help to construct the requests going to my gRPC server.

Actual Behavior

I'm getting an error message "Uh Oh!" with the following info:

Error invoking remote method 'grpc.loadMethodsFromReflection': Error: 12 UNIMPLEMENTED: Method not found: grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo

Stack trace:

Error: Error invoking remote method 'grpc.loadMethodsFromReflection': Error: 12 UNIMPLEMENTED: Method not found: grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo
    at a.invoke (node:electron/js2c/renderer_init:2:7723)
    at async onClick (file:///Applications/Insomnia.app/Contents/Resources/app.asar/debug-89179a3a.js:21:2463)

Reproduction Steps

  1. Use the following proto file:
syntax = "proto3";

package datawriter.apis.v1;

service DataWriterService {
  rpc WriteStaticDataBytes (WriteStaticDataBytesRequest) returns (WriteStaticDataBytesResponse) {}
}

message WriteStaticDataBytesRequest {
  bytes payload = 1; 
}

message WriteStaticDataBytesResponse {
  string namespace = 3;
  string table_name = 4;
}
  1. Add it to Insomnia with "Click to change proto file".
  2. Click "Click to use Server Reflection"

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

2023.5.6

What operating system are you using?

macOS

Operating System Version

Ventura 13.4.1 (c)

Installation method

insomnia.rest

Last Known Working Insomnia version

n/a

duberton commented 4 months ago

One possible workaround is to enable server reflection. I've been running a gRPC server with 'io.github.lognet:grpc-spring-boot-starter:5.1.5' and managed to fix this issue by enabling it with the following property: 'grpc.enableReflection: true'

sahak1an commented 4 weeks ago

In the context of gRPC, reflection service refers to enabling the server reflection feature. gRPC server reflection is a protocol that allows gRPC servers to expose information about their defined services and message types at runtime.

https://grpc.io/docs/guides/reflection/

Spring boot grpc.enableReflection=true Quarkus quarkus.grpc.server.enable-reflection-service=true