Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

132
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda