getgauge / taiko

A node.js library for testing modern web applications
https://taiko.dev
MIT License
3.57k stars 453 forks source link

openBrowser() fails to connect to browser instance #2608

Closed davidjgaunt4 closed 1 month ago

davidjgaunt4 commented 2 years ago

openBrowser() fails to connect to browser instance Either when I run a gauge=> Taiko test or if I launch the taiko CLI when the command openBrowser() is executed, the browser launches but taiko fails to connect to it and there is a socket timeout

To Reproduce Steps (or script) to reproduce the behavior:

  1. Go to dos prompt
  2. type taiko
  3. from the cli prompt type openBrowser()
  4. the chromium browser launches but the openBrowser command fails to respond
  5. Eventually and error message is returned indicating that the socket has hung

const { openBrowser, write, closeBrowser, goto } = require('taiko');
openBrowser();
goto('...')
<!--- please complete the following information -->
**Versions:**
 - Taiko: [Version: 1.3.4 (Chromium: 103.0.5056.0) RELEASE]
 - OS [Windows 10]
 - Node.js []

**Additional context**
the problem is also seen on older versions of Taiko, suspect maybe a network issue, but not sure how I can trouble shoot without additional error detail. please advise, The issue looks like taiko cannot connect over localhost to the chromium devtools api, I just don't understand why
NivedhaSenthil commented 2 years ago

Can you please provide the exact error you are facing ?

marques-work commented 1 year ago

I've seen this when running Taiko in a docker container on an M1 mac.

What I've seen in my experience:

  1. WORKS: x86_64 macOS bare metal
  2. WORKS: aarch64 macOS bare metal
  3. WORKS: x86_64 GNU/Linux bare metal
  4. WORKS: docker (x86_64) on macOS
  5. WORKS: docker (x86_64) on GNU/Linux
  6. DOES NOT WORK: docker(x86_64) on aarch64 macOS (QEMU-backed) -- socket connection fails

Are you possibly using this setup :point_up: ?