nodejs-firestore icon indicating copy to clipboard operation
nodejs-firestore copied to clipboard

on large amount of firestore reads getting ECONNRESET

Open michaelAtCoalesce opened this issue 3 years ago • 2 comments

/Users/alex/node-firestore-import-export/node_modules/@grpc/grpc-js/build/src/call.js:31
    return Object.assign(new Error(message), status);
                         ^

**Error: 16 UNAUTHENTICATED: Failed to retrieve auth metadata with error: request to https://www.googleapis.com/oauth2/v4/token failed, reason: read ECONNRESET**
    at Object.callErrorFromStatus (/Users/alex/node-firestore-import-export/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/Users/alex/node-firestore-import-export/node_modules/@grpc/grpc-js/build/src/client.js:189:52)
    at Object.onReceiveStatus (/Users/alex/node-firestore-import-export/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)
    at Object.onReceiveStatus (/Users/alex/node-firestore-import-export/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
    at /Users/alex/node-firestore-import-export/node_modules/@grpc/grpc-js/build/src/call-stream.js:187:78
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
  code: 16,
  details: 'Failed to retrieve auth metadata with error: request to https://www.googleapis.com/oauth2/v4/token failed, reason: read ECONNRESET',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} },
  note: 'Exception occurred in retry method that was not classified as transient'
}

Environment details

  • OS: macOS
  • Node.js version: 18.5.0
  • @google-cloud/firestore version: 3.8.0

image

This is failing consistently for us.

michaelAtCoalesce avatar Aug 10 '22 17:08 michaelAtCoalesce

Hi @michaelAtCoalesce , thanks for reporting. I noticed that you are using an old version of the SDK (3.8.0). Can you please try with the latest version (6.0.0) and let us know if you continue to experience the issue?

There have been fixes to the underlying RPC library (e.g. https://github.com/grpc/grpc-node/pull/2084) that might have fixed this issue already.

ehsannas avatar Aug 16 '22 16:08 ehsannas

I also realized that there is an existing thread about this. I suggest reading https://github.com/googleapis/nodejs-firestore/issues/1738#issuecomment-1170390718 and try to do a "promise audit". Let me know how it goes.

ehsannas avatar Aug 16 '22 19:08 ehsannas