Hi!
I am trying to connect nakama via GRPC using Retool () and I get this error when I try to import apigrp.proto.
The line is: nakama/apigrpc.proto at b833c2d0c5ecdd38625f46a1a1341b70644b5588 · heroiclabs/nakama · GitHub
I have tracked that error here:
opened 08:44AM - 14 Jan 21 UTC
protobuf.js version: <6.10.2>
actual:
UnhandledPromiseRejectionWarning: Err… or: illegal name ';'
expect:
parse option correct
```js
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
host: "xxxxx";
info: {
title: "xxxxxxx";
version: "xxxxx";
description: "xxxxxx";
};
schemes: HTTP;
schemes: HTTPS;
consumes: "application/json";
produces: "application/json";
};
```
```
UnhandledPromiseRejectionWarning: Error: illegal name ';' (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/protos/channel_backend/channel_backend.proto, line 22)
at illegal (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/src/parse.js:96:16)
at parseOptionValue (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/src/parse.js:570:27)
at parseOption (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/src/parse.js:560:27)
at parse (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/src/parse.js:750:17)
at process (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/src/root.js:127:30)
at fetch (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/src/root.js:178:13)
at Root.load (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/src/root.js:206:13)
at Root.loadSync (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/src/root.js:247:17)
at main (/Users/duwenjie/dwj/laiye-repos/laiye-remote/packages/web/node_modules/protobufjs/cli/pbjs.js:235:18)
at internal/util.js:278:30
(node:87401) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:87401) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
Is there a workaround to this? Am I doing something wrong? Will it be fixed?
Hey Matias, why are you parsing the apigrpc.proto
file? That is intended to just be used by Nakama. Have you looked at using any of our SDKs to communicate with Nakama?Also, if you plan on using gRPC with Heroic Cloud you will need to contact us at support@heroiclabs.com .
@lugehorsam
Hi!
What I was trying to do is to connect to Nakama from Retool via gRPC. It is possible to connect to a self-hosted Nakama instance via gRPC?
Yes this is possible – what is the coding language/environment for that you are using in Retool?
Hi @lugehorsam !
Retool (https://retool.com/ ) is a low-code platform for building internal tools. It is compatible with gRPC and I need to provide a .proto file in order to be able to connect Nakama.
I see, interesting. Well it looks like this is a bug in protobuf.js
, right? So you’ll either have to wait for that to be resolved or, if Retool provides a coding environment besides Node, you can use one of our SDKs in that environment.