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

Communicating with browser: websocket: close 1006 (abnormal closure): unexpected EOF #745

Closed
GeorgeLoukovitis opened this issue Feb 1, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@GeorgeLoukovitis
Copy link

Brief summary

When the testing script runs for over 30 seconds the browser closes automatically, disrupting the test.

xk6-browser version

k6 v0.42.0 ((devel), go1.19.4, linux/amd64)

OS

Ubuntu Linux 22.04.1 LTS

Chrome version

Chromium 109.0.5414.119 snap

Docker version and image (if applicable)

No response

Steps to reproduce the problem

`

import { sleep } from 'k6';
import { chromium } from 'k6/x/browser';

export default function () {

    const browser = chromium.launch({ headless: false });
    const page = browser.newPage();
  
    page.goto("https://k6.io/docs/javascript-api/xk6-browser/api/page/")
      .then(() => {
          sleep(30);
          console.log("After 30 seconds")
          page.goto("https://k6.io/docs/javascript-api/xk6-browser/api/page/")
          console.log("After trying to goto k6 again")
          page.close()
          browser.close()
      })
  }

`

Expected behaviour

The browser should remain open

Actual behaviour

The browser closes automatically failing the test

@GeorgeLoukovitis GeorgeLoukovitis added the bug Something isn't working label Feb 1, 2023
@ka3de
Copy link
Collaborator

ka3de commented Feb 1, 2023

Hi @GeorgeLoukovitis ,
Could you please open a ticket for this in our community forum? We will handle the issue from there.
Thank you.

@ka3de ka3de closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2023
@ArielKo1248
Copy link

Solved by changing the following:

const browser = chromium.launch({
timeout: '5m'
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants