I'm porting an application from Firebase 8 to 9, and I'm bumping into this generic runtime error that also has no stack trace.
I have no idea where to look. Can anyone point me in a direction that makes sense?
Note that my app is not doing any Firestore mutations (no setDoc, updateDoc, etc), because all mutations happen via cloud functions. For this reason. I have no clue what to do because the error makes me think I'm passing in the wrong data somewhere.
--- edit ---
I have narrowed it down to this:
const ref = doc(db, `__derived_user_names/${accountId}`);
this.derivedUserNames = new ObservableDocument<Record<string, string>>(ref);
The ref is constructed properly, but the error happens when it is passed to the ObservableDocument constructor. Without the ref argument, the object is instantiated without problems.
This object is from a library I created some time ago (and now kind of regret). Here is a link to the source in the Firebase 9 branch that is used to run the code:
https://github.com/0x80/firestore-mobx/blob/topic/0630-firebase-9/src/document.ts
The weird thing is, I have tests for the library that are running against an actual Firestore instance, and during testing, everything works fine.