测试人社区

[STF] STF 连接不上手机报错

2020-07-11T01:34:55.441Z FTL/device 96461 [emulator-5554] Setup had an error Error: Service had an error: "Error: Not found; no service started."
    at /Users/juanxu/.nvm/versions/node/v8.16.2/lib/node_modules/stf/lib/units/device/plugins/service.js:101:23
From previous event:
    at /Users/juanxu/.nvm/versions/node/v8.16.2/lib/node_modules/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)
2020-07-11T01:34:55.442Z FTL/util:lifecycle 96461 [emulator-5554] Shutting down due to fatal error
2020-07-11T01:34:55.450Z INF/provider 96452 [*] Cleaning up device worker "emulator-5554"
2020-07-11T01:34:55.450Z ERR/provider 96452 [*] Device worker "emulator-5554" died with code 1
2020-07-11T01:34:55.450Z INF/provider 96452 [*] Restarting device worker "emulator-5554"
2020-07-11T01:34:56.191Z INF/device:support:push 96462 [emulator-5554] Sending output to "tcp://127.0.0.1:7116"
2020-07-11T01:34:56.193Z INF/device 96462 [emulator-5554] Preparing device

原因是STFservice 启动失败,手机端清理后台程序也可能导致这个现象。

解决方法:
手动启动STFService服务

adb shell am start -n jp.co.cyberagent.stf/.IdentityActivity

参考链接