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

Timeout issues on CI #356

Closed
DanielMSchmidt opened this issue Oct 23, 2017 · 6 comments · Fixed by #373
Closed

Timeout issues on CI #356

DanielMSchmidt opened this issue Oct 23, 2017 · 6 comments · Fixed by #373

Comments

@DanielMSchmidt
Copy link
Contributor

Description

I wanted to E2E test my project and created a new react-native init generated project with a very simple test. Running this locally worked, on CI the tests seem to be hanging.

Steps to Reproduce

I am not exactly sure what exactly lead to this problem, but my test config looks like this.
My travis config is a matrix one because I want to support web and native and looks quite similar to the one in detox.

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 5.9.1

  • Node: 8.7

  • Device: Travis

  • Xcode: 9

  • macOS: Travis

  • react-native: 0.49.3

Device and verbose Detox logs

The complete logs are on Travis, but the main error looks like this:

detox info 08:34:45: server listening on localhost:53196...

detox info 1: Searching for device matching iPhone 7... 

detox info 5: Booting device 5BABCDC9-5EAF-4E60-96C0-F78309091348 

detox info Building Detox.framework (5.9.2) into /Users/travis/Library/Detox/ios/c51c4126753e64eff2e0e7cc9c999c1db0cd3110... 

/Users/travis/build/react-tracing/react-tracing/example/react-native-example/node_modules/detox/scripts/build_framework.ios.sh "/Users/travis/build/react-tracing/react-tracing/example/react-native-example/node_modules/detox" "/Users/travis/Library/Detox/ios/c51c4126753e64eff2e0e7cc9c999c1db0cd3110"

###############################

Extracting Detox sources...

###############################

###############################

Extracting Detox sources...

  1) "before all" hook

  0 passing (2m)

  1 failing

  1) "before all" hook:

     Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

child_process.js:635

    throw err;

    ^
Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts --configuration ios.sim.release    --debug-synchronization 10000 

    at checkExecSyncError (child_process.js:592:13)

    at Object.execSync (child_process.js:632:13)

    at runMocha (/Users/travis/build/react-tracing/react-tracing/example/react-native-example/node_modules/detox/local-cli/detox-test.js:56:6)

    at Object.<anonymous> (/Users/travis/build/react-tracing/react-tracing/example/react-native-example/node_modules/detox/local-cli/detox-test.js:36:5)

    at Module._compile (module.js:624:30)

    at Object.Module._extensions..js (module.js:635:10)

    at Module.load (module.js:545:32)

    at tryModuleLoad (module.js:508:12)

    at Function.Module._load (module.js:500:3)

    at Function.Module.runMain (module.js:665:10)

error Command failed with exit code 1.
@rotemmiz
Copy link
Member

rotemmiz commented Oct 23, 2017

This is a change introduced in Detox 5.7.0. In order to support apps with Swift we had to compile Detox.framework on the same machine that compiles the app. This is an extra step that runs in detox.init() and compiles the framework to ~/Library/Detox/ios/{versionHash}.

Clearly is was not a good idea to compile it during the first test setup (which will always happen in newly bootstrapped VMs, such as Travis build agents).

I am working on a fix, moving the framework compilation to a postinstall script.
In the meantime, just increase the timeout, I'll update when the fix is published.

Hang tight.

@rotemmiz
Copy link
Member

cc @doronpr

rotemmiz added a commit that referenced this issue Oct 26, 2017
…epare to attemp to fix #356 (Timeouts while running detox.init()).
@alexgv14
Copy link

alexgv14 commented Nov 1, 2017

@rotemmiz I'm having the same issue what do you mean by "just increase the timeout"

rotemmiz added a commit that referenced this issue Nov 1, 2017
* Move Detox.framework compilation to postinstall rather than driver prepare to attemp to fix #356 (Timeouts while running detox.init()).

* fixed postinstall issues

* only build iOS source package on mac
@DanielMSchmidt
Copy link
Contributor Author

@rotemmiz Which version includes this fix? Is there a release yet?

@rotemmiz
Copy link
Member

rotemmiz commented Nov 1, 2017

@DanielMSchmidt it was merged after build passed, but master fails now, I'll make sure it passes before releasing.

@rotemmiz
Copy link
Member

rotemmiz commented Nov 2, 2017

@DanielMSchmidt , 5.9.3 is out

@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants