-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Returning Reference instance from async await method causes an exception. #1464
Comments
The issue occurs because the A quick fix for this issue is to return the reference wrapped in an object. |
I just ran intio this issue in combination with react-redux-firebase while uploading files. I assumed the issue was on my side of things but then found this issue. |
Ran into the same problem, but while creating a promise like
results in the same |
Related to #893 Will look at getting support for this in. The issue is with Database Reference not being a real Let's close this issue and track this on the other issue as both will be fixed after the rework and both are caused by the same underlying issue ( Loving
|
Actually this is a different problem: the issue here is that a simple ref has a If you look at the Firebase JS SDK, the I just tested with the latest JS SDK and confirmed it does not have this problem. In the meantime, as a workaround, I am setting |
@secobarbital I don't mean they're the same problems - I mean it's the same underlying cause - You're correct though, we'd match the JS SDK. |
Have just pushed a re-write of the Have added test cases from this issue and others which can be seen working here: https://github.com/invertase/react-native-firebase/blob/database-fixes/tests/e2e/database/ref/push.js#L73 This will land in v5.1.0, apologies for the delay on this one. Loving
|
- [ANDROID] [BUGFIX] [DATABASE] - Database listeners now correctly tearing down between RN reloads. (Fixes #1498 #1611 #1609) - [JS] [BUGFIX] [DATABASE] - Fixed an issue where `Reference.toString()` incorrectly contains `//` instead of `/` when joining the parent and child paths. - [JS] [BUGFIX] [DATABASE] - Rework `.push()` behaviour to match WebSDK and correctly return a Reference instance in all scenarios. (Fixes #893 #1464 #1572) - [JS] [ENHANCEMENT] [UTILS] - Added a `firebase.utils().database.cleanup()` utility method which removes all database listeners.
Issue
Below code writes 'Failure' to the console:
Environment
Both (iOS, Android)
macOS High Sierra
Xcode
React Native
version:0.56.0
React Native Firebase
Version:4.3.8
Firebase
Module:database
typescript
?no
Loving
react-native-firebase
? Please consider supporting them with any of the below:React Native Firebase
andInvertase
on TwitterThe text was updated successfully, but these errors were encountered: