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

Chrome: Launching Sub-window throwing Unhandled promise rejection #8258

Closed
aprabh001c opened this issue Aug 20, 2024 · 5 comments · Fixed by #8283
Closed

Chrome: Launching Sub-window throwing Unhandled promise rejection #8258

aprabh001c opened this issue Aug 20, 2024 · 5 comments · Fixed by #8283
Assignees
Labels
STATE: Issue accepted An issue has been reproduced. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@aprabh001c
Copy link

What is your Scenario?

  1. Launch main window, perform some tests
  2. Launch sub window and close sub window

What is the Current behavior?

Launching subwindow throwing Unhandled promise rejection, all assertion and steps are passing, but end of test it is giving Unhandled promise rejection

What is the Expected behavior?

Test should not throw Unhandled promise rejection

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

https://testcafe.io/
https://www.google.com

What is your TestCafe test code?

test(sameple test,async tn=>{
await t.navigateTo('https://testcafe.io/')
const url = "https://www.google.com";
const mainWindow = await t.getCurrentWindow();
const childWindow = await t.openWindow(url);
await t.wait(5000);
await t.closeWindow();
})

Your complete configuration file

No response

Your complete test report

sameple test

  1. Unhandled promise rejection:

    Error: WebSocket connection closed
    at D:\xxxxxx\node_modules\chrome-remote-interface\lib\chrome.js:94:35
    at Chrome._handleConnectionClose (D:\xxxxx\node_modules\chrome-remote-interface\lib\chrome.js:256:13)
    at WebSocket. (D:\xxxxxx\node_modules\chrome-remote-interface\lib\chrome.js:243:22)
    at WebSocket.emit (node:events:517:28)
    at WebSocket.emit (node:domain:489:12)
    at WebSocket.emitClose (D:\xxxxxx\node_modules\ws\lib\websocket.js:246:10)
    at Socket.socketOnClose (D:\xxxxxxx\node_modules\ws\lib\websocket.js:1148:15)
    at Socket.emit (node:events:517:28)
    at Socket.emit (node:domain:489:12)
    at TCP. (node:net:350:12)

Screenshots

No response

Steps to Reproduce

test(sameple test,async tn=>{
await t.navigateTo('https://testcafe.io/')
const url = "https://www.google.com";
const mainWindow = await t.getCurrentWindow();
const childWindow = await t.openWindow(url);
await t.wait(5000);
await t.closeWindow();
})

TestCafe version

3.6.2

Node.js version

18.20.2

Command-line arguments

testcafe 'chrome --disable-search-engine-choice-screen' --disable-http2 --disableNativeAutomation --concurrency 1 -F Sample_fixture

Browser name(s) and version(s)

Chrome 127.0.6533.120

Platform(s) and version(s)

Windows

Other

I have tried with both Native Automation with experimental multi window flag as well

@aprabh001c aprabh001c added the TYPE: bug The described behavior is considered as wrong (bug). label Aug 20, 2024
@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 Aug 20, 2024
@Bayheck Bayheck added STATE: Issue accepted An issue has been reproduced. and removed STATE: Need response An issue that requires a response or attention from the team. labels Aug 21, 2024
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.

@Bayheck Bayheck self-assigned this Sep 2, 2024
@aprabh001c
Copy link
Author

Hi Team, Thank you for your support, any ETA for this issue.

@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 Sep 10, 2024
@Bayheck
Copy link
Collaborator

Bayheck commented Sep 13, 2024

Hello,

Personal predictions can be unreliable, so we are not ready to give you an ETA. Once we make more progress, we will follow up here.

@Bayheck Bayheck removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 13, 2024
@Bayheck
Copy link
Collaborator

Bayheck commented Sep 16, 2024

Hello, I managed to run your sample successfully with Native automation disabled.

The following command line argument is incorrect:

testcafe chrome --disableNativeAutomation

It should be as follows:

testcafe chrome --disable-native-automation

Please fix the argument and let us know your results.

@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 Sep 16, 2024
@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 Sep 16, 2024
@aprabh001c
Copy link
Author

testcafe chrome --disable-native-automation we see error suppressed with this flag.
but still we issue with --experimental-multiple-windows mode

@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 Sep 17, 2024
@github-actions github-actions bot removed the STATE: Need clarification An issue lacks information for further research. label Sep 17, 2024
@Bayheck Bayheck removed the STATE: Need response An issue that requires a response or attention from the team. label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Issue accepted An issue has been reproduced. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants