You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The option flag for pwmetrics gets captured as a string, and then pass straight into the NodeJS Lighthouse Runner as a string. Since the runner expects an object rather than string, we see the aforementioned error:
Config / CLI options
Using a JS config file, I am correctly able to specify additional request headers, like so:
But when I try to speficy these extra headers using CLI options like:
I see this error
Protocol error (Network.setExtraHTTPHeaders): Invalid parameters (headers: object expected)
I believe the problem is here:
pwmetrics/lib/index.ts
Line 61 in f8a784f
The option flag for
pwmetrics
gets captured as a string, and then pass straight into the NodeJS Lighthouse Runner as a string. Since the runner expects an object rather than string, we see the aforementioned error:pwmetrics/lib/lh-runner.ts
Line 43 in f8a784f
One possible solution would be to special case the
opts.flags.extraHeaders
argument, and JSON.parse it.Note, it seems other projects have had similar issues: sitespeedio/plugin-lighthouse#30
Environment
pwmetrics
version:4.2.3 (lighthouse 5.2.0)
Note sure if relevant, but I also have Lighthouse 6 installed globally through yarn
Chrome version:
"chrome-launcher": "^0.10.2"
OS version:
Linux, 5.6.15-arch
The text was updated successfully, but these errors were encountered: