Closed crocodile closed 4 years ago
Can't say I've ever used GeoFire, but the key
is/should be there: https://github.com/invertase/react-native-firebase/blob/4709781fb0f5b7a06e1b48d37ebb4363736bf79b/packages/app/lib/common/ReferenceBase.js#L40
My guess would be it's not being handled the same, maybe internally passing the class along and losing the context/serialising etc?
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention?
This issue will be closed in 15 days if no further activity occurs. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this is still present in the latest release, please feel free to create a new issue with up-to-date information.
@crocodile have you found solution for this issue?
@ziyaddin @crocodile looking for an answer as well
@danielcolgan I came up with temporary solution:
import { GeoFire, GeoFireTypes } from 'geofire';
import firebase from '@react-native-firebase/app';
const firebaseDb = firebase.database();
const tempRef: any = firebaseDb.ref();
tempRef.key = null;
const firebaseRef: GeoFireTypes.firebase.Reference = tempRef;
const geofire = new GeoFire(this.firebaseRef);
Basically, firebaseRef = tempRef + 'key' property
.
@danielcolgan @ziyaddin I no longer have this issue after upgrading to 6.4.0.
@crocodile thanks for informing.
Issue
I am trying to use 'react-native-firebase' with the 'geofire' library as follows:
... also tried by referencing firebase directly:
Expected: No error
Actual:
IDE is complaining the property 'key' is missing in type.
App crashes with the following error:
Basically the key property is not available on the database reference:
This does not happen if I use the 'firebase' package directly (i.e. not using 'react-native-firebase'), but that's not an easy option for me as I am already using this library for authentication and other functions.
package.json :
Project Files
iOS
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```
Android
Click To Expand
#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy // N/A ``` #### `android/app/build.gradle`: ```groovy // N/A ``` #### `android/settings.gradle`: ```groovy // N/A ``` #### `MainApplication.java`: ```java // N/A ``` #### `AndroidManifest.xml`: ```xml ```
Environment
Click To Expand
**`react-native info` output:** ``` OUTPUT GOES HERE ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [ ] Both - **`react-native-firebase` version you're using that has this issue:** - `e.g. 5.4.3` - **`Firebase` module(s) you're using that has the issue:** - `e.g. Instance ID` - **Are you using `TypeScript`?** - `Y/N` & `VERSION`
Think
react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]React Native Firebase
andInvertase
on Twitter for updates on the library.