Yaak Logo
Yaak
Feedback/More descriptive gRPC schema errors if possible

More descriptive gRPC schema errors if possible

Elias Hernandez·3 years ago
ReleasedBug

It seems like right now some schemas may fail to import for some random reason. All the error gives is "invalid format". I've validated the file using protoc and it completely builds the file to the proper language.

Is it possible to give a more in-depth error on what exactly is going on here?

Version 2024.6.6 (20240618.001507)


Comments (12)

Sign in to leave a comment.

Elias HernandezOP

Looking more in depth now it seems like the file itself was not the problem, but the fact that I had no url set in the request before trying to import the proto file. The "invalid format" here makes you think that the proto file is incorrectly formatted.

Gregory Schier

I was going to say, this looks a URL-formatting error from when Yaak tries to perform reflection on the schema. I'll make this more clear

Gregory Schier

This error is improved in 2024.7.0-beta.2

Vasilii

Can i get more information, what happened?

An example of a proto-file:

syntax = "proto3";import "google/protobuf/struct.proto";option go_package = "./product-service;products";package products;service ProductService {    rpc GetTest(SkuRequest) returns (ProductInfo);    }message SkuRequest {    string sku = 1;    }message ProductInfo {        uint32 id = 1;}
Vasilii

So… problem with import import "google/protobuf/struct.proto";

Gregory Schier

Vasilii: This seems to work on the Mac release. Let me test on Windows.

Vasilii

Gregory Schier

is there a debug log recording what command is used in the call protoc?

Gregory Schier

Vasilii: There is not, but I just added more logging in my dev branch and am just testing a fix now (I was able to reproduce) 👍🏼

Vasilii

Gregory Schier

thx in beta.8 - fixed

but for "server reflection" it doesn't work. loading all the time (see gif)

Gregory Schier

Vasilii: Glad it's fixed! Does your server support reflection? Just to clarify, you can send gRPC calls to your server but reflection hangs forever?

Vasilii

Gregory Schier

yes, for example grpccox (https://github.com/gusaul/grpcox) - correct, detected by reflection (see pic)

when I add a protoc file, the request is sent successfully (but there is a problem with the big response - this is written here https://yaak.canny.io/feedback/p/grpc-freezed-on-big-response)

with grpccox everything works as expected

Gregory Schier
Type to search feedback...