Detox websocket timeout

Created on 10 Jul 2020  Â·  5Comments  Â·  Source: wix/Detox

Description

I'm trying to run detox test but it hangs on server listening. The detox build works perfectly.

detox[6953] INFO:  [DetoxServer.js] server listening on localhost:50423...
detox[6953] ERROR: [AsyncWebSocket.js/WEBSOCKET_ERROR] caught error: Error: connect ETIMEDOUT 10.40.165.70:50423
  err: Error: connect ETIMEDOUT 10.40.165.70:50423
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1161:14)
detox[6953] ERROR: [DetoxExportWrapper.js/DETOX_INIT_ERROR]

  • [X ] I have tested this issue on the latest Detox release and it still reproduces

Reproduction

Provide the steps necessary to reproduce the issue. If you are seeing a regression, try to provide the last known version where the issue did not reproduce.

  1. Git init any react-native project.
  2. Install all the detox tools.
  3. Run detox build
  4. Run detox test

Expected behavior

The application should start up.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Detox: 17.1.1
  • React Native: react-native: 0.63.0
  • Node: v10.9.0
  • Device: iPhone 11 Pro
  • Xcode: 11.5
  • iOS:
  • macOS: 10.15.5

Logs

If you are experiencing a timeout in your test

If you are seeing a build problem (e.g. during npm install)

  • [ ] I am providing the npm install log below:

Device and verbose Detox logs

  • [x ] I have run my tests using the --loglevel trace argument and am providing the verbose log below:
➜  detoxTest detox test --loglevel trace

detox[7868] INFO:  [test.js] node_modules/.bin/mocha --config e2e/.mocharc.json --loglevel trace --invert --grep :android: --use-custom-logger "true" e2e


detox[7869] TRACE: [Detox.js/DETOX_CREATE] created a Detox instance with config:
{"artifactsConfig":{"rootDir":"artifacts/ios.sim.debug.2020-07-10 17-28-04Z","plugins":{"log":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"screenshot":{"enabled":true,"shouldTakeAutomaticSnapshots":false,"keepOnlyFailedTestsArtifacts":false},"video":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"instruments":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"timeline":{"enabled":false}},"pathBuilder":{"_rootDir":"artifacts/ios.sim.debug.2020-07-10 17-28-04Z"}},"behaviorConfig":{"init":{"reinstallApp":true,"exposeGlobals":true,"launchApp":true},"cleanup":{"shutdownDevice":false}},"cliConfig":{"loglevel":"trace","useCustomLogger":"true"},"deviceConfig":{"binaryPath":"ios/build/Build/Products/Debug-iphonesimulator/detoxTest.app","build":"xcodebuild -workspace ios/detoxTest.xcworkspace -scheme detoxTest -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build","type":"ios.simulator","device":{"type":"iPhone 11 Pro"}},"runnerConfig":{"testRunner":"mocha","runnerConfig":"e2e/.mocharc.json","specs":"e2e"},"sessionConfig":{"autoStart":true,"server":"ws://localhost:50756","sessionId":"1a226f46-b76f-8c7f-4f49-45c7712b4315"},"errorBuilder":{"filepath":"/Users/mrtaatgen/Documents/Development/Freelance/ReactNativeTest/detoxTest/.detoxrc.json","contents":{"testRunner":"mocha","runnerConfig":"e2e/.mocharc.json","configurations":{"ios.sim.debug":{"binaryPath":"ios/build/Build/Products/Debug-iphonesimulator/detoxTest.app","build":"xcodebuild -workspace ios/detoxTest.xcworkspace -scheme detoxTest -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build","type":"ios.simulator","device":{"type":"iPhone 11 Pro"}}}},"configurationName":"ios.sim.debug"}}
detox[7869] INFO:  [DetoxServer.js] server listening on localhost:50756...
detox[7869] ERROR: [AsyncWebSocket.js/WEBSOCKET_ERROR] caught error: Error: connect ETIMEDOUT 10.40.165.70:50756
  err: Error: connect ETIMEDOUT 10.40.165.70:50756
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1161:14)
triagbug ios

Most helpful comment

I have the exact same issue. Were u able to find a solution ?

All 5 comments

I have the exact same issue. Were u able to find a solution ?

I have the exact same issue. Were u able to find a solution ?

Nope, Nothing so far.

@rotemmiz @noomorph @d4vidi Do you guys have any idea what could be causing this?

@bogoroh could u set up a simple demo app where detox fails in that way?

Hi @d4vidi, Not sure what fixed it but the latest detox (17.2.1 ) Seems to have fixed it. I'm going to close this one for now. Let's hope it remains like this.

Was this page helpful?
0 / 5 - 0 ratings