grafana / xk6-browser

k6 extension that adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol
https://grafana.com/docs/k6/latest/javascript-api/k6-experimental/browser/
GNU Affero General Public License v3.0
337 stars 42 forks source link

test gets fails after 30s with this error message " An existing connection was forcibly closed by the remote host" #582

Open MenakaSri opened 1 year ago

MenakaSri commented 1 year ago

image

imiric commented 1 year ago

Hi there, thanks for opening this issue.

Please include the xk6-browser version you're using, along with your Chrome and OS versions. I'm assuming this is on Windows, based on wsarecv.

We also need to be able to reproduce this, so please include a small test script we can use.

The 30s could possibly be because of a page.goto(), page.waitForNavigation() or page.waitForSelector() timeout, and the error message an indication that we're not handling the browser closing properly. We can't know for sure unless we have a script to work with.

Since there have been many bugfixes recently, you might want to try out an unreleased version by building your binary from main. You can do this with:

xk6 build --output xk6-browser --with github.com/grafana/xk6-browser@main

You can see the rest of the instructions in the README.

Or just wait for v0.6.0 to be released in the next few weeks.

adsurg commented 1 year ago

I've hit the same issue, it looks like setting the timeout option on launch extends this period. const browser = chromium.launch({ timeout: '60s' });

jeetshah26 commented 1 year ago

I've hit the same issue, it looks like setting the timeout option on launch extends this period. const browser = chromium.launch({ timeout: '60s' });

This fix worked for me !