抓取的 macaca 启动服务的日志如下,启动真机 iphone,却启动了模拟器(代码中 udid 是真机的):
index.js:15:12 [master] pid:11843 webdriver server start with config:
{ port: 3475,
verbose: true,
always: true,
ip: '192.168.1.100',
host: 'Seadragon',
loaded_time: '2018-11-23 17:51:04' }
middlewares.js:17:10 [master] pid:11843 base middlewares attached
router.js:132:10 [master] pid:11843 router set
Macaca server started
responseHandler.js:11:12 [master] pid:11843 Recieve HTTP Request from Client[2018-11-23 17:51:05]: method: GET url: /wd/hub/status, jsonBody: {}
responseHandler.js:49:14 [master] pid:11843 Send HTTP Respone to Client[2018-11-23 17:51:05]: {"sessionId":"","status":0,"value":"{\"build\":{},\"os\":{\"arch\":\"x64\",\"name\":\"darwin\",\"version\":\"\"}}"}
responseHandler.js:11:12 [master] pid:11843 Recieve HTTP Request from Client[2018-11-23 17:51:33]: method: POST url: /wd/hub/session, jsonBody: {"desiredCapabilities":{"platformName":"iOS","platformVersion":"12.0.1","deviceName":"“seadragon” 的 iPhone","udid":"00008020-00067C941E92002E","bundleId":"com.qiyi.iphone"}}
session.js:58:10 [master] pid:11843 Creating session, sessionId: cf3f589a-fb97-414e-a75d-8bdffc6f35d8.
ios-deploy
macaca-ios.js:328:12 [master] pid:11843 Kill simulator failed Error: Command failed: killAll Simulator
No matching processes belonging to you were foundmacaca-ios.js:334:12 [master] pid:11843 Shutdown simulator 00008020-00067C941E92002E failed Error: Command failed: xcrun simctl shutdown "00008020-00067C941E92002E"
Invalid device: 00008020-00067C941E92002EresponseHandler.js:56:12 [master] pid:11843 Send Error Respone to Client: UnknownError: Simulator 00008020-00067C941E92002E is not booted.
responseHandler.js:62:14 [master] pid:11843 UnknownError: Simulator 00008020-00067C941E92002E is not booted.
at device.isBooted.then.isBooted (/usr/local/lib/node_modules/macaca-ios/lib/macaca-ios.js:351:20)
at
at process._tickCallback (internal/process/next_tick.js:189:7)
responseHandler.js:78:14 [master] pid:11843 Send Bad HTTP Respone to Client[2018-11-23 17:52:17]: {"sessionId":"cf3f589a-fb97-414e-a75d-8bdffc6f35d8","status":13,"value":{"message":"Simulator 00008020-00067C941E92002E is not booted."}}
有个帖子的回复中有人提到这个,但是却没有下文。无奈之下,只能论坛找大佬问一下咯。
@xdf 求解,多谢