-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Deadlock during start with new architecture on iOS #4506
Comments
It looks like this is causing similar issue as here: #3949 I tried to:
But this did not helped and it's still stuck waiting after app launched. RN 0.75.4 with New Arch enabled. Detox 20.27.4. Also having similar issue on Android. |
Hey there. Sorry to hear there are more of us out there having Detox deadlocks :) Here's how I build and run a custom Detox on my react native app/lib for iOS, in case it can help: Git clone detox, then:
In your react-native app's root folder, do a regular
For ios in your react native app's folder:
Then I can do yarn detox build/yarn detox test as usual my RN app's repository, and now the app JS/content load can happen in any order, without deadlocking on startup. |
@TimotheeIsnard thanks for sharing those steps. Just to confirm do you have any other patches in your private forks or only those you added to wix-incubator/DetoxSync#74 ? |
That's the only patch we have at the moment. It does work for us on Android with new arch (including fabric). There is still some random flakyness on some configs (mostly Android, more on older API levels), but that's just Detox, and it's <1%. We can generally workaround the unreliable random failures without patching Detox itself. Currently we're running RN 0.73.6, Detox 20.23 (haven't updated our fork since 7345e6c) |
Im still getting this issue |
@asafkorem do you have some roadmap on supporting newer versions of React Native and New Architecture? 0.73 that is currently highest version officially supported by Detox is out of support window by RN team and 0.76 was released with New Architecture enabled by default https://github.com/facebook/react-native/releases |
I investigated more on this and figured out that with Fabric and Bridgeless enabled on RN 0.76 there are many issues with Detox selectors related to completely different native views structure generated by RN and other functionality not working related to Detox dependencies on Bridge and other legacy components. I did an attempt to fix some of the issues on iOS but there are still tests that are failing. Probably will not have resources to fix this also I think there will be similar problems on Android as well https://github.com/Sky/Detox/pull/1/files |
Any tips? Detox opens the app on Expo 52 with new arch but then doesn't run any of the tests |
My tip is to delete the iOS build dir and rerun podinstall with newarch turned off, then turn it back on after testing. Obviously less than desirable. That's the only way I see that it can be navigated for now. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions! For more information on bots in this repository, read this discussion. |
What happened?
Hello,
I have a React Native app that I test on iOS, on both the old and new RN architecture, and when starting the app with the new architecture enabled Detox freezes while trying to first enable synchronization.
There is no freeze on the old RN architecture.
I tried
--debug-synchronization
, but it has nothing to say, since Detox seems to block internally before reaching the app code.By adding logs and following in a debugger, I found that the freeze comes from the
waitForReactNativeLoadWithCompletionHandler
function in DetoxSync.I opened a PR in DetoxSync that fixes the deadlock for me, but there may be other ways to solve the freeze, so I wanted to make a bug report here anyways (also, this repo seems more active)
DetoxSync PR: wix-incubator/DetoxSync#74
What was the expected behaviour?
Detox should start on iOS with the new architecture enabled.
Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
The freeze reproduces 100% of the time, if I do either a regular
await device.launchApp()
, or a manual:In what environment did this happen?
Detox version: 20.22.2
React Native version: 0.73
Has Fabric (React Native's new rendering system) enabled: Yes
Node version: 22.2.0
Device model: iPhone 15 simulator
iOS version: 17.5
macOS version: Sonoma 14.5
Xcode version: 15.4 (15F31d)
Test-runner (select one): jest
Detox logs
Detox logs (in attachment due to 65kB github comment limit): detox_loglevel_trace.txt
Device logs
No response
More data, please!
Output of
xcrun simctl spawn booted log stream --level debug --style compact | tee detoxlog
:detox_xcrun_log.tar.gz (13 MB uncompressed)
The text was updated successfully, but these errors were encountered: