Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
Porting v8 to v9, where to look: Expected type 'Pa', but it was: a custom ba object

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.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!