Skip to content
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

Unable to add or retrieve documents via Firestore (React Native) #619

Closed
Luckygirlllll opened this issue Apr 3, 2018 · 3 comments
Closed

Comments

@Luckygirlllll
Copy link

[REQUIRED] Describe your environment

  • Operating System version: IOS (React Native), Android (React Native)
  • Firebase SDK version: 4.12.0
  • Firebase Product: Firestore

Unable to add or retrieve documents via Firestore, there is no errors, no exception, but nothing is happened

Steps to reproduce:

Add npm install [email protected] --save to the react native project
Add the code below to the project
Nothing is happening (collections and documents were not created)

Relevant Code:

import * as firebase from 'firebase'
import firestore from 'firebase/firestore'

var config = {
  apiKey: "xxxxxxxxxxxxxxxxxx",
  authDomain: "xxxxxxxxxxxxxxxxxx",
  databaseURL: "xxxxxxxxxxxxxxxxxx",
  projectId: "xxxxxxxxxxxxxxxxxx",
  storageBucket: "xxxxxxxxxxxxxxxxxx",
  messagingSenderId: "xxxxxxxxxxxxxxxxxx"
};

firebase.initializeApp(config);

var db = firebase.firestore();

var docRef = db.collection('users').doc('alovelace');

var setAda = docRef.set({
    first: 'Ada',
    last: 'Lovelace',
    born: 1815
})
@mikelehen
Copy link
Contributor

You may be running into #283. There was a fix made in react native but I don't think it's been released yet. You can try the workaround in #283 (comment) and see if that solves the issue for you.

@Luckygirlllll
Copy link
Author

@mikelehen I have already tried solutions from #283, it didn't help me, besides of that, I'm not using expo, I'm using pure react native. and in my case Firestore don't work both in Android and IOS.

@mikelehen
Copy link
Contributor

Is this tracking a different issue than #638 ? If not, can we close this issue? I'm inclined to use #638 as the primary tracking issue since it has your logs.

@firebase firebase locked and limited conversation to collaborators Oct 22, 2019
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

3 participants