Closed kraenhansen closed 3 weeks ago
Thanks for filing this! We missed a new addition (facebook::react::DefaultTurboModules
) in 0.75. This should be handled by @rnx-kit/react-native-host
and you can bump that package separately once a new version is published. We will of course also bump it in RNTA asap.
I would really appreciate it if you could verify it locally as well.
For completeness did I succeed at reproducing this with react-native@0.74.2
and react-native-test-app@3.9.3
.
And since you're explicitly mentioning an addition in 0.75 I'm wondering how that might happen 🤔
I'll try reproducing the fix (with react-native@0.75.1
) and report back.
For completeness did I succeed at reproducing this with
react-native@0.74.2
andreact-native-test-app@3.9.3
. And since you're explicitly mentioning an addition in 0.75 I'm wondering how that might happen 🤔
Interesting… I ran git diff 0.74-stable..0.75-stable -- packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm
and this was the relevant diff:
@@ -214,7 +213,7 @@
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
jsInvoker:(std::shared_ptr<facebook::react::CallInvoker>)jsInvoker
{
- return nullptr;
+ return facebook::react::DefaultTurboModules::getTurboModule(name, jsInvoker);
}
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:(const std::string &)name
If this repros on 0.74, it means that the relevant native modules were registered a different way.
I can confirm the proposed fix works locally with react-native@0.75.1
, which unblocks me 🎉
What happened?
Doing a clean
init
and callingsetImmediate
will never call the callback passed:NOTE: This was discovered in an upgrade of RN from v0.74.2 to v0.75.1 and RNTA from v3.8.7 to v3.9.3. I haven't pinned if this is due to the upgrade of RN or RNTA. I've have however tried (and failed at) reproducing this with a bare React Native 0.75.1 app using the community CLI, which is why I report it here.
NOTE: I've tested on iOS - it might be an issue elsewhere too.
Version
18.3.1
What platforms are you seeing this issue on?
System Information
Steps to Reproduce
npx --package react-native-test-app@latest init
RCT_NEW_ARCH_ENABLED=1 pod install --project-directory=ios
setTimeout
andsetImmediate
as in the "What happened?" step toApp.tsx
npm run ios
pod install
, run again and note how the "setImmediate" message is logged as expected.Code of Conduct