microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.43k stars 3.56k forks source link

[BUG] Cannot connect to remote selenium grid 4 #23394

Open neswine opened 1 year ago

neswine commented 1 year ago

What happened?

I am trying to connect the grid setup in my cloud. I am able to create the session but for some reason, I cant run the tests. Seems like websocket connection is getting timed out.

I tried to setup in my mac M1 using docker and the tests run fine.

Command used to start Selenium Grid with Docker

SELENIUM_REMOTE_URL= npx playwright test

Relevant log output

`browserType.launch: WebSocket error: connect ETIMEDOUT 100.120.0.11:4444 =========================== logs ===========================

connecting to https://selenium-grid-hub.shopk8sd.int.aws.zooplus.io/ connected to sessionId=12e22eceade9d3318cfff06c4551f4c9 using selenium v4 retrieved endpoint ws://100.120.0.11:4444/session/12e22eceade9d3318cfff06c4551f4c9/se/cdp for sessionId=12e22eceade9d3318cfff06c4551f4c9 ws://100.120.0.11:4444/session/12e22eceade9d3318cfff06c4551f4c9/se/cdp ws://100.120.0.11:4444/session/12e22eceade9d3318cfff06c4551f4c9/se/cdp error connect ETIMEDOUT 100.120.0.11:4444 ws://100.120.0.11:4444/session/12e22eceade9d3318cfff06c4551f4c9/se/cdp connect ETIMEDOUT 100.120.0.11:4444 ws://100.120.0.11:4444/session/12e22eceade9d3318cfff06c4551f4c9/se/cdp code=1006 reason= disconnecting from sessionId=12e22eceade9d3318cfff06c4551f4c9 disconnected from sessionId=12e22eceade9d3318cfff06c4551f4c9 ============================================================` ### **Operating System** Ubuntu ### **Docker Selenium version (tag)** 4.6.0
emouawad commented 10 months ago

Same here - @neswine have you been to find a solution?

adamsjoe commented 9 months ago

@neswine Also interested in any possible solution

zhangjunqiang commented 9 months ago

are you using docker-compose deploy selenium grid? the docker-compose return a path your pw cannot connect to

Gr1LyA commented 2 months ago

same problem. connected to session but got ws error