Skip to content

TypeError: Cannot convert undefined or null to object #950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jasmin92 opened this issue Nov 18, 2020 · 3 comments
Closed

TypeError: Cannot convert undefined or null to object #950

jasmin92 opened this issue Nov 18, 2020 · 3 comments

Comments

@jasmin92
Copy link

image
Hey, i have faced this issue with when i tried to fetch from firestore.
I followed all instructions from docs.

Firestore database contains just one collection "users" with one document in it.

error occurred on:

firestore: {
    users: db.collection('users')
},

However, if i try to fetch it manually, it'll be returned without errors

 async created() {
    let users = await db.collection('users').get();
    users.forEach(user => {
      console.log(user.data());
    })
  }
@stamler
Copy link

stamler commented Nov 18, 2020

Same issue, specifically does not happen with @firebase/firestore 2.0 but DOES occur on @firebase/firestore 2.0.2

EDIT: no issues with @firebase/firestore 2.0.1 either, just 2.0.2. Current workaround is to pin version 2.0.1 in your package.json

@amandine-trl
Copy link

Hi,
I have the exact same issue using firebase 8.0.2.
Downgrading to firebase 8.0.1 solved the issue.
Thank you @stamler !

@posva
Copy link
Member

posva commented Nov 18, 2020

#940

Make sure to search existing issues and not to ignore the template when opening issue, please! It's important for open source maintainers

@posva posva closed this as completed Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants