Xk6-browser 0.5.0 issue while running as docker container


I was trying to run a xk6-browser script using docker image that I have built with latest xk6 and xk6-browser (v0.5.0) extensions.

While running the script after 30 seconds it is automatically getting closed with an error:

Communication with browser: websocket: close 1006 (abnormal closure): unexpected EOF category: cdp

Can you please help how to resolve this?

I have seen another issue in the forum while using waituntill : Network idle so I have removed that part but script still fails.

Also this happens when running as extension(with out docker)

Please help me out.


Hi @Akshayini,

Thanks for this post too. Can you try to work with the Dockerfile i suggested in your other post?

Let me know how you get on.


I had issue with 30s timeout and I fixed it by adding timeout = '2m' to:

const browser = chromium.launch({
    headless: true,
    timeout: '2m',

which means 2 minutes timeout so now the rest runs longer than 30s which seems the default value.