-
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
fix(database): call cancellation callback when using ref.on #5371
fix(database): call cancellation callback when using ref.on #5371
Conversation
This pull request is being automatically deployed with Vercel (learn more). react-native-firebase – ./🔍 Inspect: https://vercel.com/invertase/react-native-firebase/CRD2ynmyE44riTFKpfzrEXaDuqoG react-native-firebase-next – ./website_modular🔍 Inspect: https://vercel.com/invertase/react-native-firebase-next/FXLBkHXEsLU7t5ZmRcUYbnNcNsSD |
Codecov Report
@@ Coverage Diff @@
## master #5371 +/- ##
=======================================
Coverage 74.56% 74.56%
=======================================
Files 96 96
Lines 4287 4287
Branches 921 921
=======================================
Hits 3196 3196
Misses 1021 1021
Partials 70 70 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned in comment with details, I don't think this is an error here, and I don't think this is needed. I think there is something else going on, possibly project-specific.
@mikehardy Gentle reminder if you had some time to look at this again I also played around with the tests. The test that was skipped https://github.com/invertase/react-native-firebase/blob/master/packages/database/e2e/query/on.e2e.js#L111 is failing w/o my patch. After applying the patch, the test does in fact pass. I do not believe it is project specific. |
Sorry for the delay, had my mom in town from out of the country for the week 😁, this is in my queue and I do really appreciate the test investigation. We'll get this nailed down |
We faced the same problem. Patched it like this:
I think this error was introduced by this commit: 5eb2f59. Looks like some of the other callbacks are also not being called. |
Believe it or not (and you may not as this has sat a while) this is a high priority to fix for me and I'm sorry (for @nealmanaktola ) that I haven't reviewed it and gotten it worked into a release yet - had quite a few things going on unfortunately. This will be resolved though, hopefully sooner than later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nealmanaktola thanks again for making this PR, and thanks @photorouletteadmin - I think your one-liner is also correct but easier to read so I've updated the PR with it.
Pending CI this looks good to go and I'll do a release once it's green
@photorouletteadmin you mentioned you thought other callbacks weren't being called, I scanned the rest of the commit that created this issue (it was mine! sorry) and it seems like this was the only one affected but I'd be happy to merge anything else if you find something
Good to go! |
Description
The cancellation/error callback is not being triggered using the following api
Digging through the code, I noticed the listener is being wrapped but not called. I noticed there is a test for this...but not sure how that is passing.
Related issues
Fixes #5370
Release Summary
Checklist
Android
iOS
e2e
tests added or updated inpackages/\*\*/e2e
jest
tests added or updated inpackages/\*\*/__tests__
Test Plan
Think
react-native-firebase
is great? Please consider supporting the project with any of the below:React Native Firebase
andInvertase
on Twitter