Skip to content
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

Detox iOS failing to start intermittently on React Native 0.68.2 #3462

Closed
2 tasks done
shamilovtim opened this issue Jun 30, 2022 · 27 comments
Closed
2 tasks done

Detox iOS failing to start intermittently on React Native 0.68.2 #3462

shamilovtim opened this issue Jun 30, 2022 · 27 comments

Comments

@shamilovtim
Copy link

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?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

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

@asafkorem
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Jul 5, 2022

hey @asafkorem

You say that Detox is not yet compatible with RN 0.68.
This applies to 0.67.1 too?

Thanks

@asafkorem
Copy link
Contributor

@xavimodo Detox is compatible with RN 0.67.2

@shamilovtim shamilovtim mentioned this issue Jul 20, 2022
2 tasks
@d4vidi
Copy link
Collaborator

d4vidi commented Jul 21, 2022

Please retry using Detox 19.8.x

@limpbrains
Copy link

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.

@wadey1
Copy link

wadey1 commented Aug 11, 2022

+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)

@shamilovtim
Copy link
Author

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

@d4vidi
Copy link
Collaborator

d4vidi commented Aug 11, 2022

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.

@shamilovtim
Copy link
Author

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

@d4vidi
Copy link
Collaborator

d4vidi commented Aug 11, 2022

@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
Copy link
Author

@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.

I'll give that a shot, thanks.

@wadey1
Copy link

wadey1 commented Aug 12, 2022

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

@mraible
Copy link

mraible commented Sep 1, 2022

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

@alexkendall
Copy link

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 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?

@stale
Copy link

stale bot commented Oct 16, 2022

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.

@stale stale bot added the 🏚 stale label Oct 16, 2022
@shamilovtim
Copy link
Author

We are still experiencing this problem

@asafkorem asafkorem self-assigned this Oct 18, 2022
@stale stale bot removed the 🏚 stale label Oct 18, 2022
@asafkorem
Copy link
Contributor

asafkorem commented Oct 18, 2022

+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

@asafkorem
Copy link
Contributor

We are still experiencing this problem

@shamilovtim, as @d4vidi already mentioned, we need more context (logs) in order to investigate this problem.

@shamilovtim
Copy link
Author

I need to get the logs for you. It's happening on other people's machines so I can't collect them myself.

@stale
Copy link

stale bot commented Nov 19, 2022

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.

@stale stale bot added the 🏚 stale label Nov 19, 2022
@asafkorem
Copy link
Contributor

@shamilovtim is it still relevant?

@stale stale bot removed the 🏚 stale label Nov 24, 2022
@shamilovtim
Copy link
Author

shamilovtim commented Nov 24, 2022

@asafkorem yeah this is still a huge source of flakes sadly. I've also reproduced it on a m1 max now too.

Wrong ticket

@d4vidi
Copy link
Collaborator

d4vidi commented Nov 27, 2022

@shamilovtim Could you do something about those logs, then?

@d4vidi
Copy link
Collaborator

d4vidi commented Nov 27, 2022

@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.

@shamilovtim
Copy link
Author

I'm going to close this. I don't have it on my machine and I think it has disappeared for my coworkers.

@d4vidi
Copy link
Collaborator

d4vidi commented Nov 28, 2022

Thanks @shamilovtim

@shamilovtim
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants