-
Notifications
You must be signed in to change notification settings - Fork 328
Setting a custom profile dir with Chrome breaks devtools websocket proxying #1355
Comments
Ahhh. OK, started digging and think I worked it out. It does indeed break the logic for finding the So the work-around is to always use |
@matthewlowry you are right. Currently this is hard-coded. |
@vania-pooh Thanks. Now I've got my head around how it works I've written a little patch to enable passing an environment variable into the container to point at the custom browser profile directory. I'll close this issue and raise a PR over in the |
@matthewlowry Works fine for me, but perhaps there's some use case where that would fail that I am not thinking about? Also, the benefit of using |
I wish to write a suite where a custom Chrome browser profile is prepared and then re-used across a number of sessions.
These tests are also using devtools bidi API (listening for network events and fetching request bodies, specifically).
If I request a Chrome session like this:
Then I can not connect a websocket client to devtools port of the browser anymore. E.g. if I use
wscat
:If I look in the logs for the session (via the Selenoid UI), I see this:
These errors go away if I request a session that does not pass a custom
user-data-dir
argument to Chrome. Is there something else I need to do when passing a customuser-data-dir
to Chrome so I don't break devtools websocket proxying?Just for clarity - the intention is to use
"volumes":[ "/host/dir:/profiles" ]
to pass the custom profile dir across sessions, but this error occurs with or without mounting a host directory into the container. The error also occurs if I useuser-data-dir=/tmp/foo
or similar.The text was updated successfully, but these errors were encountered: