Detox
Detox copied to clipboard
Detox iOS failing to start intermittently on React Native 0.68.2
What happened?
About 50% of the time Detox iOS fails with the following error:
15:18:10.143 detox[7891] WARN: [DetoxConnection.js/ERROR, #50663] Action dispatched too early, there is no session to use:
HINT: Please report this issue on our GitHub tracker:
https://github.com/wix/Detox/issues
{
params: [Object],
type: 'AppWillTerminateWithError',
messageId: -10000
}
What was the expected behaviour?
Expect Detox to consistently start on iOS 15.5 and React Native 0.68.2
Was it tested on latest Detox?
- [X] I have tested this issue on the latest Detox release and it still reproduces.
Did your test throw out a timeout?
- [X] I have followed the instructions under Identifying which synchronization mechanism causes us to wait too much.
Help us reproduce this issue!
Problem seems to be related to React Native 0.68.2
In what environment did this happen?
Detox version: 19.7.1 (latest) React Native version: 0.68.2 Node version: v14.x Device model: 15.5 Simulator iOS version: 15.5 macOS version: macOS Monterey Xcode version: 12.3.1 Test-runner (select one): jest-circus
Detox logs
No response
Device logs
No response
More data, please!
No response
Hey @shamilovtim, thanks for the report. This error makes sense since Detox is not yet compatible with RN 0.68. We are working on it these days. However, once we'll finish with the upgrade we will investigate your issue if it still happens.
hey @asafkorem
You say that Detox is not yet compatible with RN 0.68. This applies to 0.67.1 too?
Thanks
@xavimodo Detox is compatible with RN 0.67.2
Please retry using Detox 19.8.x
I have the same issue with latest detox (19.9.1) and RN 68.2. All works fine on my local machine, but on Github actions I have this error. It is the same for macos-latest (macos v11) and macos-12 vms.
+1 to above. "detox": "19.9.1" "react-native": "0.68.2"
Running locally on macOS Monterey.
Interestingly enough, it works on a real Android device. but fails on the emulator (also works fine on iOS)
Yeah judging by the responses it looks like this never got fixed. I was curious when you responded how it was possible this got resolved in 19.8.x because when I looked at your PRs for react native 68 they had no actual changes to the logic of Detox. What those PRs did was upgrade your example app but they did not change Detox. @d4vidi @asafkorem
Hey @shamilovtim and everyone. Thanks for reporting this. Based on what you've described, I'm inclined to attribute this to some kind of a race condition, rather than the very specifics of the execution environment.
We haven't noticed this happening in any of our own environment (trust me, there are quite a few). Therefore, we would love to get more detailed logs from a session where this takes place, from either of you. We will not be able to sort this out, otherwise... It would help a great deal. Thanks.
I'll try to jump on this as soon as I can. I recall when I was working on this issue I was having a problem getting any logging because the crash seemed to be inside of Detox's lifecycle methods rather than in my app's logic so all of the crash details seemed hidden away from me. Is there anything I can do about that? @d4vidi
@shamilovtim I'm not 100% sure what you're referring too. You can run detox with the --loglevel trace arg, it should definitely provide a huge chunk of logs, that would make a great starting point for us.
@shamilovtim I'm not 100% sure what you're referring too. You can run
detoxwith the--loglevel tracearg, it should definitely provide a huge chunk of logs, that would make a great starting point for us.
I'll give that a shot, thanks.
logs.txt Here are the logs from my run. Also, this is the emulator config if they are of any interest: avd-setup.sh.txt avd-config_ini.sh.txt
I'm using iOS 15.5, Detox 19.11.0, and React Native 0.69.5 in an app generated by Expo 46. I see this same issue when running in GitHub Actions.
Everything works fine when I run it locally on my M1. I added --loglevel trace and --debug-synchronization 500 to my job and you can see the failing job at the following URL:
https://github.com/jhipster/generator-jhipster-react-native/runs/8145635035?check_suite_focus=true
I'm using iOS 15.5, Detox 19.11.0, and React Native 0.69.5 in an app generated by Expo 46. I see this same issue when running in GitHub Actions.
Everything works fine when I run it locally on my M1. I added
--loglevel traceand--debug-synchronization 500to my job and you can see the failing job at the following URL:https://github.com/jhipster/generator-jhipster-react-native/runs/8145635035?check_suite_focus=true
I'm having the same issue with Circle CI. Works on my local M1 but fails the Circle CI build with this error. Where you ever to figure out a fix?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this repository, read this discussion.
We are still experiencing this problem
+1 to above. "detox": "19.9.1" "react-native": "0.68.2"
Running locally on macOS Monterey.
Interestingly enough, it works on a real Android device. but fails on the emulator (also works fine on iOS)
The issue relates to iOS failures, not Android, and you say that you have no problems on iOS. I suggest opening a separate issue with your error since I'm afraid it will disappear in this issue context. @wadey1
We are still experiencing this problem
@shamilovtim, as @d4vidi already mentioned, we need more context (logs) in order to investigate this problem.
I need to get the logs for you. It's happening on other people's machines so I can't collect them myself.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions!
For more information on bots in this repository, read this discussion.
@shamilovtim is it still relevant?
@asafkorem ~yeah this is still a huge source of flakes sadly. I've also reproduced it on a m1 max now too.~
Wrong ticket
@shamilovtim Could you do something about those logs, then?
@wadey1 please submit your problem via a different issue. AppWillTerminateWithError is a general error, and doesn't say much about the source of the problem - which is likely different than @shamilovtim's. In any case, I can see where your error is coming from.
I'm going to close this. I don't have it on my machine and I think it has disappeared for my coworkers.
Thanks @shamilovtim
I amended my comment a few above. Don't know if I was half asleep or what but the "huge source of flakes" I was referring to was the signal 11 error