Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Request Header with a "-" failing

Open
#49 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, javascript

Research direction

Reproduce the failure with the provided Docker command and config.json, then inspect how the plugin passes Lighthouse settings to Network.setExtraHTTPHeaders. Compare the hyphenated and non-hyphenated header cases; done means valid headers with hyphens are accepted or the limitation is clearly documented.

Written by the indexing model from the issue text.

Description

awaiting response

I am running the following command: docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:11.9.3-plus1 --config /sitespeed.io/config.json http://www.domain.com/ with the contents of config.json being:

{
  "lighthouse": {
      "settings": {
        "extra-headers": {"X-Bot-Allow":"123"},
        "extraHeaders": {"X-Bot-Allow":"123"}
      }
    }
}

I get the following error:

[2020-03-06 22:44:31] ERROR: Lighthouse could not test http://www.domain.com/ please create an upstream issue: https://github.com/GoogleChrome/lighthouse/issues/new?template=Bug_report.md Error: Protocol error (Network.setExtraHTTPHeaders): Invalid header value, string expected
    at Function.fromProtocolMessage (/lighthouse/node_modules/lighthouse/lighthouse-core/lib/lh-error.js:132:19)
    at /lighthouse/node_modules/lighthouse/lighthouse-core/gather/connections/connection.js:123:25
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
[2020-03-06 22:44:31] ERROR: TypeError: Cannot read property 'lhr' of undefined
    at Object.processMessage (/lighthouse/index.js:200:28)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

If I strip the hyphens from X-Bot-Allow, it works, but I need the hyphens as we use this header to allow our sites to not block our sitespeedio tests. Any ideas?

Dominant language
JavaScript
Stars
31
Forks
21
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sitespeedio/plugin-lighthouse

All issues in sitespeedio/plugin-lighthouse

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.