STF for Mac 系统,连接 android 设备,红米 note8 pro,魅族 16T,系统均为 Android9,stf 时社区之前大佬分享的 iOS 开源的代码,https://testerhome.com/topics/19548stf,用 local —wda-path /Users/hpcl201901056/Documents/WebDriverAgent/ --wda-port 8100 启动之后,一直连不上设备,这是最后的报错:

2019-12-12T11:55:43.315Z INF/middleware:webpack 17250 [*] Bundle is now valid
2019-12-12T11:55:43.528Z INF/webpack:config 17250 [*] Build progress 100% (complete)
2019-12-12T11:56:06.385Z INF/reaper 17246 [reaper001] Reaping device "R28M7157LAT" due to heartbeat timeout

如何用 stf local 启动,红米 note 8 pro 报错:

2019-12-13T02:43:13.356Z INF/util:lifecycle 85005 [*] Winding down for graceful exit
Unhandled rejection CancellationError: cancellation error
    at Promise.cancel (/Users/hpcl201901056/Documents/stf/node_modules/adbkit/node_modules/bluebird/js/main/cancel.js:21:40)
    at Tracker.end (/Users/hpcl201901056/Documents/stf/node_modules/adbkit/lib/adb/tracker.js:81:17)
    at /Users/hpcl201901056/Documents/stf/lib/util/lifecycle.js:42:15
    at /Users/hpcl201901056/Documents/stf/lib/util/lifecycle.js:55:12
    at Array.map (<anonymous>)
    at Lifecycle.graceful (/Users/hpcl201901056/Documents/stf/lib/util/lifecycle.js:54:41)
    at emitOne (events.js:116:13)
    at process.emit (events.js:211:7)
    at Signal.wrap.onsignal (internal/process.js:197:44)
2019-12-13T02:43:13.368Z INF/provider 85005 [*] Device worker "qc6hz5rs99lnswgq" has retired
2019-12-13T02:43:13.380Z INF/util:lifecycle 85008 [*] Winding down for graceful exit

魅族 16t 报错如下:

2019-12-13T02:48:47.492Z FTL/device 86826 [928QAEVK2226F] Setup had an error Error: Service had an error: "Error: Not found; no service started."
    at /Users/hpcl201901056/Documents/stf/lib/units/device/plugins/service.js:101:23
From previous event:
    at /Users/hpcl201901056/Documents/stf/lib/units/device/plugins/service.js:76:14
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)
2019-12-13T02:48:47.492Z FTL/util:lifecycle 86826 [928QAEVK2226F] Shutting down due to fatal error


↙↙↙阅读原文可查看相关链接,并与作者交流