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

How to avoid Auth error using `preferRest: true`

Open Decezaris opened this issue 2 years ago • 4 comments

I am using this library in a cloud function, and sometimes I receive the following response from firestore debug logs. How to avoid that to happen? Have I pass some parameter in the connection settings?

image

Decezaris avatar Nov 10 '23 02:11 Decezaris

I think it was coincidence but a fun fact about it... I have two functions reading and writing the same data in different firestore instances one is the (default) and another named custom-name, that I have to specify the name of the second one, the first one I just ommit in new Firestore() call, the difference between the function code is only that. Should I have to specify?

Decezaris avatar Nov 10 '23 03:11 Decezaris

Are you connecting to prod or emulator?

wu-hui avatar Nov 10 '23 18:11 wu-hui

To production. It happened once, I didn't see anymore. But one function triggered the auth error once and another not, and the only change between them was the name prop

Decezaris avatar Nov 10 '23 19:11 Decezaris

It could be very tricky for us to identify the issue if it does not repeat itself..i'll ask around to solicit some ideas.

wu-hui avatar Nov 13 '23 22:11 wu-hui