-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[ResponseOps] Reports are timing out and failing with an invalid header error #225919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ResponseOps] Reports are timing out and failing with an invalid header error #225919
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
We will also need to backport to whatever open 8.x releases we have - I think doing 8.17 probably makes sense as well, unless it's a difficult merge conflict to fix (it may never ship another patch release, but ... I doubt it :-). The ability to use |
UNSAFE_HEADERS_PATTERNS.some((pattern) => pattern.test(header))) | ||
UNSAFE_HEADERS_PATTERNS.some((pattern) => pattern.test(header)) || | ||
// remove psuedo-headers that are prefixed with a colon | ||
header.startsWith(':')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can actually add /^:/
as an additional element of UNSAFE_HEADERS_PATTERNS
and not make the changes here. At least for the new test case, it passes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in this commit, da037c3
This approach removes the From the spec:
I'm a little worried that the pseudo-headers may end up being required, so an alternative approach would be to leave them, but make sure they're at the beginning of the list of headers. Build a sort function and use a @JoshMock as our http expert, any thoughts? |
…kibana into bug/reporting-invalid-headers
What are the actual headers that this strips out? If they're needed headers, is there a way to transform them into HTTP/1.1 headers before sending them along? |
The headers are actually "pseudo-headers". I'm very familiar with the HTTP 1.x specs, but had never heard of these "pseudo-headers" before. See in the HTTP/2 spec 8.3.1. Request Pseudo-Header Fields. When we debugged this, we saw all four listed there, My guess is that there are used for pipelining, so the data can be "all headers" and no "first line" like HTTP/1, or something. We are intercepting these from the browser via puppeteer. We have puppeteer open the page that will be "printed", and it gives us a callback for each request sent to the server (main page, css, images, etc). The callback sent us those pseudo-headers, so presumably Chromium headless shell is adding them. This PR removes them in the callback, and things still work, so maybe that's ok? Maybe puppeteer is fixing these up again when we return from the callback? Not sure. |
Yeah,
to:
I was suggesting doing that translation rather than dropping the headers entirely, as they may be necessary to properly forward those requests to ES. |
This is a bit confusing, but my understanding of what's happening is that:
So, we're not actually invoking an http client, just intercepting a live request. This happens for all sub-requests as well (images, etc). I'm not sure we can even do these kind of transforms (of the URL itself, for instance). But I don't think we'd want to. The question was more of - is it super-important to be sending these to the server anyway? Not sending them, as this PR does, allows reporting to work over http2, which it won't WITHOUT this PR. But I'm thinking long-term we probably DO want to send them. We tried following the rules, putting those "headers" first, and that didn't seem to work. So maybe there's something different we need to do with puppeteer or something. Current plan is to strip them (merge this PR), since this seems to work for the cases we've tried, for 8.19 and 9.1 (still a few build candidates left before those releases at the end of this month). Better to have something work in at least some cases than fail 100% of the time (for on-prem). We'll open a separate issue to investigate more to see if we need to do something else for future releases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]
History
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, code review only
Starting backport for target branches: 8.17, 8.18, 8.19, 9.0, 9.1 |
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…d header error (#225919) (#226499) # Backport This will backport the following commits from `main` to `9.0`: - [[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)](#225919) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alexi Doak","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-03T20:57:32Z","message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v8.17.9"],"title":"[ResponseOps] Reports are timing out and failing with an invalid header error","number":225919,"url":"https://github.com/elastic/kibana/pull/225919","mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.19","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225919","number":225919,"mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Alexi Doak <[email protected]>
Starting backport for target branches: 8.17, 8.18, 8.19, 9.0, 9.1 |
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl` (cherry picked from commit 3dec3e2)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…d header error (#225919) (#226500) # Backport This will backport the following commits from `main` to `9.1`: - [[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)](#225919) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alexi Doak","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-03T20:57:32Z","message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v8.17.9"],"title":"[ResponseOps] Reports are timing out and failing with an invalid header error","number":225919,"url":"https://github.com/elastic/kibana/pull/225919","mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.19","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225919","number":225919,"mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Alexi Doak <[email protected]>
…id header error (#225919) (#226498) # Backport This will backport the following commits from `main` to `8.19`: - [[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)](#225919) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alexi Doak","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-03T20:57:32Z","message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v8.17.9"],"title":"[ResponseOps] Reports are timing out and failing with an invalid header error","number":225919,"url":"https://github.com/elastic/kibana/pull/225919","mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.19","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225919","number":225919,"mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Alexi Doak <[email protected]>
…id header error (#225919) (#226496) # Backport This will backport the following commits from `main` to `8.17`: - [[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)](#225919) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alexi Doak","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-03T20:57:32Z","message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v8.17.9"],"title":"[ResponseOps] Reports are timing out and failing with an invalid header error","number":225919,"url":"https://github.com/elastic/kibana/pull/225919","mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.19","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225919","number":225919,"mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Alexi Doak <[email protected]>
…id header error (#225919) (#226497) # Backport This will backport the following commits from `main` to `8.18`: - [[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)](#225919) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Alexi Doak","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-03T20:57:32Z","message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:ResponseOps","v9.0.0","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v8.17.9"],"title":"[ResponseOps] Reports are timing out and failing with an invalid header error","number":225919,"url":"https://github.com/elastic/kibana/pull/225919","mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","9.1","8.19","8.18","8.17"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225919","number":225919,"mergeCommit":{"message":"[ResponseOps] Reports are timing out and failing with an invalid header error (#225919)\n\nResolves\nhttps://github.com//issues/225915#issuecomment-3020436237\n\n## Summary\n\nKibana is using HTTP/2 by default, and it's including pseudo-headers\n(headers prefixed by a colon :) in the reporting requests to ES. The\npsuedo-headers are causing reports to fail with this error, `Failed to\ncomplete a request using headers: Protocol error\n(Fetch.continueRequest): Invalid header`, when running Kibana locally\nwith --ssl. This PR updates `stripUnsafeHeaders()` to remove\npsuedo-headers.\n\n\n\n### Checklist\n\n- [ ] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios\n\n### To verify\n1. Run Kibana and ES with `--ssl`\n2. Generate a PDF report (with and without printing) and a PNG report\nand verify that the report is generated successfully.\n3. Repeat step 2 but run Kibana without `--ssl`","sha":"3dec3e2f5fbacac0a3e5a4edbe16721f2572b5cd"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Alexi Doak <[email protected]>
…er error (elastic#225919) Resolves elastic#225915 (comment) ## Summary Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error, `Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header`, when running Kibana locally with --ssl. This PR updates `stripUnsafeHeaders()` to remove psuedo-headers. ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### To verify 1. Run Kibana and ES with `--ssl` 2. Generate a PDF report (with and without printing) and a PNG report and verify that the report is generated successfully. 3. Repeat step 2 but run Kibana without `--ssl`
Resolves #225915 (comment)
Summary
Kibana is using HTTP/2 by default, and it's including pseudo-headers (headers prefixed by a colon :) in the reporting requests to ES. The psuedo-headers are causing reports to fail with this error,
Failed to complete a request using headers: Protocol error (Fetch.continueRequest): Invalid header
, when running Kibana locally with --ssl. This PR updatesstripUnsafeHeaders()
to remove psuedo-headers.Checklist
To verify
--ssl
--ssl