Skip to content

Simulators are not up and running on STF after restart mac #238

@dhreben

Description

@dhreben

Steps:

  1. Restart mac mini
  2. Open Xcode and verify that simulators are running on Xcode
  3. ./zebrunner.sh status
Apple_TV (DBF722DB-C6BB-4F72-9828-438DE90795B7) is unhealthy!
iPhone_13 (D77F3CD0-A614-4699-940A-2A7D00AFF164) is unhealthy!

Actual result: Simulators are not up and running on STF after restart mac

logs:

idmclouds-Mac-mini:mcloud-ios idmcloud$ tail -n 100 -f ./logs/Apple_TV.log
    sub: [ 'tcp://demo.zebrunner.farm:7250' ],
    push: [ 'tcp://demo.zebrunner.farm:7270' ],
    appDealer: [ 'tcp://demo.zebrunner.farm:7160' ],
    devDealer: [ 'tcp://demo.zebrunner.farm:7260' ]
  },
  groupTimeout: 3600000,
  storageUrl: 'https://demo.zebrunner.farm:443/',
  adbHost: '127.0.0.1',
  adbPort: 5037,
  screenJpegQuality: 30,
  screenPingInterval: 30000,
  screenPort: 7741,
  screenWsUrlPattern: 'wss://demo.zebrunner.farm:443/d/192.168.89.189/DBF722DB-C6BB-4F72-9828-438DE90795B7/7741/',
  connectUrlPattern: '${publicIp}:${publicPort}',
  connectPort: 20042,
  wdaHost: 'localhost',
  wdaPort: 20041,
  vncInitialSize: [ 600, 800 ],
  heartbeatInterval: 10000,
  bootCompleteTimeout: 60000,
  muteMaster: 'never',
  lockRotation: false,
  cleanup: false,
  screenReset: true,
  udidStorage: false,
  iproxy: false,
  deviceName: 'Apple_TV',
  deviceType: 'tvOS',
  host: '192.168.89.189'
}
2023-04-27T14:00:13.648Z INF/device:support:sub 76847 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Receiving input from "tcp://demo.zebrunner.farm:7250"
2023-04-27T14:00:13.683Z INF/device:support:sub 76847 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Subscribing to permanent channel "*ALL"
2023-04-27T14:00:13.688Z INF/device:plugins:solo 76847 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Subscribing to permanent channel "NBr+UpPh/I1as/90nggIPNoZUVw="
2023-04-27T14:00:13.691Z INF/wdaClient 76847 [DBF722DB-C6BB-4F72-9828-438DE90795B7] WdaClient.js initializing...
connecting to WdaMjpeg
2023-04-27T14:00:13.716Z INF/device:info 76847 [DBF722DB-C6BB-4F72-9828-438DE90795B7] device.name: Apple_TV
node:events:368
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::7741
    at Server.setupListenHandle [as _listen2] (node:net:1334:16)
    at listenInCluster (node:net:1382:12)
    at Server.listen (node:net:1469:7)
    at new WebSocketServer (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/ws/lib/WebSocketServer.js:76:20)
    at /Users/idmcloud/tools/mcloud-ios/stf/lib/units/ios-device/plugins/screen/stream.js:20:19
    at SerialSyrup.ParallelSyrup.invoke (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/lib/parallel.js:54:24)
    at /Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/lib/serial.js:43:33
    at tryCatch1 (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/node_modules/bluebird/js/main/util.js:63:19)
    at Promise$_callHandler [as _callHandler] (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/node_modules/bluebird/js/main/promise.js:708:13)
    at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/node_modules/bluebird/js/main/promise.js:724:18)
    at Promise$_settlePromiseAt [as _settlePromiseAt] (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/node_modules/bluebird/js/main/promise.js:896:14)
    at Promise$_fulfillPromises [as _fulfillPromises] (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/node_modules/bluebird/js/main/promise.js:1041:14)
    at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/node_modules/bluebird/js/main/async.js:74:12)
    at Async$consumeFunctionBuffer (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/@devicefarmer/stf-syrup/node_modules/bluebird/js/main/async.js:37:14)
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
Emitted 'error' event on WebSocketServer instance at:
    at Server.<anonymous> (/Users/idmcloud/tools/mcloud-ios/stf/node_modules/ws/lib/WebSocketServer.js:84:46)
    at Server.emit (node:events:390:28)
    at emitErrorNT (node:net:1361:8)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'EADDRINUSE',
  errno: -48,
  syscall: 'listen',
  address: '::',
  port: 7741
}

Node.js v17.1.0
2023-04-27T14:00:29.597Z IMP/device:plugins:group 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Now owned by "admin@fakedomain.com"
2023-04-27T14:00:29.597Z INF/device:plugins:group 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Subscribing to group channel "KfvLf/CDTGm61GI+p2NHwQ=="
2023-04-27 17:00:30.653 WebDriverAgentRunner_tvOS-Runner[70732:2975643] Got screenshots broadcast client connection at ::1:55193
2023-04-27 17:00:30.654 WebDriverAgentRunner_tvOS-Runner[70732:2975650] Starting screenshots broadcast for the client at ::1:55193
2023-04-27T14:00:30.656Z INF/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] verifying wda session status...
2023-04-27 17:00:30.677 WebDriverAgentRunner_tvOS-Runner[70732:2975462] Getting the most recent active application (out of 1 total items)
2023-04-27 17:00:30.677 WebDriverAgentRunner_tvOS-Runner[70732:2975462] Cannot retrieve any active applications. Assuming the system application is the active one
    t =    40.21s Find the Application 'com.apple.PineBoard'
    t =    40.21s     Requesting snapshot of accessibility hierarchy for app with pid 66846
2023-04-27T14:00:30.706Z VRB/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Request has been sent to WDA with data:  {"method":"POST","uri":"http://localhost:20041/session","body":{"capabilities":{}},"json":true}
2023-04-27T14:00:30.714Z VRB/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Request has been sent to WDA with data:  {"method":"GET","uri":"http://localhost:20041/status","json":true}
2023-04-27T14:00:30.716Z INF/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] status response: {"value":{"message":"WebDriverAgent is ready to accept commands","state":"success","os":{"testmanagerdVersion":28,"name":"tvOS","sdkVersion":"16.0","version":"16.0"},"ios":{"simulatorVersion":"16.0","ip":"192.168.89.189"},"ready":true,"build":{"time":"Jan 17 2023 16:01:58","productBundleIdentifier":"com.facebook.WebDriverAgentRunner"}},"sessionId":"5A75AB9A-C635-41EE-B160-B4D53BF68664"}
2023-04-27T14:00:30.717Z INF/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] reusing existing wda session: 5A75AB9A-C635-41EE-B160-B4D53BF68664
2023-04-27T14:00:30.717Z INF/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] getting device window size...
2023-04-27 17:00:30.726 WebDriverAgentRunner_tvOS-Runner[70732:2975462] Getting the most recent active application (out of 1 total items)
2023-04-27 17:00:30.726 WebDriverAgentRunner_tvOS-Runner[70732:2975462] Cannot retrieve any active applications. Assuming the system application is the active one
    t =    40.25s Find the Application 'com.apple.PineBoard'
    t =    40.26s     Requesting snapshot of accessibility hierarchy for app with pid 66846
2023-04-27T14:00:30.754Z VRB/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Request has been sent to WDA with data:  {"method":"GET","uri":"http://localhost:20041/session/5A75AB9A-C635-41EE-B160-B4D53BF68664/window/size"}
2023-04-27 17:00:30.762 WebDriverAgentRunner_tvOS-Runner[70732:2975462] Getting the most recent active application (out of 1 total items)
2023-04-27 17:00:30.762 WebDriverAgentRunner_tvOS-Runner[70732:2975462] Cannot retrieve any active applications. Assuming the system application is the active one
    t =    40.29s Get all elements bound by index for: Descendants matching type StatusBar
    t =    40.30s     Requesting snapshot of accessibility hierarchy for app with pid 66846
    t =    40.31s     Find: Descendants matching type StatusBar
2023-04-27T14:00:30.789Z VRB/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Request has been sent to WDA with data:  {"method":"GET","uri":"http://localhost:20041/session/5A75AB9A-C635-41EE-B160-B4D53BF68664/wda/screen"}
2023-04-27T14:00:32.067Z VRB/wda:client 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] wire.TypeMessage:  { key: 'home' }
    t =    41.73s Pressing Home button
2023-04-27T14:00:32.524Z VRB/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Request has been sent to WDA with data:  {"method":"POST","uri":"http://localhost:20041/session/5A75AB9A-C635-41EE-B160-B4D53BF68664/wda/pressButton","body":{"name":"home"},"json":true}
2023-04-27 17:00:32.691 WebDriverAgentRunner_tvOS-Runner[70732:2975462] Continuing to run tests in the background with task ID 2
    t =    47.02s Pressing Select button
2023-04-27T14:00:37.714Z VRB/wdaClient 74883 [DBF722DB-C6BB-4F72-9828-438DE90795B7] Request has been sent to WDA with data:  {"method":"POST","uri":"http://localhost:20041/session/5A75AB9A-C635-41EE-B160-B4D53BF68664/wda/pressButton","body":{"name":"select"},"json":true}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions