Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Getting '(node:6) UnhandledPromiseRejectionWarning: Error: 14 UNAVAILABLE: No connection established' #1174

@sidd-kulk

Description

@sidd-kulk

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

API: Google pub sub node API, version 1.1.6
Environment: Kubernetes with docker
Docker Image OS:
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.12.3

Code:

const flowControlOptions = {
    flowControl: { maxMessages: 10 }
  };

    const subscription = await pubsubClient.subscription(
    '/projects/my-topic/my-subscription',
    flowControlOptions
  );

Error:

(node:6) UnhandledPromiseRejectionWarning: Error: 14 UNAVAILABLE: No connection established
    at Object.callErrorFromStatus (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/call.js:30:26)
    at Object.onReceiveStatus (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/client.js:390:49)
    at Object.onReceiveStatus (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:304:181)
    at Http2CallStream.outputStatus (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/call-stream.js:116:74)
    at Http2CallStream.maybeOutputStatus (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/call-stream.js:155:22)
    at Http2CallStream.endCall (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/call-stream.js:141:18)
    at Http2CallStream.cancelWithStatus (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/call-stream.js:457:14)
    at ChannelImplementation.tryPick (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/channel.js:237:32)
    at ChannelImplementation._startCallStream (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/channel.js:267:14)
    at Http2CallStream.start (/app/node_modules/@google-cloud/pubsub/node_modules/@grpc/grpc-js/build/src/call-stream.js:435:22)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the googleapis/nodejs-pubsub API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions