More descriptive gRPC schema errors if possible
complete
Elias Hernandez
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)
Gregory Schier
complete
https://yaak.app/blog/2024.7.0
V
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;
}
V
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.
V
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) 👍🏼
V
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?
V
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
This error is improved in 2024.7.0-beta.2
Gregory Schier
in progress
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
Elias Hernandez
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.