Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent TypeError in load balancer handlers #2379

Closed
SamCB-CT opened this issue Mar 3, 2023 · 2 comments
Closed

Intermittent TypeError in load balancer handlers #2379

SamCB-CT opened this issue Mar 3, 2023 · 2 comments
Assignees

Comments

@SamCB-CT
Copy link

SamCB-CT commented Mar 3, 2023

Problem description

Since updating a few google-cloud sdks, resulting in gRPC updates, we've been receiving intermittent errors with the following stack trace.

/app/node_modules/@grpc/grpc-js/build/src/subchannel-address.js:22
    return 'port' in address;
                  ^

TypeError: Cannot use 'in' operator to search for 'port' in undefined
    at isTcpSubchannelAddress (/app/node_modules/@grpc/grpc-js/build/src/subchannel-address.js:22:19)
    at subchannelAddressEqual (/app/node_modules/@grpc/grpc-js/build/src/subchannel-address.js:26:9)
    at /app/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js:329:109
    at Array.every (<anonymous>)
    at PickFirstLoadBalancer.updateAddressList (/app/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js:329:37)
    at ChildLoadBalancerHandler.updateAddressList (/app/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js:108:23)
    at Object.onSuccessfulResolution (/app/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js:177:40)
    at /app/node_modules/@grpc/grpc-js/build/src/resolver-dns.js:187:31

These errors have been seen across numerous containers, numerous environments in small bursts within a few minutes of each other.

May be related: #2369

We've since pinned backed to 1.8.7.

Reproduction steps

When upgrading from 1.8.7 to 1.8.11, because of upgrades to:

  • @google-cloud/pubsub
  • @google-cloud/speech
  • @google-cloud/translate

Type errors intermittently occur.

Environment

  • OS name, version and architecture: Kubernetes
  • Node version 16.19.1
  • Node installation method - docker: node:16-alpine
  • Package name and version - @grpc/grpc-js@1.8.11

Additional context

@murgatroid99
Copy link
Member

I published a fix for this in version 1.8.12. Please try it out.

@lawrenceong
Copy link

Confirmed there are no issues for about 2 weeks since fix was made. Thanks @murgatroid99.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants