-
Notifications
You must be signed in to change notification settings - Fork 964
Closed
Description
Describe your environment
- Operating System version: Android 4.4.2
- Firebase SDK version: "^4.6.0"
- Firebase Product: Firestore Web SDK
- Expo: "^22.0.0"
Describe the problem
I am using Expo and trying to do basic CRUD with Firestore on an Android device and not getting any results. The same code works perfectly on an iOS device, but it doesn't work with Android. Can you take a look into that?
Steps to reproduce:
Basically create a react-native project, and Try any CRUD with Firestore. In my case fetching data from restaurants collection. Note, I am implementing Redux so you have to install 'react-redux' with your Expo project. As I said this code works perfectly with iOS but not with ANDROID. Let me know if you need more information.
Just tried this on react-native init project and got this error on my emulator. I just realized that this issue is related to #97.
Relevant Code:
import firebase from 'firebase';
import 'firebase/firestore';
import { Alert } from 'react-native';
import {
RESTAURANTS_FETCH_SUCCESS,
} from './types';
export const restaurantsFetch = () => async dispatch => {
try {
const response = await firebase.firestore().collection('restaurants').get();
response.forEach(doc => {
dispatch({ type: RESTAURANTS_FETCH_SUCCESS, payload: { ...doc.data(), id: doc.id } });
});
} catch (err) {
Alert.alert(err.message);
}
};
czubocha, connorzg, clarktank, Salakar, saintplay and 13 more