question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Detox iOS failing to start intermittently on React Native 0.68.2

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:27 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
asafkoremcommented, 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

1reaction
shamilovtimcommented, Aug 11, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dealing With Problems With Running Tests | Detox
This page is about issues related to executing your Detox tests, typically triggered when running detox test (and not detox build, for example)....
Read more >
Ignite (@ir_ignite) / Twitter
FYI -- Detox may fail intermittently on this release, but it's because the Detox team is still working on 0.68 support!
Read more >
Detox: iOS unable to Match className - react native
DetoxRuntimeError : Test Failed: No elements found for “MATCHER(class ⊇ “RCTTextView”)”. Below is the elements I get when I use ...
Read more >
React Native end-to-end testing with Detox - LogRocket Blog
For the sake of brevity, we'll only focus on the iOS flow. Let's get started! You can access the full code for this...
Read more >
React Native Monthly #2
It will allow investigating the performance of iOS apps in general. It will also be integrated with detox so we can run automated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found