insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

gRPC Server Reflection gives error message

Open hawkaa opened this issue 2 years ago • 2 comments

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

hawkaa avatar Aug 24 '23 06:08 hawkaa

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'

duberton avatar Feb 24 '24 17:02 duberton

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

sahak1an avatar Jun 24 '24 08:06 sahak1an