{"action":"created","issue":{"url":"https://api.github.com/repos/wix/detox/issues/155","repository_url":"https://api.github.com/repos/wix/detox","labels_url":"https://api.github.com/repos/wix/detox/issues/155/labels{/name}","comments_url":"https://api.github.com/repos/wix/detox/issues/155/comments","events_url":"https://api.github.com/repos/wix/detox/issues/155/events","html_url":"https://github.com/wix/detox/issues/155","id":234204887,"number":155,"title":"Tests hanging on before_all hook ","user":{"login":"vspedr","id":9813942,"avatar_url":"https://avatars3.githubusercontent.com/u/9813942?v=4","gravatar_id":"","url":"https://api.github.com/users/vspedr","html_url":"https://github.com/vspedr","followers_url":"https://api.github.com/users/vspedr/followers","following_url":"https://api.github.com/users/vspedr/following{/other_user}","gists_url":"https://api.github.com/users/vspedr/gists{/gist_id}","starred_url":"https://api.github.com/users/vspedr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vspedr/subscriptions","organizations_url":"https://api.github.com/users/vspedr/orgs","repos_url":"https://api.github.com/users/vspedr/repos","events_url":"https://api.github.com/users/vspedr/events{/privacy}","received_events_url":"https://api.github.com/users/vspedr/received_events","type":"User","site_admin":false},"labels":[{"id":393128678,"url":"https://api.github.com/repos/wix/detox/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":61,"created_at":"2017-06-07T13:13:32Z","updated_at":"2017-09-12T12:55:50Z","closed_at":null,"author_association":"NONE","body":"When I run `detox test --configuration ios.sim.release --loglevel verbose --cleanup`, the app is successfully installed and launched, but it won't proceed to run my test cases because it's stuck on the `before()` function in `init.js`. \r\nI tried running the sample project but I couldn't  reproduce the issue :/ any ideas?\r\n\r\n```\r\n...\r\ndetox info 5: Launching com.myapp.myapp... \r\ndetox info 5: com.myapp.myapp launched \r\ndetox verb ws send: {\"type\":\"isReady\",\"params\":{},\"messageId\":1}\r\n  1) \"before all\" hook\r\n  0 passing (2m)\r\n  1 failing\r\n  1)  \"before all\" hook:\r\n     Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves.\r\n```\r\n\r\ninit.js:\r\n```\r\nrequire('babel-polyfill');\r\nconst detox = require('detox');\r\nconst config = require('../package.json').detox;\r\n\r\nbefore(async () => {\r\n  await detox.init(config); // it hangs here :(\r\n});\r\n\r\nafter(async () => {\r\n  await detox.cleanup();\r\n});\r\n```\r\n\r\nconfiguration in package.json:\r\n```\r\n  \"detox\": {\r\n    \"specs\": \"e2e\",\r\n    \"configurations\": {\r\n      \"ios.sim.release\": {\r\n        \"binaryPath\": \"ios/build/Build/Products/Release-iphonesimulator/myapp.app\",\r\n        \"build\": \"export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild -project ios/myapp.xcodeproj -scheme myapp -configuration Release -sdk iphonesimulator -derivedDataPath ios/build\",\r\n        \"type\": \"ios.simulator\",\r\n        \"name\": \"iPhone 5\"\r\n      },\r\n      \"ios.sim.debug\": {\r\n        \"binaryPath\": \"ios/build/Build/Products/Debug-iphonesimulator/myapp.app\",\r\n        \"build\": \"xcodebuild -project ios/myapp.xcodeproj -scheme myapp -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build\",\r\n        \"type\": \"ios.simulator\",\r\n        \"name\": \"iPhone 5\"\r\n      }\r\n    }\r\n  }\r\n```"},"comment":{"url":"https://api.github.com/repos/wix/detox/issues/comments/328844422","html_url":"https://github.com/wix/detox/issues/155#issuecomment-328844422","issue_url":"https://api.github.com/repos/wix/detox/issues/155","id":328844422,"user":{"login":"cristianosantos95","id":7927374,"avatar_url":"https://avatars0.githubusercontent.com/u/7927374?v=4","gravatar_id":"","url":"https://api.github.com/users/cristianosantos95","html_url":"https://github.com/cristianosantos95","followers_url":"https://api.github.com/users/cristianosantos95/followers","following_url":"https://api.github.com/users/cristianosantos95/following{/other_user}","gists_url":"https://api.github.com/users/cristianosantos95/gists{/gist_id}","starred_url":"https://api.github.com/users/cristianosantos95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristianosantos95/subscriptions","organizations_url":"https://api.github.com/users/cristianosantos95/orgs","repos_url":"https://api.github.com/users/cristianosantos95/repos","events_url":"https://api.github.com/users/cristianosantos95/events{/privacy}","received_events_url":"https://api.github.com/users/cristianosantos95/received_events","type":"User","site_admin":false},"created_at":"2017-09-12T12:55:50Z","updated_at":"2017-09-12T12:55:50Z","author_association":"NONE","body":"I'm getting a similar error when I run it on Travis CI. Locally works fine\r\n\r\n``` shell\r\nNode v8.4.0\r\n\r\nyarn list v0.24.6\r\n├─ detox@5.6.2\r\n├─ mocha@3.5.2\r\n└─ react-native@0.48.2\r\n```\r\n\r\n``` shell\r\nThe command \"detox build --configuration ios.sim.debug\" exited with 0.\r\n125.32s$ detox test --configuration ios.sim.debug --cleanup\r\nnode_modules/.bin/mocha ./__e2e__ --opts ./__e2e__/mocha.opts --configuration ios.sim.debug  --cleanup   \r\ndetox-server info 20:30:13: server listening on localhost:52073...\r\ndetox info 1: Listing devices... \r\ndetox info 3: Launching device 15E2107D-EAD2-4E1F-8BC3-59E58E750FB1... \r\ndetox info 4: Waiting for device 15E2107D-EAD2-4E1F-8BC3-59E58E750FB1 to boot... \r\ndetox info 4: Device 15E2107D-EAD2-4E1F-8BC3-59E58E750FB1 booted \r\ndetox info 5: Uninstalling co.torch.Torch... \r\ndetox info 6: Installing /Users/travis/build/MyProject/ios/build/Build/Products/Debug-iphonesimulator/MyProject.app... \r\ndetox info 6: Installing /Users/travis/build/MyProject/ios/build/Build/Products/Debug-iphonesimulator/MyProject.app... \r\ndetox info 6: /Users/travis/build/MyProject/ios/build/Build/Products/Debug-iphonesimulator/MyProject.app installed \r\ndetox info 7: Terminating co.MyProject... \r\ndetox info 7: co.MyProject terminated \r\ndetox info 8: Launching co.MyProject... \r\ndetox info 8: co.MyProject launched. The stdout and stderr logs were recreated, you can watch them with:\r\n        tail -F $HOME/Library/Developer/CoreSimulator/Devices/15E2107D-EAD2-4E1F-8BC3-59E58E750FB1/data/tmp/detox.last_launch_app_log.{out,err} \r\n  1) \"before all\" hook\r\n  0 passing (2m)\r\n  1 failing\r\n  1)  \"before all\" hook:\r\n     Error: Timeout of 120000ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves.\r\n  \r\nchild_process.js:634\r\n    throw err;\r\n    ^\r\nError: Command failed: node_modules/.bin/mocha ./__e2e__ --opts ./__e2e__/mocha.opts --configuration ios.sim.debug  --cleanup   \r\n    at checkExecSyncError (child_process.js:591:13)\r\n    at Object.execSync (child_process.js:631:13)\r\n    at Object.<anonymous> (/Users/travis/build/MyProject/node_modules/detox/local-cli/detox-test.js:46:4)\r\n    at Module._compile (module.js:573:30)\r\n    at Object.Module._extensions..js (module.js:584:10)\r\n    at Module.load (module.js:507:32)\r\n    at tryModuleLoad (module.js:470:12)\r\n    at Function.Module._load (module.js:462:3)\r\n    at Function.Module.runMain (module.js:609:10)\r\n    at startup (bootstrap_node.js:158:16)\r\nThe command \"detox test --configuration ios.sim.debug --cleanup\" exited with 1.\r\nDone. Your build exited with 1.\r\n/Users/travis/.travis/job_stages: line 166: shell_session_update: command not found\r\n```\r\n\r\nAlready tried:\r\n- Node 7.4\r\n- Detox 5.6.0 and 5.5.1\r\n- Build Release instead of Debug\r\n\r\nAny thoughts?"}}
{"actor":{"display_login":"cristianosantos95"}}