Make the "5 NOT FOUND" / "Exception occurred in retry method that was not classified as transient" error message specific and useful
I'm raising this specific issue because this "5 NOT FOUND" error is uncharacteristically (for a Google API) unhelpful, confusing and cryptic.
When it comes from using Firestore, it can mean that,
- the collection/document/subcollection//... path sequence wasn't respected
- Firestore was not properly set up from the console
-
the
(default)database was deleted - the custom database ID wasn't specified
- a cloud function was idle for a long time
Also, its note field in my case was set to "Exception occurred in retry method that was not classified as transient", but the FirebaseFirestoreError type doesn't include a .note field. (import { FirebaseFirestoreError } from 'firebase-admin/firestore';). There was also an empty details field that was not defined in FirebaseFirestoreError.
@dconeybe any chance for this error message to received some TLC?
Assigning @wu-hui as I don't have any special knowledge of this issue, other than having looked into one of the "NOT FOUND" issues linked to.
Thanks a ton @dandv for bringing this up. As a new user, I was stuck for 3 hours trying to figure out this error message. Tons of confusing information on the web on how to just get a simple db write to work but turns out I just wasn't supposed to rename my database on setup.
Yes please. I've followed and refollowed the examples and cannot get a simple write (or read) to work, and this opaque error message is maddening. I've tried all the fixes people have mentioned.
As a workaround, could you fix the issue by setting the databaseId?
getFirestore(app: FirebaseApp, databaseId: string);
(or see: https://github.com/firebase/firebase-admin-node/issues/2563#issuecomment-2994418683)