react-native-firebase
react-native-firebase copied to clipboard
🔥[🐛] Firestore doesn't throw an error when uploading withour internet connection
Issue
I'm facing the issue that if I try to access my firestore database it loads infinitly withour giving me an error after not successfully uploading my data.
await firestore()
.collection('workouts')
.add({
name: workout.name,
user: auth().currentUser?.uid,
description: description,
createdAt: firestore.FieldValue.serverTimestamp(),
})
Project Files
Javascript
Click To Expand
package.json:
"dependencies": {
"@react-native-firebase/app": "^15.2.0",
"@react-native-firebase/auth": "^15.2.0",
"@react-native-firebase/firestore": "^15.2.0",
"@react-native-firebase/storage": "^15.2.0",
"@react-native-google-signin/google-signin": "^8.0.0",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2",
"@reduxjs/toolkit": "^1.8.3",
"@rneui/base": "^4.0.0-rc.4",
"@rneui/themed": "^4.0.0-rc.4",
"react": "17.0.2",
"react-native": "0.68.2",
"react-native-draggable-flatlist": "^3.1.2",
"react-native-gesture-handler": "^2.5.0",
"react-native-image-picker": "^4.8.4",
"react-native-linear-gradient": "^2.5.6",
"react-native-mmkv": "^2.4.1",
"react-native-reanimated": "^2.9.1",
"react-native-safe-area-context": "^4.3.1",
"react-native-screens": "^3.13.1",
"react-native-sound": "^0.11.2",
"react-native-spinkit": "^1.5.1",
"react-native-vector-icons": "^9.1.0",
"react-redux": "^8.0.2",
"redux": "^4.2.0"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"@types/jest": "^26.0.23",
"@types/react-native": "^0.67.3",
"@types/react-test-renderer": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.67.0",
"react-test-renderer": "17.0.2",
"typescript": "^4.4.4"
},
"resolutions": {
"@types/react": "^17"
},
"jest": {
"preset": "react-native",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
}
Android
Click To Expand
Have you converted to AndroidX?
- [ ] my application is an AndroidX application?
- [ ] I am using
android/gradle.settingsjetifier=truefor Android compatibility? - [ ] I am using the NPM package
jetifierfor react-native compatibility?
android/build.gradle:
classpath 'com.google.gms:google-services:4.3.13'
android/app/build.gradle:
implementation platform('com.google.firebase:firebase-bom:30.3.1')
implementation 'com.google.firebase:firebase-analytics'
Environment
Click To Expand
react-native info output:
System:
OS: Windows 10 10.0.22000
CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor
Memory: 5.72 GB / 15.95 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.15 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK:
AllowAllTrustedApps: Disabled
Versions: 10.0.16299.0, 10.0.17763.0, 10.0.18362.0, 10.0.19041.0
IDEs:
Android Studio: Not Found
Visual Studio: 16.9.31229.75 (Visual Studio Community 2019)
Languages:
Java: 17.0.1
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
react-native-windows: Not Found
npmGlobalPackages:
*react-native*: Not Found
- Platform that you're experiencing the issue on:
- [ ] iOS
- [ ] Android
- [ ] iOS but have not tested behavior on Android
- [x] Android but have not tested behavior on iOS
- [ ] Both
react-native-firebaseversion you're using that has this issue:^15.2.0
Firebasemodule(s) you're using that has the issue:react-native-firebase/firestore
- Are you using
TypeScript?Y, version ^4.4.4
- 👉 Check out
React Native FirebaseandInvertaseon Twitter for updates on the library.