openstf / stf

Control and manage Android devices from your browser.
https://openstf.io
Other
13.35k stars 2.78k forks source link

MI8 can't see anything, but can touch or swipe. #1177

Open HeartIsBeat opened 4 years ago

HeartIsBeat commented 4 years ago

STF v3.4.1 MI 8 SDK API 28, os 9, MIUI 11.0.4(This mi8 is upgraded system)

What is the issue or idea you have? MI 8 screen is gray on STF Touch or swipe is ok, but can't see anything. image

Does it only happen on a specific device? Please run adb devices -l and paste the corresponding row. image

Please provide the steps to reproduce the issue.

What is the expected behavior?

Do you see errors or warnings in the stf local output? If so, please paste them or the full log here. 2020-02-18T10:00:52.372Z INF/device:plugins:screen:stream 21541 [95ad4a3a] Starting WebSocket server on port 7404 2020-02-18T10:00:52.389Z FTL/device 21541 [95ad4a3a] Setup had an error Error: listen EADDRINUSE :::7404 at Object._errnoException (util.js:1041:11) at _exceptionWithHostPort (util.js:1064:20) at Server.setupListenHandle [as _listen2] (net.js:1322:14) at listenInCluster (net.js:1370:12) at Server.listen (net.js:1466:7) at WebSocketServer (/usr/local/lib/node_modules/stf/node_modules/_ws@3.3.3@ws/lib/WebSocketServer.js:76:20) at createServer (/usr/local/lib/node_modules/stf/lib/units/device/plugins/screen/stream.js:425:17) From previous event: at Promise._captureStackTrace (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/debuggability.js:90:23) at Promise._resolveFromResolver (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/promise.js:480:10) at new Promise (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/promise.js:71:37) at createServer (/usr/local/lib/node_modules/stf/lib/units/device/plugins/screen/stream.js:431:14) at /usr/local/lib/node_modules/stf/lib/units/device/plugins/screen/stream.js:449:12 at SerialSyrup.ParallelSyrup.invoke (/usr/local/lib/node_modules/stf/node_modules/_stf-syrup@1.0.0@stf-syrup/lib/parallel.js:54:24) at /usr/local/lib/node_modules/stf/node_modules/_stf-syrup@1.0.0@stf-syrup/lib/serial.js:43:33 at tryCatch1 (/usr/local/lib/node_modules/stf/node_modules/_bluebird@1.1.1@bluebird/js/main/util.js:63:19) at Promise$_callHandler [as _callHandler] (/usr/local/lib/node_modules/stf/node_modules/_bluebird@1.1.1@bluebird/js/main/promise.js:708:13) at Promise$_settlePromiseFromHandler [as _settlePromiseFromHandler] (/usr/local/lib/node_modules/stf/node_modules/_bluebird@1.1.1@bluebird/js/main/promise.js:724:18) at Promise$_settlePromiseAt [as _settlePromiseAt] (/usr/local/lib/node_modules/stf/node_modules/_bluebird@1.1.1@bluebird/js/main/promise.js:896:14) at Promise$_fulfillPromises [as _fulfillPromises] (/usr/local/lib/node_modules/stf/node_modules/_bluebird@1.1.1@bluebird/js/main/promise.js:1041:14) at Async$_consumeFunctionBuffer [as _consumeFunctionBuffer] (/usr/local/lib/node_modules/stf/node_modules/_bluebird@1.1.1@bluebird/js/main/async.js:74:12) at Async$consumeFunctionBuffer (/usr/local/lib/node_modules/stf/node_modules/_bluebird@1.1.1@bluebird/js/main/async.js:37:14) at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickCallback (internal/process/next_tick.js:180:9) 2020-02-18T10:00:52.391Z FTL/util:lifecycle 21541 [95ad4a3a] Shutting down due to fatal error 2020-02-18T10:00:52.398Z INF/provider 21506 [] Cleaning up device worker "95ad4a3a" 2020-02-18T10:00:52.398Z ERR/provider 21506 [] Device worker "95ad4a3a" died with code 1

Please run stf doctor and paste the output here. 2020-02-18T10:07:02.353Z INF/cli:doctor 23731 [] OS Arch: x64 2020-02-18T10:07:02.354Z INF/cli:doctor 23731 [] OS Platform: linux 2020-02-18T10:07:02.354Z INF/cli:doctor 23731 [] OS Platform: 4.4.0-98-generic 2020-02-18T10:07:02.354Z INF/cli:doctor 23731 [] Using Node 8.4.0 2020-02-18T10:07:02.415Z INF/cli:doctor 23731 [] Using ZeroMQ 4.1.4 2020-02-18T10:07:02.467Z INF/cli:doctor 23731 [] Using RethinkDB 2.3.6~0xenial 2020-02-18T10:07:02.468Z INF/cli:doctor 23731 [] Using ADB 1.0.41 2020-02-18T10:07:02.568Z INF/cli:doctor 23731 [] Using ProtoBuf 3.4.0 2020-02-18T10:07:02.616Z INF/cli:doctor 23731 [*] Using GraphicsMagick 1.3.26

denis99999 commented 4 years ago

Hi @HeartIsBeat , It seems you try to launch STF on a @IP:port which is already used! What is your command line to launch STF ?

HeartIsBeat commented 4 years ago

@denis99999 O, I connet mi 8 on window10 using command adb nodaemon server -a -P 5037, and use stf provider on stf server, command is stf provider --name ubuntuzz --min-port 7400 --max-port 7700 --connect-sub tcp://127.0.0.1:7114 --connect-push tcp://127.0.0.1:7116 --group-timeout 900 --public-ip 192.168.xx.xx --storage-url http://localhost:7100/ --adb-host 192.168.x.x --adb-port 5037 --vnc-initial-size 600x800 --mute-master never --allow-remote --no-cleanup. Then it has an error above.

When I push mi8 on stf server. It has no error. But I can't see anything on mi8 the same. It also can swipe or touch. image

Launch STF command is stf local --public-ip 192.168.xx.xx --allow-remote --cleanup false

denis99999 commented 4 years ago

@HeartIsBeat , I don't understand why you launch a stf provider.. , you have just to launch stf local ... on your windows8 machine, isn't it ?

HeartIsBeat commented 4 years ago

@denis99999 I use stf provider is because stf server far away from me.

The problem is when mi8 plug in stf server, can't see anything the same.

STF server is linux Ubuntu.

denis99999 commented 4 years ago

local mode is not designed for that, you have to deploy STF in distributed mode, report to DEPLOYMENT.md documentation.

denis99999 commented 4 years ago

Hi @HeartIsBeat , I reproduced the configuration I understood you have, that is a stf local server on machine A and a stf provider on machine B on which is connected your device.

I think the problem you meet is that your stf provider is not able to communicate with the triproxy-dev internal process of your stf local server.

So you have to launch something like that:

On machine A:

# stf local --bind-dev-pub tcp://@IP_MachineA:7114 --bind-dev-pull tcp://@IP_MachineA:7116...

On machine B:

# stf provider --connect-sub tcp://@IP_MachineA:7114 --connect-push tcp://@IP_MachineA:7116...

It should work :-)

jhjx commented 4 years ago

你防火墙没关

HeartIsBeat commented 4 years ago

@jhjx 问题关键不是我windows上手机 连linux stf.

是我MI8手机插到linux环境,也是灰屏,看不到任何东西,但是可以点击。

linux上防火墙是关闭的。

jhjx commented 4 years ago

你这个问题应该和MIUI11报的其他问题一样,小米改了什么so,导致minicap Vector<> have different types 你本地执行一下 adb shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minicap -P 1080x2244@1080x2244/0 看看是不是报这个错误 如果是的话 和https://github.com/openstf/stf/issues/1187 这个问题还有其他小米MIUI11问题一样 只能等作者解决了

HeartIsBeat commented 4 years ago

image @jhjx 这好像没报错?

HeartIsBeat commented 4 years ago

我还有个oppo r15手机也有类似的问题: image

jhjx commented 4 years ago

一开始以为你这个Setup had an error Error: listen EADDRINUSE :::7404报错是偶现的 你不要分两台电脑了 stf local 用本机上插手机吧 要是想部署多台pc上,看看这个DEPLOYMENT.md ,

Mrtj2016 commented 4 years ago

看不到屏幕,有时候是provider的--screen-ws-url-pattern参数配错了

huuck commented 4 years ago

image

RmondJone commented 4 years ago

我的是K30,MIUI11,一样的问题,这个应该就是小米的锅改了底层的so文件!坐等作者解决这个问题,有的直接不能连接,有的能连但是不能操作