Hi guys!
# spicedb
t
Hi guys! I'm trying to implement the node grpc client but I'm receiving
"Error: 12 UNIMPLEMENTED: Received http STATUS CODE 404"
From the traces, I'm hitting
/authzed.api.v1.PermissionService/CheckPermission
, which seems correct. Any ideas what could it be? I'm hosting my own spicedb instance. The grpc port is 50051, right?
t
@Joey , yes! I'm using authzed-node client
j
sounds like you might be hitting the wrong port
I'd verify with the
zed
command line
t
Which command can I use to verify that?
j
any
zed
permissions command should work
t
The grpc api default port is 50051, correct?
j
yes
but the operator exports on its own endpoint
t
We are not using the operator currently
j
how are you running SpiceDB?
t
We run the spicedb image
Btw, we just tried the cli and it worked. The port is correct
Is there another config in the node client that we should be aware of? I'm currently using the plaintext flag:
Copy code
this.client = v1.NewClient(
      serverToken,
      serverUrl,
      v1.ClientSecurity.INSECURE_PLAINTEXT_CREDENTIALS,
    );
If the following command works:
Copy code
zed schema read --endpoint spicedb.foundations:50051 --token my-secret-token
Then the
serverUrl
to be used on the node client should also be
spicedb.foundations:50051
, correct?
On the span that I sent, it says
gateway
. This means the REST gateway that is also served, right? Cause it seems that I'm hitting the REST port (80), even though on the span says 50051
j
REST gateway has its own port
and should not be used unless you cannot use gRPC for some reason
t
Yeah, we are transitioning to grpc. That's why I've beem trying out the node-client. However I'm getting this
"Error: 12 UNIMPLEMENTED: Received http STATUS CODE 404"
I just tested locally and it seems to work fine...
We tested running the zed client with SSH and it also worked. We managed to reproduce the error message when using the zed client against the REST gateway port
So it seems that the node client (when running inside kubernetes) is hitting the rest port for some reason
I got this log also:
Copy code
[2025-06-02T17:48:58.947Z] "POST /authzed.api.v1.PermissionsService/CheckPermission HTTP/1.1" 404 - "-" 0 0 "grpc-node-js/1.13.4"
j
> when using the zed client against the REST gateway port
you can't use the zed client, nor the client lib, against the REST gateway
they both only speak gRPC
t
We found out the problem. It was our virtual service mapping
j
ah