stf icon indicating copy to clipboard operation
stf copied to clipboard

Seeing the blank screen of Android device but interactions working Fine.

Open yashasvimakin opened this issue 10 years ago • 7 comments

Hi , I Setup Stp as mentioned in Github, but when i connect my android device locally and open the url in browser -> Sign in -> Connect to the android this appears: screenshot 2016-11-14 15 05 35 In Console this gets printed: INF/util:datautil 1703 [*] Device database does not have an entry for "ZY222XRRBT" (model "XT1562"/"lux_retasia_ds"). This is not an error, it only means that we don't have data for it yet.

yashasvimakin avatar Nov 14 '16 10:11 yashasvimakin

Open developer tools in chrome and check what the error is. Try an incognito tab to see if any of your installed extensions are causing problems.

On Mon, 14 Nov 2016 at 19:07 yashasvimakin [email protected] wrote:

Hi , I Setup Stp as mentioned in Github, but when i connect my android device locally and open the url in browser -> Sign in -> Connect to the android : this apperas: [image: screenshot 2016-11-14 15 05 35] https://cloud.githubusercontent.com/assets/5002269/20260550/2d76b250-aa80-11e6-9009-a6c6549e6489.png In Console this gets printed: INF/util:datautil 1703 [*] Device database does not have an entry for "ZY222XRRBT" (model "XT1562"/"lux_retasia_ds"). This is not an error, it only means that we don't have data for it yet.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openstf/stf/issues/468, or mute the thread https://github.com/notifications/unsubscribe-auth/AAB-_Z_QHSwyK9QgXXHurgfBikEnRWcXks5q-DL6gaJpZM4KxJQQ .

sorccu avatar Nov 14 '16 10:11 sorccu

@sorccu You are right Error: WebSocket connection to 'ws://localhost:7400/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED Please help to resolve this error.

yashasvimakin avatar Nov 14 '16 10:11 yashasvimakin

It appears that you may have your system misconfigured. According to that error, you are trying to get the screen data from "localhost" instead of your server. Unless you are testing on the machine you are running OpenSTF on, this won't work.

So, a couple of things to check. First, in your nginx.conf, make sure that everything references the IP address of the server, and not "localhost". (This includes the portion that defines the address of the provider service.) Next, if you are starting it with systemd, make sure that you use the IP address of the server in all of the systemd configuration files. Also, make sure that nginx is set up to serve the websocket data on port 7400.

The other thing that jumps out at me is that the URL above is "ws://localhost:7400". If you followed the instructions on the web site, you should have been configured to use HTTPS. The "ws://" portion tells the browser NOT to use an SSL connection to the server. So, you want to make sure that, if the server is running on HTTPS, that you use "wss://" instead.

(Note : I am not a developer, just a fellow user trying to help out. ;)

fbatogo avatar Dec 16 '16 19:12 fbatogo

I met the same problem and succefully solved it. The probable reason is that you give a incorrect --screen-ws-url-pattern when starting the provider. this url is used for the web browser to get the device screen infos and show them on the web browser. need more infos to help you. Did you deploy openSTF in local mode or production mode?

David-gulu avatar Mar 09 '18 08:03 David-gulu

@David-gulu I have a master slave setup - provider1 and all stf + dependencies slave has adb and provider2 I have set --screen-ws-url-pattern "ws://${IP_ADDRESS}/d/mumbai/<%= serial %>/<%= publicPort %>/" on the slave machine while starting the provider

and in nginx config on master i have the below entry :+1: location ~ "^/d/mumbai/([^/]+)/(?[0-9]{5})/$" { proxy_pass http://slaveip:$port/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; }

The device is screen is not refreshed on stf for the remote device.But when i manually refresh browser, its shows the next screen on stf console device screen Is this because of network latency??? or any configuration problem?

Provider log

`2018-03-29T06:12:46.211Z INF/device:support:push 1654 [330042569d5282df] Sending output to "tcp://masterip:7270"
2018-03-29T06:12:46.216Z INF/device 1654 [330042569d5282df] Preparing device
2018-03-29T06:12:46.668Z INF/device:support:sub 1654 [330042569d5282df] Receiving input from "tcp://masterip:7250"
2018-03-29T06:12:46.669Z INF/device:support:sub 1654 [330042569d5282df] Subscribing to permanent channel "*ALL"
2018-03-29T06:12:46.780Z INF/device:support:properties 1654 [330042569d5282df] Loading properties
2018-03-29T06:12:46.852Z INF/device:support:sdk 1654 [330042569d5282df] Supports SDK 23
2018-03-29T06:12:46.853Z INF/device:support:abi 1654 [330042569d5282df] Supports ABIs armeabi-v7a, armeabi
2018-03-29T06:12:47.027Z INF/device:resources:minicap 1654 [330042569d5282df] Installing "/app/node_modules/minicap-prebuilt/prebuilt/armeabi-v7a/bin/minicap" as "/data/local/tmp/minicap"
2018-03-29T06:12:47.029Z INF/device:resources:minicap 1654 [330042569d5282df] Installing "/app/node_modules/minicap-prebuilt/prebuilt/armeabi-v7a/lib/android-23/minicap.so" as "/data/local/tmp/minicap.so"
2018-03-29T06:12:47.210Z INF/device:resources:service 1654 [330042569d5282df] Checking whether we need to install STFService
2018-03-29T06:12:47.789Z INF/device:resources:service 1654 [330042569d5282df] Running version check
2018-03-29T06:12:48.514Z INF/device:resources:service 1654 [330042569d5282df] STFService up to date
2018-03-29T06:12:48.519Z INF/device:plugins:service 1654 [330042569d5282df] Launching agent
2018-03-29T06:12:49.267Z INF/device:plugins:service 1654 [330042569d5282df] Agent says: "Listening on @stfagent"
2018-03-29T06:12:49.308Z INF/device:plugins:service 1654 [330042569d5282df] Launching service
2018-03-29T06:12:49.311Z INF/device:plugins:service 1654 [330042569d5282df] Agent says: "InputClient started"
2018-03-29T06:12:50.070Z INF/device:plugins:display 1654 [330042569d5282df] Reading display info
2018-03-29T06:12:50.115Z INF/device:plugins:phone 1654 [330042569d5282df] Fetching phone info
2018-03-29T06:12:50.142Z INF/device:plugins:identity 1654 [330042569d5282df] Solving identity
2018-03-29T06:12:50.143Z INF/device:plugins:solo 1654 [330042569d5282df] Subscribing to permanent channel "74bk5k3H+n2KZT0GYF1f31vJ3zU="
2018-03-29T06:12:50.145Z INF/device:plugins:screen:stream 1654 [330042569d5282df] Starting WebSocket server on port 15836
2018-03-29T06:12:50.303Z INF/device:resources:minitouch 1654 [330042569d5282df] Installing "/app/node_modules/minitouch-prebuilt/prebuilt/armeabi-v7a/bin/minitouch" as "/data/local/tmp/minitouch"
2018-03-29T06:12:50.406Z WRN/device:plugins:data 1654 [330042569d5282df] Unable to find device data { serial: '330042569d5282df',
  platform: 'Android',
  manufacturer: 'SAMSUNG',
  operator: null,
  model: 'SM-T810',
  version: '6.0.1',
  abi: 'armeabi-v7a',
  sdk: '23',
  product: 'gts210wifixx',
  cpuPlatform: 'exynos5',
  openGLESVersion: '3.1',
  display:
   { id: 0,
     width: 1536,
     height: 2048,
     xdpi: 265.40399169921875,
     ydpi: 264.0559997558594,
     fps: 59,
     density: 2,
     rotation: 0,
     secure: true,
     size: 9.6772154390038,
     url: 'ws://masterip/d/mumbai/330042569d5282df/15836/' },
  phone: { network: 'UNKNOWN' } }
2018-03-29T06:12:50.416Z INF/device:plugins:touch 1654 [330042569d5282df] Touch origin is top left
2018-03-29T06:12:50.417Z INF/device:plugins:touch 1654 [330042569d5282df] Requesting touch consumer to start
2018-03-29T06:12:50.418Z INF/device:plugins:touch 1654 [330042569d5282df] Launching touch service
2018-03-29T06:12:50.423Z INF/device:plugins:touch 1654 [330042569d5282df] Connecting to minitouch service
2018-03-29T06:12:50.494Z INF/device:plugins:touch 1654 [330042569d5282df] minitouch says: "Note: device /dev/input/mouse0 is not supported by libevdev"
2018-03-29T06:12:50.634Z INF/device:plugins:touch 1654 [330042569d5282df] minitouch says: "Note: device /dev/input/mice is not supported by libevdev"
2018-03-29T06:12:50.869Z INF/device:plugins:touch 1654 [330042569d5282df] minitouch says: "Type B touch device sec_touchscreen (1535x2047 with 10 contacts) detected on /dev/input/event3 (score 2109)"
2018-03-29T06:12:51.149Z INF/device:plugins:touch 1654 [330042569d5282df] Reading minitouch banner
2018-03-29T06:12:51.150Z INF/device:plugins:touch 1654 [330042569d5282df] minitouch says: "Connection established"
2018-03-29T06:12:51.200Z INF/device:plugins:vnc 1654 [330042569d5282df] Starting VNC server on port 15838
2018-03-29T06:12:51.205Z INF/device:plugins:browser 1654 [330042569d5282df] Loading browser list
2018-03-29T06:12:51.235Z INF/device:plugins:browser 1654 [330042569d5282df] Updating browser list
2018-03-29T06:12:51.237Z INF/device:plugins:mute 1654 [330042569d5282df] Will not mute master volume
2018-03-29T06:12:51.362Z INF/device:resources:minirev 1654 [330042569d5282df] Installing "/app/vendor/minirev/armeabi-v7a/minirev" as "/data/local/tmp/minirev"
2018-03-29T06:12:51.445Z INF/device:plugins:forward 1654 [330042569d5282df] Launching reverse port forwarding service
2018-03-29T06:12:51.451Z INF/device:plugins:forward 1654 [330042569d5282df] Connecting to reverse port forwarding service
2018-03-29T06:12:52.184Z INF/device:plugins:connect 1654 [330042569d5282df] Listening on port 15837
2018-03-29T06:12:52.187Z INF/device 1654 [330042569d5282df] Fully operational

`

terminalone avatar Mar 29 '18 06:03 terminalone

@terminalone I met the same problem. Do you have resolve it ?

OnTheWay111 avatar Jun 14 '19 03:06 OnTheWay111

I met the same problem and succefully solved it. The probable reason is that you give a incorrect --screen-ws-url-pattern when starting the provider. this url is used for the web browser to get the device screen infos and show them on the web browser. need more infos to help you. Did you deploy openSTF in local mode or production mode?

@David-gulu I am facing the same problem while running in local mode. can you please help?

udaykittu avatar Jun 25 '19 03:06 udaykittu