Disable the browser logs

I’m getting tons of logs while running a test with k6-browser automation. Example like below.

time=“2024-01-09T07:06:00Z” level=warning msg=“Encrypted Media access has been blocked because of a Feature Policy applied to the current document. See Deprecating Permissions in Cross-Origin Iframes - The Chromium Projects for more details.” browser_source=javascript line_number=26 source=browser url="

Any option to disable it. I’m using the below docker image to run the test

docker pull grafana/k6:latest-with-browser

Hi @gerardlj

Those seem to be warning messages you might want to look into. It seems related to the Encrypted Media Extensions API - Web APIs | MDN API and your browser policies.

That said, if you want to ignore those, I would try disabling k6 logs, which should suppress them (and any other errors). That could be an issue if other warnings or errors show up, you’d miss those. E.g. on my Mac laptop:

docker run --rm -i -v $(pwd):/home/k6/screenshots -e K6_LOG_OUTPUT=none grafana/k6:master-with-browser run - <script.js

Let me know if you still see the warnings, and we’d further look into it.

Cheers!

2 Likes