DeviceFarmer / stf

Control and manage Android devices from your browser.
https://devicefarmer.github.io
Other
3.4k stars 484 forks source link

Device unresponsive after running automations #230

Open oribenzvi opened 3 years ago

oribenzvi commented 3 years ago

When we are running test automations on multiple devices, the first minutes seems fine, but after a while or when i'm stopping the tests manually, all the devices becomes unresponsive - can't perform any actions on them, can't even stop using them or pressing stop button.

Logs from stf: Until here all the devices working perfectly, the automation is running, usual logs (until the error occurs - after a while or when I'm stopping the tests manually, with the exception attached, and then spamming 'Waiting for boot to complete')

2021-04-08T16:02:39.088Z INF/device:plugins:group 27121 ["****"] Unsubscribing from group channel "["****"]" 2021-04-08T16:02:39.238Z IMP/device:plugins:group 27111 ["****"] No longer owned by "user@mail.com" Unhandled rejection TimeoutError: operation timed out at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5) From previous event: at EventEmitter.plugin.releaseWakeLock (/usr/lib/node_modules/@devicefarmer/stf/lib/units/device/plugins/service.js:472:10) at EventEmitter. (/usr/lib/node_modules/@devicefarmer/stf/lib/units/device/plugins/group.js:111:15) at emitOne (events.js:121:20) at EventEmitter.emit (events.js:211:7) at /usr/lib/node_modules/@devicefarmer/stf/lib/units/device/plugins/group.js:95:18 From previous event: at EventEmitter.plugin.leave (/usr/lib/node_modules/@devicefarmer/stf/lib/units/device/plugins/group.js:78:10) at /usr/lib/node_modules/@devicefarmer/stf/lib/units/device/plugins/group.js:153:27 at runCallback (timers.js:810:20) at tryOnImmediate (timers.js:768:5) at processImmediate [as _immediateCallback] (timers.js:745:5) From previous event: at Router. (/usr/lib/node_modules/@devicefarmer/stf/lib/units/device/plugins/group.js:152:12) at Router.emit (/usr/lib/node_modules/@devicefarmer/stf/node_modules/eventemitter3/index.js:118:35) at Router. (/usr/lib/node_modules/@devicefarmer/stf/lib/wire/router.js:36:12) at emitTwo (events.js:126:13) at exports.Socket.emit (events.js:214:7) at exports.Socket.Socket._flushRead (/usr/lib/node_modules/@devicefarmer/stf/node_modules/zmq/lib/index.js:638:15) at exports.Socket.Socket._flushReads (/usr/lib/node_modules/@devicefarmer/stf/node_modules/zmq/lib/index.js:676:23) at Object._zmq.onReadReady (/usr/lib/node_modules/@devicefarmer/stf/node_modules/zmq/lib/index.js:297:10)

2021-04-08T16:03:11.498Z INF/device:support:adb 31013 [["****"]] Waiting for boot to complete 2021-04-08T16:03:11.742Z INF/device:support:adb 31021 [["****"]] Waiting for boot to complete 2021-04-08T16:03:12.448Z INF/device:support:adb 31013 [["****"]] Waiting for boot to complete 2021-04-08T16:03:12.743Z INF/device:support:adb 31021 [["****"]] Waiting for boot to complete 2021-04-08T16:03:13.450Z INF/device:support:adb 31013 [["****"]] Waiting for boot to complete 2021-04-08T16:03:13.744Z INF/device:support:adb 31021 [["****"]] Waiting for boot to complete

Attached photos: First - devices stuck at 'stop automation' state - unresponsive Second - Device state - unresponsive Third - devices stuck at 'stop using' state - unresponsive Fourth - chrome developer options console showing error while pressing device home button

first second third fourth

The log keeps printing the same error massages, nothing works until we restart the stf service, pls help, Thanks!

cmesav commented 2 years ago

Hello, I have some related problem, when I execute parallel automation, in two devices with same version of android the proces fails, and I have to kill my adb local server and manually disable the use of the device in STF. But if I execute in parallel in diferent versions of SO Example 9-10 the execution is succeful, I execute in local with the same devices with same SO and its ok, but when I use STF fails.