You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Type error when creating grpc client with RoundRobin load balancing policy #221
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:
@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 this options object being handed to?
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 thisoptionsobject 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
coreyvanpw commentedon Jul 17, 2026
Is there a solution to this? I'm running into this with v1.6.1 and grpc-js@1.14.3
Edit: never mind, this was a configuration problem masquerading as a code problem