christian-bromann / appium-hbbtv-driver

Automation for HBBTV apps
Apache License 2.0
18 stars 0 forks source link

Error on running the demo test #10

Closed gitkav closed 6 years ago

gitkav commented 6 years ago

Hi Christian,

I am using the appium-hbbtv-driver to start automation for a hbbtv application. I am unable to set it up properly and need your help.

I followed the instructions given and my TV is using the raspberry pi internet connection. Raspberry pi is connected to internet via Wifi and TV to raspberry via LAN cable.

The TV has the internet connection and I can open some websites on the browser. But when I redirect the port 80 traffic to port 8080 on raspberry pi I see that http requests start failing and the websites don't load.

I ran netstat -a | grep 8080 to find any proxy running on port 8080 and it returned no results

These are the logs on npm start and npm run demo

info appium-hbbtv-driver:Settings /home/pi/appium-hbbtv-driver/config.json info appium-hbbtv-driver:Settings No settings file found or file was corrupted info devtools-backend:Proxy Start proxy server on 192.168.0.1 info devtools-backend:Proxy Starting preflight checks ... info appium-hbbtv-driver:Router Register route: GET /favicon.ico info appium-hbbtv-driver:Router Register route: GET /settings info appium-hbbtv-driver:Router Register route: POST /settings info appium-hbbtv-driver:Router Register route: GET /nodeconfig.json info appium-hbbtv-driver HbbTVDriver server listening on http://0.0.0.0:4723 info devtools-backend Started devtools-backend server on 0.0.0.0:9222 info devtools-backend:Proxy Preflight check successful info HTTP --> POST /wd/hub/session info HTTP {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"browserName":"TV","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.6.2","name":"webdriverio"}}} dbug MJSONWP Calling HbbTVDriver.createSession() with args: [{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"browserName":"TV","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.6.2","name":"webdriverio"}},null,null,null,null] WARN BaseDriver The following capabilities were provided, but are not recognized by appium: javascriptEnabled, locationContextEnabled, handlesAlerts, rotatable, browserName, loggingPrefs, requestOrigins. info BaseDriver Session created with session id: 5468bf8b-7ed8-4571-ae3d-873556e76799 info appium-hbbtv-driver:driver.js No automation script was injected yet, please restart your HbbTV app by pressing on the "EXIT" button to give the driver control over the page. info appium-hbbtv-driver:driver.js checking for page connection, press "EXIT" on remote control ... info appium-hbbtv-driver:driver.js checking for page connection, press "EXIT" on remote control ... info appium-hbbtv-driver:driver.js checking for page connection, press "EXIT" on remote control ... info appium-hbbtv-driver:driver.js checking for page connection, press "EXIT" on remote control ...

RR! appium-hbbtv-driver:driver.js Error: No connection to OTT device after 10000ms .. aborting ERR! appium-hbbtv-driver:driver.js at Timeout._onTimeout (/home/pi/appium-hbbtv-driver/build/driver.js:573:51) ERR! appium-hbbtv-driver:driver.js at ontimeout (timers.js:386:14) ERR! appium-hbbtv-driver:driver.js at tryOnTimeout (timers.js:250:5) ERR! appium-hbbtv-driver:driver.js at Timer.listOnTimeout (timers.js:214:5) ERR! appium-hbbtv-driver:driver.js Error: No connection to OTT device after 10000ms .. aborting ERR! appium-hbbtv-driver:driver.js at Timeout._onTimeout (/home/pi/appium-hbbtv-driver/build/driver.js:573:51) ERR! appium-hbbtv-driver:driver.js at ontimeout (timers.js:386:14) ERR! appium-hbbtv-driver:driver.js at tryOnTimeout (timers.js:250:5) ERR! appium-hbbtv-driver:driver.js at Timer.listOnTimeout (timers.js:214:5) ERR! MJSONWP Encountered internal error running command: Error: No connection to OTT device after 10000ms .. aborting ERR! MJSONWP at Timeout._onTimeout (/home/pi/appium-hbbtv-driver/build/driver.js:573:51) ERR! MJSONWP at ontimeout (timers.js:386:14) ERR! MJSONWP at tryOnTimeout (timers.js:250:5) ERR! MJSONWP at Timer.listOnTimeout (timers.js:214:5) info HTTP <-- POST /wd/hub/session 500 10251 ms - 190 info HTTP info HTTP --> POST /wd/hub/session info HTTP {"desiredCapabilities":{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"browserName":"TV","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.6.2","name":"webdriverio"}}} dbug MJSONWP Calling HbbTVDriver.createSession() with args: [{"javascriptEnabled":true,"locationContextEnabled":true,"handlesAlerts":true,"rotatable":true,"browserName":"TV","loggingPrefs":{"browser":"ALL","driver":"ALL"},"requestOrigins":{"url":"http://webdriver.io","version":"4.6.2","name":"webdriverio"}},null,null,null,null] info HTTP <-- POST /wd/hub/session 500 20 ms - 150 info HTTP

Also iptable looks like this

Chain PREROUTING (policy ACCEPT) target prot opt source destination
REDIRECT tcp -- 0.0.0.0/0 !192.168.0.1 tcp dpt:443 redir ports 8080 REDIRECT tcp -- 0.0.0.0/0 !192.168.0.1 tcp dpt:80 redir ports 8080

Chain INPUT (policy ACCEPT) target prot opt source destination

Chain OUTPUT (policy ACCEPT) target prot opt source destination

Chain POSTROUTING (policy ACCEPT) target prot opt source destination
MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0
MASQUERADE all -- 0.0.0.0/0 !192.168.0.1

gitkav commented 6 years ago

I realised that proxy is running on port 9222 and not 8080. Is that correct?

thanks