K6 browser tests stopped working with exit code 104

I had implemented a few tests using k6 browser module, for core web vitals, and they were running fine in my azure pipeline.
But they have suddenly stopped working with errors on the lines of:

time=“2023-08-15T23:54:09Z” level=error msg=“invalid threshold defined on webvital_cumulative_layout_shift; reason: no metric name "webvital_cumulative_layout_shift" found”
Error: The process ‘/home/vsts/work/1/s/k6’ failed with exit code 104

Some runs failed with similar error around ‘webvital_first_input_delay’.

There were minor changes to the test but I am unable to figure out why the complain is about the metrics not being defined.
The tests when run locally, work fine, giving me output for all 3 core web vitals.
Has someone else experienced something similar, ever?

Hi @imranqureshi , welcome to the forum! :wave:

You mention that you are running this in a CI pipeline, is it possible that you are using the Docker container with the latest tag? So in that case you would be using the k6 v0.46.0 which includes a few breaking changes for the browser module, including the renaming of the Web Vitals metrics.

I guess locally it works because you are probably using the binary for a previous version, such as v0.45.0.

So, you have two options:

  • Migrate the test script implementation to comply with the new version changes: We have a migration guide for that.
  • Use a previous version in CI: E.g.: Use the 0.45.0 tag for the Docker image.

Let me know if that helps.

It was the upgrade from 0.45.0 to 0.46.0. Guess the browser module being an experimental module, I should’ve been ready for some breaking changes at some point. So a lesson learnt there