My firebase collection that I'm trying to query is literally empty. Zero documents inside. Even then, when querying it, I'm getting this error
I'm doing this inside a LAMBDA function on AWS. I know that the query works because it does return results sometimes but it's very random. Mostly it's just coming up with this error
Here are my lambda logs with following ENV variables turned on GRPC_TRACE=all GRPC_VERBOSITY=DEBUG
I have even tried this as I found this online somewhere but it didn't make any difference
db.settings({
clientConfig: {
interfaces: {
'google.firestore.v1.Firestore': {
methods: {
RunQuery: {
timeout_millis: 5 * 60 * 1000
}
}
}
}
}
});
Here's what my query code looks like
let snap = await db.collection('notifications').where("siteID", "==", msg.siteId).where("procCode", "==", code).where("aptNum", "==", msg.affectedRows[0].after.AptNum).get();
Here's the output I get eventually. Not even in the same lambda execution but in a separate one which is also strange.
I figured out what my issue was here. I was calling the Firebase API inside an async function but the caller of that function wasn't "await"ing that call which led to this. It all works now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With