Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase functions get error stream removed onCreate firestore event

I'm worried about this error on firebase functions,

I have a sendgrid dispatch on this function:

exports.mailDealings = functions.firestore
.document('dealings/current').onCreate(event => {
  // send mail
  const msg = {...}

  sgMail.send(msg);
})
.catch(result => {
  console.error("sendgrid error", result);
});

I was able to execute with success before but on one call, this function give me the error below:

{ Error: Stream removed
    at ClientReadableStream._emitStatusIfDone (/user_code/node_modules/firebase-admin/node_modules/grpc/src/client.js:255:19)
    at ClientReadableStream._receiveStatus (/user_code/node_modules/firebase-admin/node_modules/grpc/src/client.js:233:8)
    at /user_code/node_modules/firebase-admin/node_modules/grpc/src/client.js:705:12 code: 2, metadata: Metadata { _internal_repr: {} } }

There should have an automatic retry for this error, right? Or at least a method for turning this easy, like result.retry(1000)?

like image 710
Guilherme Avatar asked Oct 28 '22 21:10

Guilherme


1 Answers

Same problem here (in many functions & randomly) since 3 / 4 days. Apparently t disappears after deploy...for few minutes

Error: Stream removed
at ClientReadableStream._emitStatusIfDone (/user_code/node_modules/firebase-admin/node_modules/grpc/src/client.js:255:19)
at ClientReadableStream._receiveStatus (/user_code/node_modules/firebase-admin/node_modules/grpc/src/client.js:233:8)
at /user_code/node_modules/firebase-admin/node_modules/grpc/src/client.js:705:12
like image 121
Santi Bivacqua Avatar answered Nov 13 '22 20:11

Santi Bivacqua