Open
Description
We are seeing the following TypeError when using @authzed/authzed-node v1.3.1
with @grpc/grpc-js v1.13.3
:
TypeError: Cannot read properties of undefined (reading 'generateMetadata')
at LoadBalancingCall.doPick (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js:131:22)
at Object.updateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/internal-channel.js:224:26)
at ResolvingLoadBalancer.updateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js:273:35)
at Object.updateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js:177:22)
at ChildLoadBalancerHandler.ChildPolicyHelper.updateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js:50:50)
at RoundRobinLoadBalancer.updateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js:147:35)
at RoundRobinLoadBalancer.calculateAndUpdateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js:109:18)
at Object.updateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js:87:22)
at Object.updateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js:456:38)
at PickFirstLoadBalancer.updateState (/app/node_modules/.pnpm/@grpc+grpc-js@1.13.3/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js:351:35)
Our client is configured with the following options:
options = {
'grpc.service_config': JSON.stringify({
loadBalancingConfig: [{ round_robin: {} }],
}),
...options,
};
Our configuration was working when using @authzed/authzed-node v1.2.3
with @grpc/grpc-js v1.12.5
Activity
tstirrat15 commentedon Apr 18, 2025
@aldelucca1 I imagine this is related to the internals that we changed in
v1.3.0
. Can you show a bit more of the surrounding code? How are you setting up the client? Which field is thisoptions
object being handed to?aldelucca1 commentedon Apr 18, 2025
Sure, we wrap the client like this
tstirrat15 commentedon Apr 21, 2025
When you see this error, are you in a TLS environment?
I added a test in #222 - does that look like your usage to you? It seems to be passing, but that also only rules out one codepath.
aldelucca1 commentedon Apr 21, 2025
We are not using TLS when we see this error