-
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
🔥 [🐛] Error when using Realtime Database useEmulator after refreshing metro bundler #5650
Comments
Oh, that sounds frustrating. I know hot-reload is really important in a dev cycle but I'm not sure what we can do about this - out of curiosity, does it still work and connect to the emulator after the hot reload? Stated differently, is this an error message that is ignorable because things are still working afterwards, or does this imply that the connection is fully dead afterwards? |
The connection to the emulator is still working after dismissing the error. However it seems strange that the other emulators (auth, storage) work perfectly fine and the only emulator that shows this error is the realtime emulator. It's like if after refreshing react native the other emulators dropped their references to their configured instances and started fresh but the database emulator kept an old copy and raised an error in consequence. I don't really know how it works, but maybe it helps to solve this because it's very annoying. Thanks for your quick response |
Hello 👋, to help manage issues we automatically close stale issues.
|
I also have this issue and after hot reload I can't use the app anymore so I have to restart the app.
Lib version
|
I run into a similar issue on "@react-native-firebase/database": "^14.11.0", without using expo |
@psdewar2 this behavior will not change until there is a PR that changes it at which point the issue will be closed via a link to a relevant merged PR |
any update on this? having the same issue |
@Alex1899 "metoo" comments provide no value, you and all future people may refer to this comment as authoritative:
There are no secret updates, there is no secret work. If you are motivated to close this, I/we will happily collaborate on a PR you provide |
guards against case where hot-reload of javascript means state is lost and second native calls are attempted (and rejected...) Fixes #5650
guards against case where hot-reload of javascript means state is lost and second native calls are attempted (and rejected...) Fixes #5650
Issue
I'm using the Realtime Database emulator. On the first load everything is ok, however, if I press "r" on the metro bundler to refresh the app a red screen error shows up with the next dismissable message:
Here two screenshots of the rest of the error:
./src/services/firebase/client.ts
./src/services/firebase/index.ts
./src/App.tsx
Project Files
Javascript
Click To Expand
package.json
:firebase.json
for react-native-firebase v6:iOS
Click To Expand
ios/Podfile
:AppDelegate.m
:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settings
jetifier=true
for Android compatibility?jetifier
for react-native compatibility?android/build.gradle
:// N/A
android/app/build.gradle
:// N/A
android/settings.gradle
:// N/A
MainApplication.java
:// N/A
AndroidManifest.xml
:<!-- N/A -->
Environment
Click To Expand
react-native info
output:react-native-firebase
version you're using that has this issue:12.7.3
Firebase
module(s) you're using that has the issue:@react-native-firebase/database
TypeScript
?Yes, 3.8.3
React Native Firebase
andInvertase
on Twitter for updates on the library.The text was updated successfully, but these errors were encountered: