Skip to content

Firestore Does not listening to acctualy data saved #5834

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
yunesuk opened this issue Dec 23, 2021 · 2 comments
Closed

Firestore Does not listening to acctualy data saved #5834

yunesuk opened this issue Dec 23, 2021 · 2 comments

Comments

@yunesuk
Copy link

yunesuk commented Dec 23, 2021

[REQUIRED] Describe your environment

  • Operating System version: windows 10
  • Browser version: react native 0.66.4
  • Firebase SDK version: 9.6.1
  • Firebase Product: firestore (auth, database, storage, etc)

[REQUIRED] Describe the problem

i have a friebase project in development mode i am creating a react native application , auth is working fine but firestore is not working as expected ,
when i use the same code in docs " inserting data to firestore...." it insert it and when i make a call to db with "getDoc" function it return the doc that i saved , the probleme is yesterday i was not able to connect to the firestore but today i can and it worked but the probleme now is the data not appearing in my firestore dashboard im very confused, i hope i will find the soltion of this probleme .

Relevant Code:

  // firebase.js  :
     import {initializeApp} from 'firebase/app';
import {getFirestore} from 'firebase/firestore';
import {getAuth} from 'firebase/auth';

const firebaseConfig = {
  //firebase config here
};
const app = initializeApp(firebaseConfig);
export const auth = getAuth(app);
export const db = getFirestore(app);
//====================

//getting the data from firestore 
 try {
      const citiesRef = collection(db, 'cities');
      const snap = await getDoc(doc(citiesRef, 'SF'));
      if (snap.exists()) {
        console.log('snap existe');
      } else {
        console.log('snap not existe');
      }
    } catch (error) {
      console.log(error.message);
    }
@argzdev
Copy link

argzdev commented Dec 24, 2021

Hi @YunsGeek, thanks for filing. Since it looks like this issue is related to the new one you've just provided with extra details. I'll be marking this one as a duplicate and close this for better tracking. We can continue investigating this on #5836. Thanks

@argzdev argzdev closed this as completed Dec 24, 2021
@argzdev
Copy link

argzdev commented Dec 24, 2021

Duplicate of #5836

@argzdev argzdev marked this as a duplicate of #5836 Dec 24, 2021
@firebase firebase locked and limited conversation to collaborators Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants