Yaak Logo
Yaak
Feedback/gRPC schema hangs on Inspecting Schema

gRPC schema hangs on Inspecting Schema

Murph Finnicum·2 years ago
ReleasedBug

I’m trying to load the schema for a gRPC service, and it goes “Inspecting Schema” and spins forever.

On the command line, there’s a single related line of output:
```
add file descriptor proto: entity/variant/v1/get_variant_request.proto: imported file 'entity/variant/v1/variant_id.proto' has not been added
```
Using the grpcurl tool, I can view the schema for these messages over reflection:

```

murph@realwork backend % grpcurl -plaintext localhost:8080 describe entity.variant.v1.VariantEntityService.GetVariant
entity.variant.v1.VariantEntityService.GetVariant is a method:
rpc GetVariant ( .entity.variant.v1.GetVariantRequest ) returns ( .entity.variant.v1.GetVariantResponse );
murph@realwork backend % grpcurl -plaintext localhost:8080 describe .entity.variant.v1.GetVariantRequest              
entity.variant.v1.GetVariantRequest is a message:
message GetVariantRequest {
 .entity.variant.v1.VariantId id = 1;
}
murph@realwork backend % grpcurl -plaintext localhost:8080 describe .entity.variant.v1.VariantId                      
entity.variant.v1.VariantId is a message:
message VariantId {
 string value = 1;
}
```


Comments (5)

Sign in to leave a comment.

Gregory Schier

To clarify, gRPC reflection hangs forever and, when manually adding proto files, it also doesn’t work?

Is it possible to provide a sample project I can use to reproduce the issue?

Hao Xiang

I have fixed this here https://github.com/yaakapp/app/pull/130. Could you review it?

Hao Xiang

how to reproduce

use server reflection implemented by golang

proto

from gRPC-gateway https://grpc-ecosystem.github.io/grpc-gateway/docs/tutorials/adding_annotations/

syntax = "proto3";

package helloworld;

import "google/api/annotations.proto";

// Here is the overall greeting service definition where we define all our endpoints
service Greeter {
  // Sends a greeting
  rpc SayHello (HelloRequest) returns (HelloReply) {
    option (google.api.http) = {
      post: "/v1/example/echo"
      body: "*"
    };
  }
}

// The request message containing the user's name
message HelloRequest {
  string name = 1;
}

// The response message containing the greetings
message HelloReply {
  string message = 1;
}

log

thread 'tokio-runtime-worker' panicked at /home/hxzhao/Project/RustProject/yaakapp/src-tauri/yaak_grpc/src/proto.rs:212:14:
add file descriptor proto: google/api/annotations.proto: imported file 'google/api/http.proto' has not been added
stack backtrace:
   0: rust_begin_unwind
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/std/src/panicking.rs:652:5
   1: core::panicking::panic_fmt
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/panicking.rs:72:14
   2: core::result::unwrap_failed
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/result.rs:1654:5
   3: core::result::Result<T,E>::expect
             at /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/result.rs:1034:23
   4: yaak_grpc::proto::file_descriptor_set_by_filename::{{closure}}
             at ./yaak_grpc/src/proto.rs:211:9
   5: yaak_grpc::proto::file_descriptor_set_from_service_name::{{closure}}
             at ./yaak_grpc/src/proto.rs:178:70
   6: yaak_grpc::proto::fill_pool_from_reflection::{{closure}}
             at ./yaak_grpc/src/proto.rs:110:81
   7: yaak_grpc::manager::GrpcHandle::reflect::{{closure}}
             at ./yaak_grpc/src/manager.rs:195:50
   8: yaak_grpc::manager::GrpcHandle::services::{{closure}}
             at ./yaak_grpc/src/manager.rs:212:44

reason

files_for_symbol_name and files_for_file_name impl in golang will return multi FileDescriptorProto but not in topology order. So pool.add_file_descriptor_proto will get error.

Gregory Schier
iGoStats

I was about to create a new ticket, but this is exactly what happens to me now with the beta version 5.5. Rolled back to 5.4 which I used last week, and it was fine - and it is still fine, so I’ll keep it for now. Please check if the issue had re-appeared in 5.5.

Type to search feedback...