Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
weibingtie opened this issue May 31, 2024 · 2 comments

Comments

@weibingtie
Copy link

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"

@csdaa
Copy link

csdaa commented Jul 23, 2024

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--

@koral--
Copy link
Member

koral-- commented Jul 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants