-
Notifications
You must be signed in to change notification settings - Fork 94
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
Callback passed to setImmediate
is never called when React Native (new arch only)
#2189
Comments
setImmediate
is never called when React Native setImmediate
is never called when React Native (new arch only)
Thanks for filing this! We missed a new addition ( I would really appreciate it if you could verify it locally as well. |
For completeness did I succeed at reproducing this with I'll try reproducing the fix (with |
Interesting… I ran @@ -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 |
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
The text was updated successfully, but these errors were encountered: