Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimental-multiple-windows fails with Error: WebSocket connection closed on completion of some tests #8377

Open
keif888 opened this issue Feb 14, 2025 · 11 comments
Assignees
Labels
STATE: Need response An issue that requires a response or attention from the team. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@keif888
Copy link

keif888 commented Feb 14, 2025

What is your Scenario?

Use native automation to open places page on PhotoPrism.
Validate that searching for a location will return the map, with a cluster of photos for that location.
Zoom out.
Select the cluster, and then open another window from the browse button shown in the UI.

FYI:
Maps fail in non native automation due to an issue in hammerhead (already logged), so we are attempting to use the --experimental-multiple-windows flag for tests that use multiple windows.

What is the Current behavior?

On successful completion of the test (as per the console.log messages), the an error is thrown as testcafe is tearing everything down. The test that fails with a WebSocket connection closed is unpredictable.

Execution Number 1

> photoprism@1 testcafe
> testcafe chrome --headless=new --skip-js-errors --experimental-multiple-windows ./tests/multitests.js

 Running tests in:
 - Chrome 133.0.0.0 / Ubuntu 24.10

 Test photos
  Start Test
  End Test
 ✓ Multi-Window: Navigate from card view to place
  Start Test
  End Test
 ✖ Multi-Window: Navigate from card view to photos taken at the same date

   1) Unhandled promise rejection:
      
      Error: WebSocket connection closed
      at /usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:94:35
      at Chrome._handleConnectionClose (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:256:13)
      at WebSocket.<anonymous> (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:243:22)
      at WebSocket.emit (node:events:524:28)
      at WebSocket.emit (node:domain:489:12)
      at WebSocket.emitClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:246:10)
      at Socket.socketOnClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:1150:15)
      at Socket.emit (node:events:524:28)
      at Socket.emit (node:domain:489:12)
      at TCP.<anonymous> (node:net:351:12)

      Browser: Chrome 133.0.0.0 / Ubuntu 24.10


 Search and open photo from places
  Start Test
  End Test
 ✓ Multi-Window: Test places


 1/3 failed (1m 37s)

What is the Expected behavior?

 Running tests in:
 - Chrome 133.0.0.0 / Ubuntu 24.10

 Test photos
  Start Test
  End Test
 ✓ Multi-Window: Navigate from card view to place
  Start Test
  End Test
 ✓ Multi-Window: Navigate from card view to photos taken at the same date
 Search and open photo from places
  Start Test
  End Test
 ✓ Test places


 3 passed (1m 45s)

What is the public URL of the test page? (attach your complete example)

The public demo of PhotoPrism can be used for this test.
https://demo.photoprism.app/library/login is the initial landing page (no credentials required as this is a public demo).
The test also navigates to the following pages:
https://demo.photoprism.app/library/places
https://demo.photoprism.app/library/browse

What is your TestCafe test code?

import { Selector } from "testcafe";

fixture`Test New Tab 1`.page`https://demo.photoprism.app/library/login`;

test.meta("testID", "testtab-001").meta({ mode: "public" })(
"Multi-Window: First Attempt",async (t) => {
    await generictester(t)
})

test.meta("testID", "testtab-002").meta({ mode: "public" })(
    "Multi-Window: Second Attempt",async (t) => {
        await generictester(t)
    })



fixture`Test New Tab 2`.page`https://demo.photoprism.app/library/login`;

test.meta("testID", "testtab-003").meta({ mode: "public" })(
"Multi-Window: Third Attempt",async (t) => {
    await generictester(t)
})
    
async function generictester(t){
    console.log("  Start Test");
    
    await t.expect(Selector(".nav-places").visible).ok()
    await t.expect(Selector("button.action-open-date", { timeout: 7000 }).visible).ok()
    await t.click(Selector("button.action-open-date").nth(0))
    await t.expect(Selector(".nav-places").visible).ok()

    console.log("  End Test");
}

Your complete configuration file

testcaferc.json

{
  "skipJsErrors": true,
  "quarantineMode": false,
  "selectorTimeout": 6000,
  "assertionTimeout": 7000,
  "hostname": "localhost",
  "screenshots": {
    "path": "tests/acceptance/screenshots",
    "takeOnFails": true
  }
}

Your complete test report

npm run testcafe -- "chrome --headless=new" --experimental-multiple-windows ./tests/testcafeissue8377.js 

> photoprism@1 testcafe
> testcafe chrome --headless=new --experimental-multiple-windows ./tests/testcafeissue8377.js

 Running tests in:
 - Chrome 133.0.0.0 / Ubuntu 24.10

 Test New Tab 1
  Start Test
  End Test
 ✖ Multi-Window: First Attempt

   1) Unhandled promise rejection:
      
      Error: WebSocket connection closed
      at /usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:94:35
      at Chrome._handleConnectionClose (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:256:13)
      at WebSocket.<anonymous> (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:243:22)
      at WebSocket.emit (node:events:524:28)
      at WebSocket.emit (node:domain:489:12)
      at WebSocket.emitClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:246:10)
      at Socket.socketOnClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:1150:15)
      at Socket.emit (node:events:524:28)
      at Socket.emit (node:domain:489:12)
      at TCP.<anonymous> (node:net:351:12)

      Browser: Chrome 133.0.0.0 / Ubuntu 24.10


  Start Test
  End Test
 ✓ Multi-Window: Second Attempt

 Test New Tab 2
  Start Test
  End Test
 ✖ Multi-Window: Third Attempt

   1) Unhandled promise rejection:
      
      Error: WebSocket connection closed
      at /usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:94:35
      at Chrome._handleConnectionClose (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:256:13)
      at WebSocket.<anonymous> (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:243:22)
      at WebSocket.emit (node:events:524:28)
      at WebSocket.emit (node:domain:489:12)
      at WebSocket.emitClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:246:10)
      at Socket.socketOnClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:1150:15)
      at Socket.emit (node:events:524:28)
      at Socket.emit (node:domain:489:12)
      at TCP.<anonymous> (node:net:351:12)

      Browser: Chrome 133.0.0.0 / Ubuntu 24.10



 2/3 failed (13s)

Screenshots

No screen shots are taken as the test has already successfully completed, and testcafe fails as it tears the test down.

Steps to Reproduce

  1. Open a terminal window and execute the following command:
  2. for i in {1..10}; do echo "Execution Number" $i; npm run testcafe -- "chrome --headless=new" --experimental-multiple-windows ./tests/testcafeissue8377.js || break; done

This command will run up to 10 times, but stop when the 1st failure is encountered.
The error is not consistent and can take a couple of executions to fail.

TestCafe version

11.1.0

Node.js version

v22.13.1

Command-line arguments

-- "chrome --headless=new" --skip-js-errors --experimental-multiple-windows ./tests/testcafeissue8377.js

Browser name(s) and version(s)

Chrome headless 133

Platform(s) and version(s)

Linux Ubuntu 24.10

Other

The test script above has been created to show the issue. It is pared back to the minimum required to show the issue.
Non Native Automation of maps fail as per this issue: DevExpress/testcafe-hammerhead#3041
which is why we are attempting to use --experimental-multiple-windows

@keif888 keif888 added the TYPE: bug The described behavior is considered as wrong (bug). label Feb 14, 2025
@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Feb 14, 2025
@keif888
Copy link
Author

keif888 commented Feb 14, 2025

I updated the source code in the issue above to remove use of resizeWindow which is listed as not supported for --experimental-multiple-windows.

@keif888
Copy link
Author

keif888 commented Feb 15, 2025

FYI:
As a workaround to this issue, execute only a single test per execution of testcafe with --experimental-multiple-windows.
I have executed 600 individual executions of a single test without a failure (the 3 different tests above executed 200 times).
BUT, if you execute multiple tests in a single execution of testcafe then there is a high probability of encountering this issue.

My workaround was to call testcafe using the --test "testname" parameter for each individual test that needs multiple windows.

npm run testcafe -- "chrome --headless=new" --experimental-multiple-windows --test-meta mode=public --test "Multi-Window: Navigate from card view to place" "tests/acceptance"
npm run testcafe -- "chrome --headless=new" --experimental-multiple-windows --test-meta mode=public --test "Multi-Window: Navigate from card view to photos taken at the same date" "tests/acceptance"
npm run testcafe -- "chrome --headless=new" --experimental-multiple-windows --test-meta mode=public --test "Multi-Window: Test places" "tests/acceptance"

I did this using find, perl, and xargs. Your milage may vary.

find ./tests/acceptance -type f -name "*.js" | xargs -i perl -0777 -ne 'while(/(?:mode: \"auth[^,]*\,)|(Multi-Window\:[A-Za-z 0-9\-_]*)/g){print "$1\n" if ($1);}' {} | xargs -I testname bash -c 'npm run testcafe -- "chrome --headless=new" --experimental-multiple-windows --test-meta mode=public --test "testname" "tests/acceptance"'

We have auth and public tests which need to be executed separately, which is why the regex in the perl single line matches but doesn't capture auth, so that it only finds the right tests.

@Bayheck
Copy link
Collaborator

Bayheck commented Feb 17, 2025

Hello,

Thank you for reaching out to us.

I tried to run your example and encountered a different error related to invalid date creation.

After a bit of debugging, I found that the buttonDate is invalid.

Image

Image

The test also contains a significant amount of code that is unrelated to the issue.

Additionally, try to place the await before the Selector, like so:

if (await Selector('div[role="option"]').visible) {
   break;
}

Please remove any unnecessary code and provide a minimal, updated version of the test so I can further investigate the issue.

@Bayheck Bayheck added STATE: Need clarification An issue lacks information for further research. and removed STATE: Need response An issue that requires a response or attention from the team. labels Feb 17, 2025
@keif888
Copy link
Author

keif888 commented Feb 18, 2025

I have replaced the test script in the issue with a newly created minimal test script that shows the issue without extra code.
The missing await was only in my test script, not in the real code base.

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Feb 18, 2025
@github-actions github-actions bot removed the STATE: Need clarification An issue lacks information for further research. label Feb 18, 2025
@Bayheck Bayheck added the STATE: Issue accepted An issue has been reproduced. label Feb 20, 2025
Copy link

We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.

@github-actions github-actions bot removed STATE: Need response An issue that requires a response or attention from the team. STATE: Issue accepted An issue has been reproduced. labels Feb 20, 2025
@Bayheck Bayheck self-assigned this Feb 25, 2025
@Bayheck
Copy link
Collaborator

Bayheck commented Mar 10, 2025

Hello,
I recently updated Chrome to the latest version (134.0.6998.36) and can no longer reproduce the issue.
Could you try running your tests with the latest version of Chrome and share your results?
If the issue persists, you may need to update the minimal example.

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 10, 2025
@Bayheck Bayheck added STATE: Need clarification An issue lacks information for further research. and removed STATE: Need response An issue that requires a response or attention from the team. labels Mar 10, 2025
@keif888
Copy link
Author

keif888 commented Mar 14, 2025

Sorry for the delay responding I lost power due to a weather event.
I am still getting the WebSocket connection closed issue.
And it is worse, as I can't get a single successful run.

photoprism@250221-oracular:/opt/google/chrome$ ./google-chrome --version
Google Chrome 134.0.6998.88 
photoprism@250221-oracular:/go/src/github.com/photoprism/photoprism/frontend$ npm -v
11.2.0
photoprism@250221-oracular:/go/src/github.com/photoprism/photoprism/frontend$ node -v
v22.14.0
photoprism@250221-oracular:/go/src/github.com/photoprism/photoprism/frontend$ npm run testcafe -- --version

> photoprism@1 testcafe
> testcafe --version

3.7.1
photoprism@250221-oracular:/go/src/github.com/photoprism/photoprism/frontend$ npm run testcafe -- "chrome --headless=new" --experimental-multiple-windows ./tests/testcafeissue8377.js

> photoprism@1 testcafe
> testcafe chrome --headless=new --experimental-multiple-windows ./tests/testcafeissue8377.js

 Running tests in:
 - Chrome 134.0.0.0 / Ubuntu 24.10

 Test New Tab 1
  Start Test
  End Test
 ✖ Multi-Window: First Attempt

   1) Unhandled promise rejection:
      
      Error: WebSocket connection closed
      at /usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:94:35
      at Chrome._handleConnectionClose (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:256:13)
      at WebSocket.<anonymous> (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:243:22)
      at WebSocket.emit (node:events:518:28)
      at WebSocket.emit (node:domain:489:12)
      at WebSocket.emitClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:246:10)
      at Socket.socketOnClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:1150:15)
      at Socket.emit (node:events:518:28)
      at Socket.emit (node:domain:489:12)
      at TCP.<anonymous> (node:net:351:12)

      Browser: Chrome 134.0.0.0 / Ubuntu 24.10


  Start Test
  End Test
 ✖ Multi-Window: Second Attempt

   1) Unhandled promise rejection:
      
      Error: WebSocket connection closed
      at /usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:94:35
      at Chrome._handleConnectionClose (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:256:13)
      at WebSocket.<anonymous> (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:243:22)
      at WebSocket.emit (node:events:518:28)
      at WebSocket.emit (node:domain:489:12)
      at WebSocket.emitClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:246:10)
      at Socket.socketOnClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:1150:15)
      at Socket.emit (node:events:518:28)
      at Socket.emit (node:domain:489:12)
      at TCP.<anonymous> (node:net:351:12)

      Browser: Chrome 134.0.0.0 / Ubuntu 24.10


 Test New Tab 2
  Start Test
  End Test
 ✖ Multi-Window: Third Attempt

   1) Unhandled promise rejection:
      
      Error: WebSocket connection closed
      at /usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:94:35
      at Chrome._handleConnectionClose (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:256:13)
      at WebSocket.<anonymous> (/usr/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:243:22)
      at WebSocket.emit (node:events:518:28)
      at WebSocket.emit (node:domain:489:12)
      at WebSocket.emitClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:246:10)
      at Socket.socketOnClose (/usr/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:1150:15)
      at Socket.emit (node:events:518:28)
      at Socket.emit (node:domain:489:12)
      at TCP.<anonymous> (node:net:351:12)

      Browser: Chrome 134.0.0.0 / Ubuntu 24.10



 3/3 failed (15s)

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 14, 2025
@github-actions github-actions bot removed the STATE: Need clarification An issue lacks information for further research. label Mar 14, 2025
@Bayheck
Copy link
Collaborator

Bayheck commented Mar 18, 2025

Hello,
I used the following environment:
Node: v22.14.0
Ubuntu: 24.04
TestCafe: 3.7.1 - 3.7.2
Chrome: 134.0.6998.36
I ran the test 30 times as shown below:

import { Selector } from "testcafe";

fixture`Test New Tab 1`.page`https://demo.photoprism.app/library/login`;

test.meta("testID", "testtab-001").meta({ mode: "public" })(
"Multi-Window: First Attempt",async (t) => {
    await generictester(t)
})

test.meta("testID", "testtab-002").meta({ mode: "public" })(
    "Multi-Window: Second Attempt",async (t) => {
        await generictester(t)
    })



fixture`Test New Tab 2`.page`https://demo.photoprism.app/library/login`;

test.meta("testID", "testtab-003").meta({ mode: "public" })(
"Multi-Window: Third Attempt",async (t) => {
    await generictester(t)
})
    
async function generictester(t){
    console.log("  Start Test");
    
    await t.expect(Selector(".nav-places").visible).ok()
    await t.expect(Selector("button.action-open-date", { timeout: 7000 }).visible).ok()
    await t.click(Selector("button.action-open-date").nth(0))
    await t.expect(Selector(".nav-places").visible).ok()

    console.log("  End Test");
}

Image

I wasn't able to reproduce the issue you're describing. Still, we need a way to reproduce the problematic behavior in order to help you. Could you please confirm that you have the same environment?
Could you also try to run your tests on a different machine?
Does the issue occur when you run the tests on CI or locally?

@Bayheck Bayheck added STATE: Need clarification An issue lacks information for further research. and removed STATE: Need response An issue that requires a response or attention from the team. labels Mar 18, 2025
@keif888
Copy link
Author

keif888 commented Mar 24, 2025

I built a new Ubuntu desktop virtual machine (within VirtualBox), applied updates via apt, installed Node Version Manager and Node 24, Testcafe, Chrome. rebooted, and then ran the tests.

The test fails, either 2/3 or 3/3 due to web sockets being closed.

To check if it was a VirtualBox issue, I installed NodeJS onto my host (Windows 11), TestCafe and tried again.
3 of 3 failures due to web sockets being closed (multiple times). I did not have NodeJS or TestCafe installed on my host prior to this, and chrome was already at the latest version.

All versions (except Windows) matches the version numbers listed above.

I can't think what the reason could be between your working config and my failing config.

I did not have a VPN or Proxy configured for the tests.
The speed of failed vs successful tests vary between 3 and 4.5 seconds elapsed.
It is not "faster tests work", as I've had tests work at 3.096s, 3.205s, 3.886s and fail at 3.078s, 3.174s, 4.055s,

I am running the tests locally. When I run a CI suite (against a local instance of PhotoPrism instead of the demo), it fails occasionally.

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 24, 2025
@github-actions github-actions bot removed the STATE: Need clarification An issue lacks information for further research. label Mar 24, 2025
@Bayheck
Copy link
Collaborator

Bayheck commented Mar 25, 2025

Hello, we still cannot reproduce the issue. We tried to reproduce it on different machines, but TestCafe executes tests as expected every time.

This time, I ran my tests with the following configuration:
Chrome Version 134.0.6998.166
Node v22.13.0
Testcafe v3.7.2.

Could you please confirm that you use Testcafe 3.7.2? Also, please share your package.json, as I see that you used the following:

npm run testcafe -- "

I need to see what script you use for testcafe.

With this information, we'll be in a better position to reproduce the issue.

@Bayheck Bayheck removed the STATE: Need response An issue that requires a response or attention from the team. label Mar 25, 2025
@Bayheck Bayheck added the STATE: Need clarification An issue lacks information for further research. label Mar 25, 2025
@keif888
Copy link
Author

keif888 commented Mar 26, 2025

I found a way to get the tests to always work. Add the flag --skip-uncaught-errors.
Do you have that flag (or -u) set as per the doco?

testcafe "chrome --start-fullscreen --headless=new" --skip-uncaught-errors --experimental-multiple-windows issue8377.js

Without that flag, they almost always fail for me. I have had one test run which didn't fail tonight in testing, amongst the 50 odd that I have run.

I tried debugging via --inspect-brk and noticed that the unhandled promise mentions Page.getFrameTree.

Image

But I don't know how to trace back to where the promise got created from where there is a missing handler for the rejection.

In my recent tests, on both ubunutu and windows machines, there is only the issue8377.js file in the folder being executed from, and no other configuration has ever been done.

The previous tests were being done on the PhotoPrism docker development environment, which is why the more complex execution command. These tests (below) are done on machines that did not have node or testcafe installed before I ran the tests, and don't have any configuration done for node or testcafe other than basic installation.

I have added --start-fullscreen to the windows command to ensure that the browser window is large enough so that the app renders the page suitable for the test. ubuntu doesn't need that as it's opening a large enough browser window.

Windows

Chrome Version 134.0.6998.178 (Official Build) (64-bit)

D:\keith\Documents\tests>dir
 Volume in drive D is Data
 Volume Serial Number is 92E0-70CF

 Directory of D:\keith\Documents\tests

24/03/2025  09:24 PM    <DIR>          .
24/03/2025  09:23 PM    <DIR>          ..
26/03/2025  08:48 PM             1,016 issue8377.js
               1 File(s)          1,016 bytes
               2 Dir(s)  657,394,769,920 bytes free

D:\keith\Documents\tests>testcafe -v
3.7.2
D:\keith\Documents\tests>node -v
v22.14.0

D:\keith\Documents\tests>testcafe "chrome --start-fullscreen --headless=new" --experimental-multiple-windows issue8377.js
 Running tests in:
 - Chrome 134.0.0.0 / Windows 11

 Test New Tab 1
  Start Test
  End Test
 × Multi-Window: First Attempt

   1) Unhandled promise rejection:

      Error: WebSocket connection closed
      at C:\Users\keith\AppData\Roaming\npm\node_modules\testcafe\node_modules\chrome-remote-interface\lib\chrome.js:94:35
      at Chrome._handleConnectionClose
      (C:\Users\keith\AppData\Roaming\npm\node_modules\testcafe\node_modules\chrome-remote-interface\lib\chrome.js:256:13)
      at WebSocket.<anonymous>
      (C:\Users\keith\AppData\Roaming\npm\node_modules\testcafe\node_modules\chrome-remote-interface\lib\chrome.js:243:22)
      at WebSocket.emit (node:events:518:28)
      at WebSocket.emit (node:domain:489:12)
      at WebSocket.emitClose (C:\Users\keith\AppData\Roaming\npm\node_modules\testcafe\node_modules\ws\lib\websocket.js:246:10)
      at Socket.socketOnClose (C:\Users\keith\AppData\Roaming\npm\node_modules\testcafe\node_modules\ws\lib\websocket.js:1150:15)
      at Socket.emit (node:events:518:28)
      at Socket.emit (node:domain:489:12)
      at TCP.<anonymous> (node:net:351:12)

ubuntu

Chrome is the latest available according to sudo apt --only-upgrade install google-chrome-stable

keith@ubuntu24:~/tests$ ls -la
total 12
drwxrwxr-x  2 keith keith 4096 Mar 24 22:25 .
drwxr-x--- 20 keith keith 4096 Mar 26 21:05 ..
-rw-rw-r--  1 keith keith  985 Mar 24 22:25 issue8377.js
keith@ubuntu24:~/tests$ google-chrome --version
Google Chrome 134.0.6998.165 
keith@ubuntu24:~/tests$ testcafe -v
3.7.2
keith@ubuntu24:~/tests$ node -v
v22.14.0
keith@ubuntu24:~/tests$ testcafe "chrome --headless=new" --experimental-multiple-windows issue8377.js
 Running tests in:
 - Chrome 134.0.0.0 / Ubuntu 24.04

 Test New Tab 1
  Start Test
  End Test
 ✖ Multi-Window: First Attempt

   1) Unhandled promise rejection:
      
      Error: WebSocket connection closed
      at

   /home/keith/.nvm/versions/node/v22.14.0/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:94:35
      at Chrome._handleConnectionClose

   (/home/keith/.nvm/versions/node/v22.14.0/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:256:13)
      at WebSocket.<anonymous>

   (/home/keith/.nvm/versions/node/v22.14.0/lib/node_modules/testcafe/node_modules/chrome-remote-interface/lib/chrome.js:243:22)
      at WebSocket.emit (node:events:518:28)
      at WebSocket.emit (node:domain:489:12)
      at WebSocket.emitClose

   (/home/keith/.nvm/versions/node/v22.14.0/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:246:10)
      at Socket.socketOnClose

   (/home/keith/.nvm/versions/node/v22.14.0/lib/node_modules/testcafe/node_modules/ws/lib/websocket.js:1150:15)
      at Socket.emit (node:events:518:28)
      at Socket.emit (node:domain:489:12)
      at TCP.<anonymous> (node:net:351:12)

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Mar 26, 2025
@github-actions github-actions bot removed the STATE: Need clarification An issue lacks information for further research. label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Need response An issue that requires a response or attention from the team. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants