postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.86k stars 841 forks source link

Could not load server reflection. Unknown error. #12941

Open SoftTacos opened 5 months ago

SoftTacos commented 5 months ago

Is there an existing issue for this?

Describe the Issue

When I attempt to use reflection on a grpc service that has reflection enabled, I receive the following error: Could not load server reflection. Unknown error.. I have server reflection enabled on my service. I have verified that it is working with grpc_cli and grpccurl. Both tools are able to list the endpoints via reflection. I just updated and restarted postman. There are no console logs

Since the error message isn't telling me anything helpful, I attempted to use 2 other tools to figure out what is wrong. But like I said, both of those tools are able to use reflection just fine. grpcurl -plaintext localhost:8081 list returns a list of servers. grpcurl -plaintext localhost:8081 list service.v1.Service returns a list of endpoints on the server. Similar commands work as expected with grpc_cli.

I can also import the proto just fine in postman. I have an import path added if that matters? I can provide that if it is useful. Once I have imported the proto, postman again works just fine. The error message isn't any help and I haven't found anything useful via searching. The only suggestion I've seen is to use the other 2 tools I mentioned, and both of those tools are working with my service.

Here is an example proto, I have changed the names of things and removed quite a few endpoints since the file is large. I don't think there is anything unusual in the missing endpoints and messages that would cause this situation.

syntax = "proto3";

package thing.v1;

option go_package = "gitlab.com/things/libraries/go/grpc/thing/v1";

import "google/protobuf/timestamp.proto";

import "geojson/v1/geojson.proto";
import "common/metrics/v1/metrics.proto";
import "common/pagination/v1/pagination.proto";

service Thing {
    rpc GetThings(GetThingsRequest) returns (GetThingsResponse);
}

message GetThingsRequest {
    GetThingsFilters filters = 1;
    pagination.v1.Params pagination = 2;
}

message GetThingsFilters {
    repeated string thing_ids = 1;
}

message GetThingsResponse {
    repeated Thing things = 1;
    pagination.v1.Response pagination = 2;
}

message Thing {
    string name = 1;
}

I can include the imported proto definitions if you would like.

I removed my health check endpoint as well and am still getting the same errors.

I checked the other issues pertaining to reflection and didn't see anything that seemed useful or pertinent. Could someone offer advice on what I might be doing wrong? If I'm missing some information here please let me know and I'll happily provide it.

Steps To Reproduce

Screenshots or Videos

Screenshot 2024-06-13 at 10 28 41 AM

Operating System

macOS

Postman Version

11.1.25

Postman Platform

Postman App

User Account Type

Signed In User

Additional Context?

No response

SoftTacos commented 5 months ago

I apologize, after submitting the post I of course found another, much older issue, that looks very similar. The issue is: https://github.com/postmanlabs/postman-app-support/issues/10844

Please let me know if you want me to remove this.