(03-31-2017 01:32 AM)pmeenan Wrote: Try pointing it directly to the chrome binary in browsers.ini:
[Chrome]
exe=/opt/google/chrome/chrome
I'll update the install docs to point that out (been considering auto-detecting the common locations and not requiring browses.ini by default anyway)
I had:
Code:
$ cat browsers.ini
[Chrome]
exe=/usr/bin/google-chrome-stable
ls -l /usr/bin/google-chrome-stable
lrwxrwxrwx 1 root root 32 Mar 28 22:27 /usr/bin/google-chrome-stable -> /opt/google/chrome/google-chrome
Changing that to this one didn't really help:
Code:
[Chrome]
exe=/opt/google/chrome/chrome
Here is a full log, after I've added "example.com/1" for a test:
Code:
$ python wptagent/wptagent.py --server http://localhost/work/ --location WPT_Chrome --xvfb -vvvvv --shaper none
fatal: Not a git repository (or any of the parent directories): .git
Python 2.7.12
15:35:24.127 - Waiting for Idle...
Running agent, hit Ctrl+C to exit
15:35:24.128 - Checking for work: http://localhost/work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.374
15:35:24.133 - Starting new HTTP connection (1): localhost
15:35:24.137 - http://localhost:80 "GET /work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.374 HTTP/1.1" 200 0
15:35:29.145 - Checking for work: http://localhost/work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.369
15:35:29.147 - Resetting dropped connection: localhost
15:35:29.151 - http://localhost:80 "GET /work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.369 HTTP/1.1" 200 0
15:35:34.158 - Checking for work: http://localhost/work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.369
15:35:34.159 - Resetting dropped connection: localhost
15:35:34.162 - http://localhost:80 "GET /work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.369 HTTP/1.1" 200 0
15:35:39.164 - Checking for work: http://localhost/work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.369
15:35:39.169 - http://localhost:80 "GET /work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.369 HTTP/1.1" 200 0
15:35:44.176 - Checking for work: http://localhost/work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.369
15:35:44.178 - Resetting dropped connection: localhost
15:35:44.183 - http://localhost:80 "GET /work/getwork.php?f=json&shards=1&location=WPT_Chrome&pc=webpagetest&freedisk=247.369 HTTP/1.1" 200 191
15:35:44.195 - Job: {"processResults":1,"runs":1,"bwIn":5000,"plr":0,"latency":28,"url":"http:\/\/example.com\/1","Capture Video":1,"IPAddr":"10.192.1.11","bwOut":1000,"orientation":"default","Test ID":"170330_YX_B","browser":"Chrome"}
15:35:44.195 - [{'record': True, 'command': 'navigate', 'target': u'http://example.com/1'}]
15:35:44.200 - Preparing browser
15:35:44.200 - Terminating all instances of chrome
chrome: no process found
15:35:44.218 - Clearing profile /usr/src/wptagent/work/webpagetest/browser.170330_YX_B.1
15:35:44.219 - /opt/google/chrome/chrome --disable-background-networking --no-default-browser-check --no-first-run --process-per-tab --new-window --disable-infobars --disable-translate --disable-notifications --disable-desktop-notifications --allow-running-insecure-content --disable-component-update --disable-background-downloads --disable-add-to-shelf --disable-client-side-phishing-detection --disable-datasaver-prompt --disable-default-apps --disable-domain-reliability --safebrowsing-disable-auto-update --disable-background-timer-throttling --disable-sync --host-resolver-rules="MAP cache.pack.google.com 127.0.0.1","MAP clients1.google.com 127.0.0.1" --window-position="0,0" --window-size="1024,768" --remote-debugging-port=9222 --user-data-dir="/usr/src/wptagent/work/webpagetest/browser.170330_YX_B.1" --disable-gpu
15:35:44.228 - Starting new HTTP connection (1): localhost
15:35:44.228 - Connect to dev tools Error: HTTPConnectionPool(host='localhost', port=9222): Max retries exceeded with url: /json (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7fcdcc92ca50>: Failed to establish a new connection: [Errno 111] Connection refused',))
(chrome:24352): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
/usr/bin/dbus-launch terminated abnormally without any error message
(chrome:24352): LIBDBUSMENU-GLIB-WARNING **: Unable to get session bus: Failed to execute child process "dbus-launch" (No such file or directory)
15:35:44.730 - Starting new HTTP connection (1): localhost
15:35:44.731 - http://localhost:9222 "GET /json HTTP/1.1" 200 2225
15:35:44.732 - Dev Tools tabs: [{"description":"","title":"CryptoTokenExtension","url":"chrome-extension:\/\/kmendfapggjehodndflmmgagdbamhnfd\/_generated_background_page.html","webSocketDebuggerUrl":"ws:\/\/localhost:9222\/devtools\/page\/7722bfa3-06ab-4ca5-8a51-99344da294d8","type":"background_page","id":"7722bfa3-06ab-4ca5-8a51-99344da294d8","devtoolsFrontendUrl":"\/devtools\/inspector.html?ws=localhost:9222\/devtools\/page\/7722bfa3-06ab-4ca5-8a51-99344da294d8"},{"description":"","title":"Google Network Speech","url":"chrome-extension:\/\/neajdppkdcdipfabeoofebfddakdcjhd\/_generated_background_page.html","webSocketDebuggerUrl":"ws:\/\/localhost:9222\/devtools\/page\/19fe8849-aa19-4ff6-9c44-f49ae4038071","type":"background_page","id":"19fe8849-aa19-4ff6-9c44-f49ae4038071","devtoolsFrontendUrl":"\/devtools\/inspector.html?ws=localhost:9222\/devtools\/page\/19fe8849-aa19-4ff6-9c44-f49ae4038071"},{"description":"","title":"Feedback","url":"chrome-extension:\/\/gfdkimpbcpahaombhbimeihdjnejgicl\/_generated_background_page.html","webSocketDebuggerUrl":"ws:\/\/localhost:9222\/devtools\/page\/65924e93-cc3c-4b34-8bee-cb8ad2cf5532","type":"background_page","id":"65924e93-cc3c-4b34-8bee-cb8ad2cf5532","devtoolsFrontendUrl":"\/devtools\/inspector.html?ws=localhost:9222\/devtools\/page\/65924e93-cc3c-4b34-8bee-cb8ad2cf5532"},{"description":"","title":"Google Hangouts","url":"chrome-extension:\/\/nkeimhogjdpnpccoofpliimaahmaaome\/background.html","webSocketDebuggerUrl":"ws:\/\/localhost:9222\/devtools\/page\/02e33509-2c86-4aaf-8c6a-87cb12209928","type":"background_page","id":"02e33509-2c86-4aaf-8c6a-87cb12209928","devtoolsFrontendUrl":"\/devtools\/inspector.html?ws=localhost:9222\/devtools\/page\/02e33509-2c86-4aaf-8c6a-87cb12209928"},{"description":"","title":"Take Chrome everywhere","url":"chrome:\/\/welcome\/?variant=everywhere","webSocketDebuggerUrl":"ws:\/\/localhost:9222\/devtools\/page\/d9de8d2b-9dfc-46b0-84ad-446fedd80b27","type":"page","id":"d9de8d2b-9dfc-46b0-84ad-446fedd80b27","devtoolsFrontendUrl":"\/devtools\/inspector.html?ws=localhost:9222\/devtools\/page\/d9de8d2b-9dfc-46b0-84ad-446fedd80b27"}]
15:35:44.733 - Devtools connected
15:35:44.733 - DevTools websocket connected
15:35:44.733 - Sending: {"params":{},"id":1,"method":"Network.clearBrowserCache"}
15:35:44.735 - {"id":1,"result":{}}
15:35:44.735 - Sending: {"params":{},"id":2,"method":"Network.clearBrowserCookies"}
15:35:44.736 - {"id":2,"result":{}}
15:35:44.736 - Sending: {"params":{"returnByValue":true,"expression":"navigator.userAgent"},"id":3,"method":"Runtime.evaluate"}
15:35:44.739 - {"id":3,"result":{"result":{"type":"string","value":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"}}}
15:35:44.740 - Sending: {"params":{"url":"about:blank"},"id":4,"method":"Page.navigate"}
15:35:44.755 - {"id":4,"result":{"frameId":"24649.1"}}
15:35:44.755 - Waiting for Idle...
^CWill exit after test completes. Hit Ctrl+C again to exit immediately
[24352:24352:0330/153557.248838:ERROR:chrome_browser_main_extra_parts_x11.cc(62)] X IO error received (X server probably went away)
15:35:57.253 - DevTools websocket disconnected
^C15:35:58.573 - Cleaning up
OK, had some better results with:
Code:
Xvfb :10 -ac -screen 0 1280x1024x24
Then:
Code:
export DISPLAY=:10
python wptagent/wptagent.py --server http://localhost/work/ --location WPT_Chrome --xvfb -vvvvv --shaper none
Still not getting any results ("First View: Test Error: Error configuring traffic-shaping"), but at least it did run Chrome.
Should wptagent.py launch Xvfb automatically, when --xvfb flag is used? Or does Xvfb need to be run before wptagent.py is started?
I think I was confused by "connection refused to localhost:9222".
It is running as expected, no need to run xvfb manually.
The only thing I had to set was setting "Connection" to "Native connection (No Traffic Shaping)", otherwise, was getting "First View: Test Error: Error configuring traffic-shaping".
To sum up - it works! That's excellent!