Search code examples
iosreact-nativejestjsdetox

Detox E2E tests won't run on react-native project


I'm trying to implement detox for E2E testing in a react-native project and when I try to run the detox test command it just hangs

When I run a debug synchronization I think this is the issue I'm running into:

DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=f1dbfa2b-7dff-df8d-8a71-66b0b637f61d)

and then ultimately this spits out in a loop:

etox[63865] INFO:  [actions.js] Sync JavaScript Timers: Javascript Timers Ids: 13729, 13730
detox[63865] INFO:  [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[63865] INFO:  [actions.js] Sync JavaScript Timers: Javascript Timers Ids: 13741, 13742
detox[63865] INFO:  [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[63865] INFO:  [actions.js] Sync WXRunLoopIdlingResource: React Native thread is busy.
detox[63865] INFO:  [actions.js] Sync Dispatch Queue: com.apple.main-thread
detox[63865] INFO:  [actions.js] Sync Dispatch Queue: com.facebook.react.ShadowQueue

Solution

  • was able to resolve, our RN app had a load animation splash screen affecting the session to be connected. Was able to resolve by disabling animations during tests