Error connecting to dev tools interface starting after 4/13/21

Hello,

I have private instance with latest WPT server and agent in Docker for Windows (windows 10) (from Docker Hub) in linux container, both on my local machine and on a vm on remote machine, and am now getting error reported in test.log of both instances when using Chrome (90.0.4430.85):

2021/04/22 13:16:51 - Test Created
2021/04/22 13:23:47 - Extracting 27369 byte uploaded file ‘/tmp/phpI2xhW2’ to ‘./results/21/04/22/7K/1’
2021/04/22 13:23:47 - Test Run Complete. Run: , Cached: , Done: 1, Tester: docker-desktop-172.17.0.1, Test Run Error: “Error connecting to dev tools interface”
2021/04/22 13:23:47 - Done Processing. Run: , Cached: , Done: 1, Tester: docker-desktop-172.17.0.1, Test Run Error: “Error connecting to dev tools interface”
2021/04/22 13:23:47 - Test Complete

tests were running with no errors in Chrome on both local machine and remote vm on 4/12/2021

tests are currently running with no errors on Firefox on local machine


on 4/22/21, Chrome used for both instances is 90.0.4430.85

I see some discussion that may be related to my issue at: running latest agent in docker · Issue #119 · WPO-Foundation/wptagent · GitHub

Here is the output from agent that I believe is pertinent:

15:07:46.108 - Checking for work: http://localhost:4000/work/getwork.php?f=json&shards=1&reboot=1&servers=1&testinfo=1&location=Test&pc=docker-desktop&version=20.06&screenwidth=1920&screenheight=1200&dns=192.168.65.5&freedisk=209.350&upminutes=131
15:07:46.110 - Resetting dropped connection: localhost
15:07:46.148 - http://localhost:4000 “GET /work/getwork.php?f=json&shards=1&reboot=1&servers=1&testinfo=1&location=Test&pc=docker-desktop&version=20.06&screenwidth=1920&screenheight=1200&dns=192.168.65.5&freedisk=209.350&upminutes=131 HTTP/1.1” 200 259
15:07:46.149 - Job: {“runs”:1,“orientation”:“default”,“url”:“http://host.docker.internal:8081/Webstore7.3.20.24/webstore/shop/ViewItems.aspx?CG=CG1&C=C1",“timeline”:1,"Capture Video”:1,“IPAddr”:“172.17.0.1”,“Test ID”:“210422_A9_4”,“priority”:0,“lighthouseTrace”:1,“timelineStackDepth”:0,“wpthost”:“localhost:4000”,“browser”:“Chrome”}
15:07:46.150 - [{‘record’: True, ‘command’: ‘navigate’, ‘target’: u’http://host.docker.internal:8081/Webstore7.3.20.24/webstore/shop/ViewItems.aspx?CG=CG1&C=C1’}]
15:07:46.174 - Preparing browser
15:07:46.174 - Terminating all instances of chrome
chrome: no process found
15:07:46.178 - Clearing profile /wptagent/work/docker-desktop/browser.210422_A9_4.1
15:07:46.178 - Modifying hosts file:
15:07:46.197 - 127.0.0.1 localhost

15:07:46.256 - /opt/google/chrome/chrome --disable-background-networking --no-default-browser-check --no-first-run --new-window --allow-running-insecure-content --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-device-discovery-notifications --disable-domain-reliability --disable-background-timer-throttling --net-log-capture-mode=IncludeSensitive --load-media-router-component-extension=0 --mute-audio --disable-hang-monitor --password-store=basic --disable-breakpad --dont-require-litepage-redirect-infobar --override-https-image-compression-infobar --disable-fetching-hints-at-navigation-start --host-resolver-rules=“MAP cache.pack.google.com 127.0.0.1”,“MAP clients1.google.com 127.0.0.1”,“MAP update.googleapis.com 127.0.0.1”,“MAP redirector.gvt1.com 127.0.0.1”,“MAP laptop-updates.brave.com 127.0.0.1”,“MAP offlinepages-pa.googleapis.com 127.0.0.1” --window-position=“0,0” --window-size=“1366,768” --remote-debugging-port=9222 --user-data-dir="/wptagent/work/docker-desktop/browser.210422_A9_4.1" --disable-gpu --no-sandbox --disable-setuid-sandbox --enable-features=NetworkService,NetworkServiceInProcess,SecMetadata --enable-blink-features=LayoutInstabilityAPI --disable-features=InterestFeedContentSuggestions,CalculateNativeWinOcclusion,TranslateUI,Translate,OfflinePagesPrefetching,HeavyAdPrivacyMitigations about:blank
15:07:46.287 - Starting new HTTP connection (1): localhost:9222
15:07:46.288 - Connect to dev tools Error: HTTPConnectionPool(host=‘localhost’, port=9222): Max retries exceeded with url: /json (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f0c6ce41e50>: Failed to establish a new connection: [Errno 111] Connection refused’,))
[91:91:0422/150746.308176:ERROR:browser_dm_token_storage_linux.cc(94)] Error: /etc/machine-id contains 0 characters (32 were expected).
[91:130:0422/150746.750766:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[139:139:0422/150746.768721:ERROR:vaapi_wrapper.cc(594)] Could not get a valid VA display
[139:139:0422/150746.769049:ERROR:gpu_init.cc(426)] Passthrough is not supported, GL is egl

DevTools listening on ws://127.0.0.1:9222/devtools/browser/50b10da2-afd6-4d75-ad1a-be4d9026f320
15:07:46.789 - Starting new HTTP connection (2): localhost:9222
[91:140:0422/150746.805287:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are “tcp” and on UNIX “unix”)
15:07:46.822 - http://localhost:9222 “GET /json HTTP/1.1” 200 350
15:07:46.824 - Dev Tools tabs: [{“description”:"",“title”:"",“url”:“about:blank”,“webSocketDebuggerUrl”:“ws://localhost:9222/devtools/page/C8213816FE7D0EE669A95333A6A8D032”,“type”:“page”,“id”:“C8213816FE7D0EE669A95333A6A8D032”,“devtoolsFrontendUrl”:"/devtools/inspector.html?ws=localhost:9222/devtools/page/C8213816FE7D0EE669A95333A6A8D032"}]
15:07:46.826 - Connect to dev tools websocket Error: [Errno 111] Connection refused
Traceback (most recent call last):
File “/wptagent/internal/devtools.py”, line 215, in connect
self.websocket.connect()
File “/wptagent/ws4py/client/init.py”, line 215, in connect
self.sock.connect(self.bind_addr)
File “/usr/lib/python2.7/socket.py”, line 228, in meth
return getattr(self._sock,name)(*args)
error: [Errno 111] Connection refused
[91:187:0422/150746.828790:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[160:160:0422/150746.836982:ERROR:platform_shared_memory_region_posix.cc(250)] Creating shared memory in /dev/shm/.com.google.Chrome.19kSJl failed: Permission denied (13)
[160:160:0422/150746.837224:ERROR:platform_shared_memory_region_posix.cc(253)] Unable to access(W_OK|X_OK) /dev/shm: Permission denied (13)
15:07:46.837 - DevTools websocket connected
[160:160:0422/150746.837347:FATAL:platform_shared_memory_region_posix.cc(255)] This is frequently caused by incorrect permissions on /dev/shm. Try ‘sudo chmod 1777 /dev/shm’ to fix.

Can someone please suggest a potential fix?

Thank you!

1 Like

I don’t have a lot of experience with the Docker container but those errors don’t look to be specific to the agent. It looks like there are a bunch of Chrome error messages about dbus, shared memory, etc.

It looks like the dev tools interface for the browser became available at 15:07:46.824 but the websocket failed to connect.

The shared memory allocation issue in particular looks to be the fatal issue.

1 Like