Local Retool Instance define GRPC services Error

Hi! I'm completley new to this so bear with me.

I am on a self hosted retool instance and I am trying to connect a GRPC api to my retool frontend. I am reading the guide here: Connect to gRPC

and I was just defining my GRPC services with .proto files.

In a file called common.proto, I have this:

syntax = "proto3";

message Person {
  string name = 1;
  int32 age = 2;
  repeated string hobbies = 3;

service GreetingService {
  rpc Greet(Person) returns (string);

Yet, when I spin up my Retool instance, I get this error message:

gRPC: Could not parse file: /usr/local/retool-git-repo/protos/common.proto Error: no such type: string

at Service.lookupType (/snapshot/retool_development/node_modules/protobufjs/src/namespace.js:383:15)

at Method.resolve (/snapshot/retool_development/node_modules/protobufjs/src/method.js:157:45) 

 at Service.resolveAll (/snapshot/retool_development/node_modules/protobufjs/src/service.js:111:20)

at Root.resolveAll (/snapshot/retool_development/node_modules/protobufjs/src/namespace.js:308:25)

at Root.resolveAll (/snapshot/retool_development/node_modules/protobufjs/src/root.js:258:43)

at Object.loadSync (/snapshot/retool_development/node_modules/@grpc/proto-loader/build/src/index.js:218:16)

at fromFileName (/snapshot/retool_development/backend/transpiled/common/proto/protoLoader.js)

at /snapshot/retool_development/backend/transpiled/common/proto/protoLoader.js

at Array.map (<anonymous>)

at /snapshot/retool_development/backend/transpiled/common/proto/protoLoader.js

at async setProtosFromDirectory (/snapshot/retool_development/backend/transpiled/common/protoParser.js)

I thought proto3 supported string types so I was a bit confused. Thanks.

Update: took away all string types, int32 gives the same error as well. Not sure what is going wrong. Did I do something wrong or something is wrong with the Proto parser?

Nevermind, I defined my .proto file incorrectly..

Greet cannot return string -_-

1 Like

@randsem thanks for posting this question and sharing back the root cause you figured out! This'll help others who might run into the same issue in the future :slightly_smiling_face: