Closed ankur22 closed 6 months ago
Thanks! It might be because of the concurrency issue as in page.On
as you said 👍 Before the task queue starts infiltrating much into the business logic; my humble suggestion is to abstract it in the mapping layer while solving this problem :)
I believe this issue has been resolved by https://github.com/grafana/xk6-browser/issues/447, and some refactoring in https://github.com/grafana/xk6-browser/issues/1187.
Brief summary
When running the
waitForEvent.js
example script in the CI it is failing (not on all runs though) onfatal error: concurrent map writes
. I'm unable to reproduce this locally though. My initial guess is that the predicateFn call needs to be made on the taskqueue like we do forpage.on('console')
.xk6-browser version
a7598e135deecb7ac1f64bea605feb547fda345d
OS
NA
Chrome version
NA
Docker version and image (if applicable)
NA
Steps to reproduce the problem
Run the examples/waitForEvent.js test script in the CI and it might result in an error. It doesn't seem to occur on all runs. I've failed to reproduce it locally.
Expected behaviour
The test to run without any issues.
Actual behaviour
The test fails with the following output: