-
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
[🐛] RN@0.74 support? #7788
Comments
Ok, I found not yet merged PR #7688, which is related to the init failure. |
i tried applying the patch from this PR #7688 but still the error persists |
@harisbaig100 that is a mediocre patch 🤣 Hold on, I have a working patch at hands, just need a bit more time to clean it up before sharing. |
Sure, please do share it, i'm waiting for that, my target platform is ios not android |
Here you go: diff --git a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
index 03f001c..23d467d 100644
--- a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
+++ b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
@@ -65,7 +65,7 @@ function nativeModuleWrapped(namespace, NativeModule, argToPrepend) {
return NativeModule;
}
- const properties = Object.keys(NativeModule);
+ const properties = Object.keys(Object.getPrototypeOf(NativeModule));
for (let i = 0, len = properties.length; i < len; i++) {
const property = properties[i]; |
now it says this error
can you tell what version of the packages you are using, i'm using these :
|
updated the @react-native-firebase/app to 19.2 now the patch is applied let me check if it works |
on pod installation now this issue appears
|
I forgot to mention it here, so far I only tested it for Android. |
okay ... trying to fix it for ios. |
android is not loading it's an instant crash ... |
Well, if you just bumped library major version from v15 to v19 chances are it is crashing for unrelated reason, because something had to change with the setup in-between 🤷♂️ |
The error is still the same after fixing all the issues
|
Are you sure the code is actually re-build, and you don't get the old one from some cache? Try to add some console logging around the patched string, and check whether you see it in the logs, and what actually is returned by that patched method for modules you need. |
yeah i checked, there were few undefined and an empty object as well, still looking into that |
0.74 + Bridgeless mode is broken on iOS too. |
So yeah... if it does not work for you @harisbaig100 , and you saw |
This one, presumably, should work both in bridge-less and bridge-enabled modes: diff --git a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
index 03f001c..bd0a484 100644
--- a/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
+++ b/node_modules/@react-native-firebase/app/lib/internal/registry/nativeModule.js
@@ -65,7 +65,8 @@ function nativeModuleWrapped(namespace, NativeModule, argToPrepend) {
return NativeModule;
}
- const properties = Object.keys(NativeModule);
+ let properties = Object.keys(Object.getPrototypeOf(NativeModule));
+ if (!properties.length) properties = Object.keys(NativeModule);
for (let i = 0, len = properties.length; i < len; i++) {
const property = properties[i]; |
this is working function nativeModuleWrapped(namespace, NativeModule, argToPrepend) { let properties = Object.keys(Object.getPrototypeOf(NativeModule)); // const properties = Object.keys(NativeModule); for (let i = 0, len = properties.length; i < len; i++) { return native; |
My problem seems to be a different issue, but after upgrading to react-native 0.74.1, auth().onAuthStateChanged doesn't work on hot-reload.
In the above code, it logs up to AuthenticationProvider, but nothing happens inside onAuthStateChanged. If you close and restart the app completely, it works again 🤔 |
@jieey1140 don’t you have this problem: facebook/react-native#44555? Like everything works at first, but at some moment promises from naive side just do not resolve not reject anymore on JS side? |
Thank you @birdofpreyru for the patch! I released it as the last non-breaking change on react-native-firebase v19 before I merged and released the breaking changes in v20 in case that helps people test before trying to move to v20 here (although the breaking changes in v20 were literally all just "you need newer Xcode" and "you need higher minSdk for android" so not too difficult I hope) I'll note that android seemed to work in my testing but ios did not. I believe the ios problem was local to me but I would love to hear any success reports or failure reports on react-native-firebase v20 |
Hey folks, We're scratching our heads for 3 days now. We're facing this issue even with RN - I'm on Expo 50 and I do not find Any pointers? I'm happy to get it to "just work" for now with 0.73.6 and will patiently wait for a stable update to migrate to 0.74 later. |
I believe react-native-firebase is working fine on react-native 0.74.x, even with new architecture enabled |
Has anybody tested the library with the latest RN@0.74? I've just rapidly tried to upgrade my existing app, which depends on
react-native-firebase
from RN@0.73.6 to RN@0.74.1, and after the upgrade on Android (New Architecture) it tells(which, I believe is supposed to happen automatically, thus I assume it fails to initialize for RN@0.74).
Also, what is the status of the new architecture support? With RN@0.73 the library works for me in an app using the new architecture on Android; but if I am not missing anything, it does not work alongside the new arch on iOS. The new arch has been around for a while now, and it is supported by most popular RN libraries... this one not supporting it is quite a bummer.
The text was updated successfully, but these errors were encountered: