Browser is getting crashed

Hi,
I have a very strange issue when running the load tests using the browser extension, I’m experiencing browser connection resets.

It seems that the issue isn’t happening all the time, it happens randomly.
There are sufficient resources.
Can someone maybe help me with this I know it’s a general issue but I didn’t find any related logs that point to that issue.
It’s important to say that my client is not lightweight, it is pretty heavy in different scenarios.

It can be a factor of this reported browser resets?
It’s stopped us from using the k6 framework.
If someone can help me with this I’ll very appreciate it.

Hi @idosegal,

Welcome to the forum, and thanks for your question.

It’s difficult to determine why this is happening for you without some extra information from you, could you please provide us with the:

  1. version of k6 you are using;
  2. OS and version you are running k6 in;
  3. test script that exhibits this issue, preferably pointing to a publicly accessible website;
  4. full output of the test run.

Cheers,
Ankur

Hi @ankur!
Thank you for your response.

  1. We’re using k6 version 0.45.0 and Operator version 0.0.9.
  2. The OS alpine 3.17 (From Docker Image)
  3. Problematic code · GitHub
  4. I can’t send full output of the test run it’s including sensitive data. Anyway there is no exception throw by k6 except of:
    time="2023-08-09T14:15:25Z" level=error msg="communicating with browser: websocket: close 1006 (abnormal closure): unexpected EOF" category=cdp elapsed="0 ms" goroutine=176

In the gist, the point that it seems the issue happans is in the promise. I also tried to remove the sleep.

Hi @idosegal,

Where exactly in the code is the test failing on?

time="2023-08-09T14:15:25Z" level=error msg="communicating with browser: websocket: close 1006 (abnormal closure): unexpected EOF" category=cdp elapsed="0 ms" goroutine=176

This is usually a symptom of the issue, but not the issue itself. Can you remove the sensitive data and paste the full output, or at least the previous 5-10 lines before this error message you have pasted here.

Cheers,
Ankur

EDIT:

Could you also paste the full dockerfile that you are using to build the container image?

It seems that it fails in the promise section. I’m also checking if it’s maybe related to sleep.

Here is a log for example:

Dockerfile:

I’m building the project as I’m patching the statsd file to send the metrics without delay of 10 sec.

Hi @idosegal,

Thanks for all the details!

The primary issue seems to be with clicking on a selector "//i[@id='analysis-queries-grid-showAnalysisResults-btn']":

Uncaught (in promise) clicking on \"//i[@id='analysis-queries-grid-showAnalysisResults-btn']\": checking hit target: another element is intercepting with pointer action

I’ve seen this occur when trying to click on an element in an iframe. If that is the case then unfortunately the browser module doesn’t support iframes at the moment. You could try a workaround using page.evaluate, here’s a post that might help you: Locating elements within an iframe.

If the website under test is not working with an iframe then I will need to be able to test against the same website you are testing against or a publicly facing website which exhibits the same issue.

Cheers,
Ankur