0

I created some web browser UI tests for k6-browser. I run a browser session with one virtual user at a time and it does what I expect. When I run 10 vu’s in parallel in non-headless mode, it also creates all the elements and the data that I want for each of them but on the console I get many messages of that:

ERRO[0069] cleaning up the user data directory: remove C:\Users\D34C5~1.LLA\AppData\Local\Temp\k6browser-data-4208859485\first_party_sets.db: The process cannot access the file because it is being used by another process. category="Browser:Close" elapsed="0 ms" source=browser ERRO[0069] Uncaught (in promise) GoError: Browser iteration failed: undefined running at go.k6.io/k6/internal/js/modules/k6.(*K6).Fail-fm (native) 

So the multiple Chromiums that run in parallel block each other the access to the files. Understandable. But, can I prevent this? Can they be told to run with own caches or something else?

When I run in headless mode, the first message does not come up. Clear because the browsers do not open their UI. But then not all parallel sessions create the data as expected. Sometimes just 2 of 10 are successful, sometimes 6 – quite flaky. I thought it should be more reliable than when running in head mode because in headless there should be less concurrency

In headless, the output can look so:

WARN[0046] Unexpected DevTools server error: context canceled category="ExecutionContext:eval" elapsed="0 ms" source=browser ERRO[0046] Uncaught (in promise) GoError: Browser iteration failed: undefined running at go.k6.io/k6/internal/js/modules/k6.(*K6).Fail-fm (native) ui [at default (file:///C:/tmp/k6/create-ticket.js:160:9(267)) executor=shared-iterations scenario=ui ERRO[0046] Uncaught (in promise) GoError: Browser iteration failed: undefined running at go.k6.io/k6/internal/js/modules/k6.(*K6).Fail-fm (native) 

What can I do to solve these messages?

1
  • Is this on Windows? Might be a bug Commented Oct 11 at 6:55

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.