nodejs-pubsub: UnhandledPromiseRejectionWarning: Error: Deadline exceeded

Environment details

  • OS: macOS 10.14.5
  • Node.js version: v10.16.0
  • npm version: 6.9.0
  • @google-cloud/pubsub version: “^0.30.1”,

Steps to reproduce

  1. download this repo as zip
  2. cd samples, npm i
  3. node subscriptions.js list
(node:88354) UnhandledPromiseRejectionWarning: Error: Deadline exceeded
    at Http2CallStream.call.on (/Users/mj/Downloads/nodejs-pubsub-master/samples/node_modules/@grpc/grpc-js/build/src/client.js:101:45)
    at Http2CallStream.emit (events.js:203:15)
    at process.nextTick (/Users/mj/Downloads/nodejs-pubsub-master/samples/node_modules/@grpc/grpc-js/build/src/call-stream.js:71:22)
    at process._tickCallback (internal/process/next_tick.js:61:11)
(node:88354) 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)
(node:88354) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

followed this guide to config auth, tried at least 3 times.

I’m sure GOOGLE_APPLICATION_CREDENTIALS and service_account are properly configured. because cloud-pubsub go examples works on my local laptop.

none of examples work at all. always got “Deadline exceeded”

btw, copied some code, deploy to cloud functions, can publish message to cloud pubsub

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 9
  • Comments: 24 (9 by maintainers)

Most upvoted comments

@bcoe Thanks for your reply. Yes I’m running behind a proxy. Actually, this exception makes the app in a state of not receiving messages at all.

Here the exception I got:

ackIds: [ 0: "TgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUSAAdnfjkORhoLazNcdQdRDRh0KWZza1sRVFMUWX9XWxENQGx-SgBVDR1ydGlybF8WBgFDU1bM4eqNyKT3RB1tNaO89r1ASpvFk7V0Zhs9WhJLLD5-MilFQV5AEkw5HERJUytDCypYEQ" ] code: 4 details: "Deadline exceeded"