authzed / authzed-node

Official SpiceDB client library for NodeJS
https://authzed.com/docs/reference/api
Apache License 2.0
47 stars 18 forks source link

Occasional `Received RST_STREAM with code 2` error #77

Open svenefftinge opened 11 months ago

svenefftinge commented 11 months ago

We are using @authzed/authzed-node@0.12.1 and @grpc/grpc-js@1.9.1 with SpiceDB v1.22.2 and are seeing occasional (<0.1% of all calls) internal error responses of the kind below:

Error: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)
    at callErrorFromStatus (/app/node_modules/@grpc/grpc-js/src/call.ts:82:17)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/src/client.ts:611:51)
    at /app/node_modules/@grpc/grpc-js/src/call-interface.ts:149:27
    at Object.onReceiveStatus (/app/node_modules/@gitpod/gitpod-protocol/src/util/grpc.ts:80:29)
    at InterceptingListenerImpl.onReceiveStatus (/app/node_modules/@grpc/grpc-js/src/call-interface.ts:145:19)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/src/client-interceptors.ts:419:48)
    at /app/node_modules/@grpc/grpc-js/src/resolving-call.ts:132:24
    at processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
    at Proxy.makeServerStreamRequest (/app/node_modules/@grpc/grpc-js/src/client.ts:594:42)
    at Proxy.readRelationships (/app/node_modules/@authzed/authzed-node/src/authzedapi/authzed/api/v1/permission_service.grpc-client.ts:118:21)
    at /app/node_modules/@authzed/authzed-node/src/util.ts:141:35
    at new Promise (<anonymous>)
    at Proxy.<anonymous> (/app/node_modules/@authzed/authzed-node/src/util.ts:139:12)
    ...
jzelinskie commented 11 months ago

Have you tried SpiceDB v1.25? We've got reports from other folks that this version resolved this issue.