-
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
An error occurred in sendJSEvent: bridge is not set. This is probably because you've explicitly synthesized the bridge in RNFirebaseDatabase, even though it's inherited from RCTEventEmitter. #233
Comments
Hey, what RN version are you running + OS? |
Hey man! Deployment target: iOS 8.0 And according to package.json:
|
@Twinski can I just check what version of react-native-firebase you're using? |
I’m using version 2.0.0 Thanks for looking into this ;) Appreciate it.
On Mon, Jul 10, 2017 at 10:08, chrisbianca <notifications@github.com> wrote:
@Twinski [https://github.com/twinski] can I just check what version of react-native-firebase you're using?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [#233 (comment)] , or mute the thread [https://github.com/notifications/unsubscribe-auth/ABcvwFZiUmXPqTv7m6Z3aOYXWQpXvy5eks5sMdwAgaJpZM4OPpLl] .
|
@Twinski Thanks for clarifying. Do you know what the app is trying to do when this error is displayed? Does the app crash when the error is thrown? I'm struggling to reproduce myself. |
It’s a bit unclear really. The app doesn’t crash. It’s logging these events all the time. Maybe I have a debug option turned on for firebase? Is that possible?
On Wed, Jul 12, 2017 at 10:55, chrisbianca <notifications@github.com> wrote:
@Twinski [https://github.com/twinski] Thanks for clarifying. Do you know what the app is trying to do when this error is displayed? Does the app crash when the error is thrown?
I'm struggling to reproduce myself.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [#233 (comment)] , or mute the thread [https://github.com/notifications/unsubscribe-auth/ABcvwPKIJ-UM1Y3ibrT9xa7zxCno2gJ9ks5sNIn7gaJpZM4OPpLl] .
|
Ok, as the app doesn't crash, I think I know what is causing these warning messages to show. It's due to the fact that currently, the I've added it to my TODO list :) |
I have no clue what you are talking about but sounds cool! ;) Good luck and hope to see it resolved soon. Keep up the great work!
On Wed, Jul 12, 2017 at 12:59, chrisbianca <notifications@github.com> wrote:
Ok, as the app doesn't crash, I think I know what is causing these warning messages to show. It's due to the fact that currently, the RNFirebaseDatabaseReference class is a part of the RNFirebaseDatabase class. The former does hold a reference to the bridge. If I refactor them, hopefully that will make the warning go away...
I've added it to my TODO list :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub [#233 (comment)] , or mute the thread [https://github.com/notifications/unsubscribe-auth/ABcvwLQ3TDdOURWG_SNiEVdDnfD6ZeoJks5sNKcGgaJpZM4OPpLl] .
|
@Twinski I've just refactored RNFirebaseDatabase and RNFirebaseDatabaseReference to hopefully get rid of these warnings for you. Are you able to test the latest version of the code. You can simply do:
which will install the latest from the GitHub repo. Once you've confirmed, I'll release a new version. |
@chrisbianca I'm getting the following when I try and use the code in master via Let me know if there's any other info I can provide. Thanks for the awesome library. |
@jpokrzyk Try running a |
@chrisbianca Arg my native ios skills are limited but I should have known that. Yep that resolved it for me and I don't see any new issues. Thanks again. |
@chrisbianca can this get pushed into a new release pretty soon? I'm pretty sure all the log dumping into the xcode because of this issue is causing a bunch of janky animations in our app. We're probably going to do a release using master from this library but I have a feeling that's going to come back to bite us pretty soon (because we're not pinned to a version). Thanks! |
@chrisbianca @Salakar Actually never mind on the release. Looks like this issue needs to be re-opened. I'm getting the following on 2.0.4. I didn't a way to reproduce this 100% of the time, but looks like I do now, and it's still an issue. But I'm also concerned these large warning log dumps from this module is causing jankiness and freezing while the messages clear the log buffer. Any idea of this might be true? Or maybe it's chewing up the bandwidth on the RN js bridge? My janky animations could definitely just be the old navigation library I'm using or other issues in the app. Just throwing out my observations in case they might be useful. We have reports of freezing and delays on our test flight builds and this library is one of a couple of new variables in the mix. I have |
@jpokrzyk You would be getting that warning on 2.0.4 as that doesn't include the fix. I've just published a v2.0.5 release which includes the fix. In terms of the logging - that is coming from React Native and not from RNFirebase. It will be disabled as part of the Release build so shouldn't be causing any issues with your TestFlight builds assuming you're doing Release builds and not Debug? |
This bug is still prevalent, even in 3.0.0-alpha2. EDIT: And appears to be the main cause of a lot of crashes I'm getting. I'll investigate further, but I think the issue might need to be re-opened. |
Right now, my symbolicated error stack is saying it's coming from this line and a couple of the other places where events are being emitted. EDIT: I see that we're getting the emitter from the database class and using that, but I'm suspecting that's where the issue lies currently. If it's of any help, I'm currently using React Native Navigation, which prompts a couple of uncommon implementation details, e.g. that Sentry gets the bridge fed directly. I'm thinking it might be related to that, but if OP was not using RNN, then we've got something else on our hands. |
@mikesurowiec Thanks for also reporting - you're using a "standard" navigation, yes? Because then your error message suggests that it is probably related to the event emitter going lost somewhere. |
Yeah the navigation is done purely on the javascript side. I was upgrading from 2.x -> 3 and this is the only issue I've had so far. It's possible I have something else configured incorrectly, just weird that it works before a JS reload |
For now, this doesn't seem to affect production, but it makes the development experience on iOS a living hell, as all of the event emitters are causing crashes. I've forked the repo and will be trying to fix it, possibly by implementing RNFirebaseDatabaseReference as an RCTEventEmitter instead of an NSObject |
Are you both on v3? Gonna take a look and see what I can do about this on v3, if it works then I can backport. |
Yup, v3 alpha 3 here
|
Is this still causing you problems? I'm really unsure why this is happening - I'm unable to reproduce on v3 at all, which makes it hard to try and resolve the issue. This issue used to happen on v2 because @DaBs if you're able to share a basic project that this happens on we can more easily take a look? |
This is causing me issues in development as well. It doesn't happen every time, but I can sometimes reproduce by changing a value in my firebase console while the app is running on my device. I'll try to find a pattern in the crashes. this is my error message:
also on v3 alpha3 |
I am working from v3 and I see the same issues as @faahmad. It appears that it's only an issue after doing a JS reload (live, or manual). If I've done a fresh install of the app from XCode, everything seems to work fine. |
Hey all, think we may have stumbled onto a fix for this, I'll be pushing something up tonight for this in prep for tomorrow's v3 beta release. |
I just updated to v3.0.0RC1 and it this issue seems to be working now. Thanks for getting the fix in there. EDIT: I may have spoken too soon. Looks like I'm still seeing this sometimes. Particularly when I edit an entity on firebase, while using this app in debug mode, after a refresh (not a direct build). |
I have just pushed up a fix for this and released as part of v3.0.3 |
@chrisbianca still having this issue #549 |
I'm still seeing this as of 3.2.5. Any tips to get this resolved? |
@benkraus Where are you seeing this? The DB or another module? Just iOS? Everything should now be protected against this error but we might have missed somewhere... |
@benkraus Hello, how did you solve this problem? I have a similar problem。RN Version:0.57.8 |
@xuezhy that version of react-native is so old I don't believe it works on Android 10 or 11, or ios 13 or 14 |
This keeps coming up in my logs of XCode. Anyone has a clue what is going on?
Full console warning:
An error occurred in sendJSEvent: bridge is not set. This is probably because you've explicitly synthesized the bridge in RNFirebaseDatabase, even though it's inherited from RCTEventEmitter. ( 0 CoreFoundation 0x000000010ecfcb0b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010debc141 objc_exception_throw + 48 2 CoreFoundation 0x000000010ed00cf2 +[NSException raise:format:arguments:] + 98 3 Foundation 0x000000010da8b69f -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 165 4 Bookkee 0x000000010b048ee8 -[RCTEventEmitter sendEventWithName:body:] + 408 5 Bookkee 0x000000010afb729b -[RNFirebaseDBReference sendJSEvent:title:props:] + 315 6 Bookkee 0x000000010afb598a __51-[RNFirebaseDBReference addEventHandler:eventName:]_block_invoke + 602 7 Bookkee 0x000000010b2a797f __43-[FChildEventRegistration fireEvent:queue:]_block_invoke.55 + 88 8 libdispatch.dylib 0x00000001122a14a6 _dispatch_call_block_and_release + 12 9 libdispatch.dylib 0x00000001122ca05c _dispatch_client_callout + 8 10 libdispatch.dylib 0x00000001122ab40b _dispatch_main_queue_callback_4CF + 411 11 CoreFoundation 0x000000010ecc1909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9 12 CoreFoundation 0x000000010ec87ae4 __CFRunLoopRun + 2164 13 CoreFoundation 0x000000010ec87016 CFRunLoopRunSpecific + 406 14 GraphicsServices 0x0000000112dada24 GSEventRunModal + 62 15 UIKit 0x00000001108f40d4 UIApplicationMain + 159 16 Bookkee 0x000000010aedc03f main + 111 17 libdyld.dylib 0x000000011083965d start + 1 18 ??? 0x0000000000000002 0x0 + 2 )
The text was updated successfully, but these errors were encountered: