DeviceFarmer / stf

Control and manage Android devices from your browser.

Home Page:https://devicefarmer.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setup had an error PrematureEOFError: Premature end of stream, needed 1 more bytes

weibingtie opened this issue · comments

My device is mounted on STF and drops after running for a while. To re mount, I need to restart the device and STF to mount. Have you encountered this problem before?

2024-05-31T01:22:43.491Z INF/device:support:abi 13407 [172.10.23.117:5555] Supports ABIs arm64-v8a, armeabi-v7a, armeabi
2024-05-31T01:22:43.568Z INF/device:resources:service 13391 [172.10.23.116:5555] Installing STFService
2024-05-31T01:22:43.600Z INF/device:resources:minicap 13407 [172.10.23.117:5555] Installing "/app/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/arm64-v8a/bin/minicap" as "/data/local/tmp/minicap"
2024-05-31T01:22:43.601Z INF/device:resources:minicap 13407 [172.10.23.117:5555] Installing "/app/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/arm64-v8a/lib/android-27/minicap.so" as "/data/local/tmp/minicap.so"
2024-05-31T01:22:43.601Z INF/device:resources:minicap 13407 [172.10.23.117:5555] Installing "/app/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk" as "/data/local/tmp/minicap.apk"
2024-05-31T01:22:43.603Z INF/device:resources:service 13397 [172.10.23.123:5555] Checking whether we need to install STFService
2024-05-31T01:22:43.756Z INF/device:support:adb 13078 [172.10.23.102:5555] Waiting for boot to complete
2024-05-31T01:22:44.276Z INF/device:resources:service 13397 [172.10.23.123:5555] Installing STFService
2024-05-31T01:22:44.432Z INF/device:resources:service 13407 [172.10.23.117:5555] Checking whether we need to install STFService
2024-05-31T01:22:44.757Z INF/device:support:adb 13078 [172.10.23.102:5555] Waiting for boot to complete
2024-05-31T01:22:44.859Z FTL/device 13391 [172.10.23.116:5555] Setup had an error PrematureEOFError: Premature end of stream, needed 1 more bytes
at Socket. (/app/node_modules/@devicefarmer/adbkit/lib/adb/parser.js:118:32)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2024-05-31T01:22:44.860Z FTL/util:lifecycle 13391 [172.10.23.116:5555] Shutting down due to fatal error
2024-05-31T01:22:44.877Z INF/provider 143 [] Cleaning up device worker "172.10.23.116:5555"
2024-05-31T01:22:44.877Z ERR/provider 143 [
] Device worker "172.10.23.116:5555" died with code 1
2024-05-31T01:22:44.877Z INF/provider 143 [] Restarting device worker "172.10.23.116:5555"
2024-05-31T01:22:44.932Z INF/device:resources:service 13407 [172.10.23.117:5555] Installing STFService
2024-05-31T01:22:45.518Z FTL/device 13397 [172.10.23.123:5555] Setup had an error PrematureEOFError: Premature end of stream, needed 1 more bytes
at Socket. (/app/node_modules/@devicefarmer/adbkit/lib/adb/parser.js:118:32)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2024-05-31T01:22:45.519Z FTL/util:lifecycle 13397 [172.10.23.123:5555] Shutting down due to fatal error
2024-05-31T01:22:45.536Z INF/provider 143 [
] Cleaning up device worker "172.10.23.123:5555"
2024-05-31T01:22:45.536Z ERR/provider 143 [] Device worker "172.10.23.123:5555" died with code 1
2024-05-31T01:22:45.536Z INF/provider 143 [
] Restarting device worker "172.10.23.123:5555"
2024-05-31T01:22:45.758Z INF/device:support:adb 13078 [172.10.23.102:5555] Waiting for boot to complete
2024-05-31T01:22:46.030Z INF/device:support:push 13427 [172.10.23.116:5555] Sending output to "tcp://127.0.0.1:7116"
2024-05-31T01:22:46.036Z INF/device 13427 [172.10.23.116:5555] Preparing device
2024-05-31T01:22:46.147Z FTL/device 13407 [172.10.23.117:5555] Setup had an error PrematureEOFError: Premature end of stream, needed 1 more bytes
at Socket. (/app/node_modules/@devicefarmer/adbkit/lib/adb/parser.js:118:32)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
2024-05-31T01:22:46.148Z FTL/util:lifecycle 13407 [172.10.23.117:5555] Shutting down due to fatal error
2024-05-31T01:22:46.165Z INF/provider 143 [] Cleaning up device worker "172.10.23.117:5555"
2024-05-31T01:22:46.165Z ERR/provider 143 [
] Device worker "172.10.23.117:5555" died with code 1
2024-05-31T01:22:46.165Z INF/provider 143 [*] Restarting device worker "172.10.23.117:5555"
2024-05-31T01:22:46.701Z INF/device:support:push 13435 [172.10.23.123:5555] Sending output to "tcp://127.0.0.1:7116"
2024-05-31T01:22:46.708Z INF/device 13435 [172.10.23.123:5555] Preparing device
2024-05-31T01:22:46.759Z INF/device:support:adb 13078 [172.10.23.102:5555] Waiting for boot to complete
2024-05-31T01:22:46.773Z INF/device:support:sub 13427 [172.10.23.116:5555] Receiving input from "tcp://127.0.0.1:7114"
2024-05-31T01:22:46.774Z INF/device:support:sub 13427 [172.10.23.116:5555] Subscribing to permanent channel "*ALL"
2024-05-31T01:22:46.836Z INF/device:support:properties 13427 [172.10.23.116:5555] Loading properties
2024-05-31T01:22:46.880Z INF/device:support:sdk 13427 [172.10.23.116:5555] Supports SDK 27
2024-05-31T01:22:46.881Z INF/device:support:abi 13427 [172.10.23.116:5555] Supports ABIs arm64-v8a, armeabi-v7a, armeabi
2024-05-31T01:22:46.939Z INF/device:resources:minicap 13427 [172.10.23.116:5555] Installing "/app/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/arm64-v8a/bin/minicap" as "/data/local/tmp/minicap"
2024-05-31T01:22:46.940Z INF/device:resources:minicap 13427 [172.10.23.116:5555] Installing "/app/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/arm64-v8a/lib/android-27/minicap.so" as "/data/local/tmp/minicap.so"
2024-05-31T01:22:46.940Z INF/device:resources:minicap 13427 [172.10.23.116:5555] Installing "/app/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk" as "/data/local/tmp/minicap.apk"

commented

A suggestion for you: grant all permissions to the STFService app, including but not limited to these permissions: running in the background, not being subject to power-saving policies, etc., self-starting, and disabling permission monitoring in the developer options (some mobile phone permissions are monitored in the program management)
Hope it helps @koral--

@csdaa Do you suggest adding some code to the existing logic granting permissions?