wix / Detox

Gray box end-to-end testing and automation framework for mobile apps
https://wix.github.io/Detox/
MIT License
11.13k stars 1.92k forks source link

Detox.init() hangs on latest version of detox #2107

Closed OrLevy23 closed 4 years ago

OrLevy23 commented 4 years ago

Description

I've updated detox version from 15.1.4 to 16.7.2 and after this update it looks like the app does not launch properly. the weird thing here is that i see splash screen stuck and when i try to reopen the app (manually from simulator) it launches properly

Environment (please complete the following information):

Logs


detox[27734] DEBUG: [exec.js/SPAWN_CMD, #6] [pid=27801] /usr/bin/xcrun simctl spawn EB07FF5A-D2CC-4AEF-834C-8F35018B824E log stream --level debug --style compact --predicate "processImagePath beginsWith \"/Users/orlevy/Library/Developer/CoreSimulator/Devices/EB07FF5A-D2CC-4AEF-834C-8F35018B824E/data/Containers/Bundle/Application/0DE7C40D-9896-4689-BF2C-C6657884ECA0/TapingoKiosk.app\""
detox[27734] DEBUG: [exec.js/EXEC_CMD, #7] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/orlevy/Library/Detox/ios/299e5391b26cd7803f6779ebc468aa8df1bce60b/Detox.framework/Detox" /usr/bin/xcrun simctl launch EB07FF5A-D2CC-4AEF-834C-8F35018B824E com.tapingo.kiosk --args -detoxServer "ws://localhost:56093" -detoxSessionId "891e88e3-d4f8-89ed-23f8-176d0d477d0b"
detox[27734] DEBUG: [exec.js/EXEC_TRY, #7] Launching com.tapingo.kiosk...
detox[27734] TRACE: [exec.js/EXEC_SUCCESS, #7] com.tapingo.kiosk: 27815

detox[27734] DEBUG: [exec.js/EXEC_CMD, #8] /usr/bin/xcrun simctl get_app_container EB07FF5A-D2CC-4AEF-834C-8F35018B824E com.tapingo.kiosk
detox[27734] TRACE: [exec.js/EXEC_SUCCESS, #8] /Users/orlevy/Library/Developer/CoreSimulator/Devices/EB07FF5A-D2CC-4AEF-834C-8F35018B824E/data/Containers/Bundle/Application/0DE7C40D-9896-4689-BF2C-C6657884ECA0/TapingoKiosk.app

detox[27734] INFO:  [AppleSimUtils.js] com.tapingo.kiosk launched. To watch simulator logs, run:
        /usr/bin/xcrun simctl spawn EB07FF5A-D2CC-4AEF-834C-8F35018B824E log stream --level debug --style compact --predicate 'process == "TapingoKiosk"'
detox[27815] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ bundleId: 'com.tapingo.kiosk',
  deviceId: 'EB07FF5A-D2CC-4AEF-834C-8F35018B824E',
  launchArgs:
   { detoxServer: 'ws://localhost:56093',
     detoxSessionId: '891e88e3-d4f8-89ed-23f8-176d0d477d0b' },
  pid: 27815 })
detox[27734] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[27734] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=891e88e3-d4f8-89ed-23f8-176d0d477d0b)
detox[27734] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=891e88e3-d4f8-89ed-23f8-176d0d477d0b)```
andrejslogins commented 4 years ago

iOS simulator version should be iOS 12.2 or higher as per breaking changes in v16 of detox - try running the iOS 13.x simulators

rotemmiz commented 4 years ago

Also, we found that hangs caused when switching to Detox 16 only happen on certain computers, although we couldn't pinpoint the exact cause yet, it seems like reinstalling Xcode solves this.

LeoNatan commented 4 years ago

Update your simulator as mentioned above.

smakosh commented 4 years ago

the issue is occurring for me on Xcode 13.3