react-query-firebase icon indicating copy to clipboard operation
react-query-firebase copied to clipboard

FirebaseError: Type does not match the expected instance... different Firestore SDK?

Open blastshielddown opened this issue 3 years ago • 5 comments

I'm working on an app in Nextjs 12 and everything appears to be working fine but I keep getting this error at build time about a different Firestore SDK:

error - unhandledRejection: [FirebaseError: Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?] {
  code: 'invalid-argument',
  customData: undefined,
  toString: [Function (anonymous)]
}

Everythig compiles and the site works fine aside from this error but I'd like to understand the problem if possible. Sorry I don't have much more to share, the error doesn't indicate much.

Here's more on my env:

    "@react-query-firebase/firestore": "^1.0.0-dev.7",
    "firebase": "^9.9.3",
    "next": "12.2.5",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-query": "3.*"

Edit: Should add that I am working in JS not TS.

blastshielddown avatar Sep 02 '22 20:09 blastshielddown

I have the same issue. #83 https://github.com/invertase/react-query-firebase/issues/83#issue-1500466438

dorianbucknor avatar Dec 19 '22 19:12 dorianbucknor

Same here, did someone solve this problem?

jimmy-chiang avatar Jan 20 '23 17:01 jimmy-chiang

Getting the same issue as well.

tombouquet avatar Mar 23 '23 00:03 tombouquet

relevant: https://stackoverflow.com/a/69242591/10577976 i guess no one is going to update this lib to support project who using the modular firebase sdk.

Eliav2 avatar Jul 30 '23 00:07 Eliav2