Skip to content

Commit

Permalink
[8.x] [Reporting] update puppeteer to version 23.3.1 (#192345) (#193357)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Reporting] update puppeteer to version 23.3.1
(#192345)](#192345)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Eyo O.
Eyo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-18T20:26:44Z","message":"[Reporting]
update puppeteer to version 23.3.1 (#192345)\n\n## Summary\r\n\r\nUpdate
for puppeteer, the following changeset updates puppeteer to\r\nversion
`23.3.1`.\r\n\r\nThe chromium version required for this version of
puppeteer is\r\n`128.0.6613.137` from revision `1331488`, as such the
chromium binary\r\nincluded for windows and darwin platforms either
match or were the\r\nclosest revision to the expectation. The linux
headless binary was built\r\nfrom commit
`fe621c5aa2d6b987e964fb1b5066833da5fb613d` of the
same\r\nrevision.\r\n\r\n_**N.B.**_ Puppeteer 23.0.0 is earmarked as
containing breaking
changes\r\nsee\r\n[here](https://github.com/puppeteer/puppeteer/blob/abda5dcc9912f4fa2c5a566403108db783f48538/packages/puppeteer-core/CHANGELOG.md#2300-2024-08-07),\r\nthis
PR considers the outlined changes and makes relevant adjustments
so\r\nreporting continues working as is.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n-->\r\n\r\n\r\n###
How to verify linux headless build\r\n- clone the following
repo\r\nhttps://github.com/tsullivan/kibana-dev-docker\r\n- pull this
particular PR\r\n- follow the steps outlined in the repo, replacing any
occurrence of\r\n`kibana-<version>-SNAPSHOT-linux-aarch64.tar.gz` from
the repo above's\r\nstep with the output of running build on this
changeset.\r\n- before running step 4, modify the `kibana.yml` file from
the\r\n`kibana-dev-docker` repo and include the following so we might be
able\r\nto verify the version of chromium running;\r\n ```yaml\r\n
logging.loggers:\r\n - name: plugins.reporting\r\n level: debug\r\n
```\r\n- complete the steps outlined in the README, you'll have a linux
distro\r\nof kibana running on port `5601`\r\n- Attempt creating exports
of PDF and PNG reports, in dashboard, canvas,\r\nand visualizations, on
report creation attempt we would see a log output\r\nthat prints out the
chromium version exactly matching this;\r\n\r\n<img width=\"1326\"
alt=\"Screenshot 2024-09-18 at 14 50
19\"\r\nsrc=\"https://github.com/user-attachments/assets/7206781a-e8f9-469c-ad65-fd13749766b2\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"91ca8ab95c01f88ea2d79779f3670c88bf269da0","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:SharedUX","backport:prev-major","v8.16.0","backport:version","v8.15.2"],"title":"[Reporting]
update puppeteer to version
23.3.1","number":192345,"url":"https://github.com/elastic/kibana/pull/192345","mergeCommit":{"message":"[Reporting]
update puppeteer to version 23.3.1 (#192345)\n\n## Summary\r\n\r\nUpdate
for puppeteer, the following changeset updates puppeteer to\r\nversion
`23.3.1`.\r\n\r\nThe chromium version required for this version of
puppeteer is\r\n`128.0.6613.137` from revision `1331488`, as such the
chromium binary\r\nincluded for windows and darwin platforms either
match or were the\r\nclosest revision to the expectation. The linux
headless binary was built\r\nfrom commit
`fe621c5aa2d6b987e964fb1b5066833da5fb613d` of the
same\r\nrevision.\r\n\r\n_**N.B.**_ Puppeteer 23.0.0 is earmarked as
containing breaking
changes\r\nsee\r\n[here](https://github.com/puppeteer/puppeteer/blob/abda5dcc9912f4fa2c5a566403108db783f48538/packages/puppeteer-core/CHANGELOG.md#2300-2024-08-07),\r\nthis
PR considers the outlined changes and makes relevant adjustments
so\r\nreporting continues working as is.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n-->\r\n\r\n\r\n###
How to verify linux headless build\r\n- clone the following
repo\r\nhttps://github.com/tsullivan/kibana-dev-docker\r\n- pull this
particular PR\r\n- follow the steps outlined in the repo, replacing any
occurrence of\r\n`kibana-<version>-SNAPSHOT-linux-aarch64.tar.gz` from
the repo above's\r\nstep with the output of running build on this
changeset.\r\n- before running step 4, modify the `kibana.yml` file from
the\r\n`kibana-dev-docker` repo and include the following so we might be
able\r\nto verify the version of chromium running;\r\n ```yaml\r\n
logging.loggers:\r\n - name: plugins.reporting\r\n level: debug\r\n
```\r\n- complete the steps outlined in the README, you'll have a linux
distro\r\nof kibana running on port `5601`\r\n- Attempt creating exports
of PDF and PNG reports, in dashboard, canvas,\r\nand visualizations, on
report creation attempt we would see a log output\r\nthat prints out the
chromium version exactly matching this;\r\n\r\n<img width=\"1326\"
alt=\"Screenshot 2024-09-18 at 14 50
19\"\r\nsrc=\"https://github.com/user-attachments/assets/7206781a-e8f9-469c-ad65-fd13749766b2\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"91ca8ab95c01f88ea2d79779f3670c88bf269da0"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.15"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192345","number":192345,"mergeCommit":{"message":"[Reporting]
update puppeteer to version 23.3.1 (#192345)\n\n## Summary\r\n\r\nUpdate
for puppeteer, the following changeset updates puppeteer to\r\nversion
`23.3.1`.\r\n\r\nThe chromium version required for this version of
puppeteer is\r\n`128.0.6613.137` from revision `1331488`, as such the
chromium binary\r\nincluded for windows and darwin platforms either
match or were the\r\nclosest revision to the expectation. The linux
headless binary was built\r\nfrom commit
`fe621c5aa2d6b987e964fb1b5066833da5fb613d` of the
same\r\nrevision.\r\n\r\n_**N.B.**_ Puppeteer 23.0.0 is earmarked as
containing breaking
changes\r\nsee\r\n[here](https://github.com/puppeteer/puppeteer/blob/abda5dcc9912f4fa2c5a566403108db783f48538/packages/puppeteer-core/CHANGELOG.md#2300-2024-08-07),\r\nthis
PR considers the outlined changes and makes relevant adjustments
so\r\nreporting continues working as is.\r\n\r\n<!--\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is
usable by keyboard only (learn more\r\nabout [keyboard
accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI
touched in this PR does not create any new axe failures\r\n(run axe in
browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n-
[ ] If a plugin configuration key changed, check if it needs to
be\r\nallowlisted in the cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This renders correctly on smaller devices using a
responsive\r\nlayout. (You can test this [in
your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n-
[ ] This was checked for
[cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n###
Risk Matrix\r\n\r\nDelete this section if it is not applicable to this
PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other
developers to\r\nidentify risks that should be tested prior to the
change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider
some of the following examples\r\nand how they may potentially impact
the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes
|\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n|
Multiple Spaces&mdash;unexpected behavior in non-default Kibana
Space.\r\n| Low | High | Integration tests will verify that all features
are still\r\nsupported in non-default Kibana Space and when user
switches between\r\nspaces. |\r\n| Multiple nodes&mdash;Elasticsearch
polling might have race conditions\r\nwhen multiple Kibana nodes are
polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so
executing them multiple times will not result\r\nin logical error, but
will degrade performance. To test for this case we\r\nadd plenty of unit
tests around this logic and document manual testing\r\nprocedure. |\r\n|
Code should gracefully handle cases when feature X or plugin Y
are\r\ndisabled. | Medium | High | Unit tests will verify that any
feature flag\r\nor plugin combination still results in our service
operational. |\r\n| [See more potential
risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
|\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for
breaking API changes and was
[labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n-->\r\n\r\n\r\n###
How to verify linux headless build\r\n- clone the following
repo\r\nhttps://github.com/tsullivan/kibana-dev-docker\r\n- pull this
particular PR\r\n- follow the steps outlined in the repo, replacing any
occurrence of\r\n`kibana-<version>-SNAPSHOT-linux-aarch64.tar.gz` from
the repo above's\r\nstep with the output of running build on this
changeset.\r\n- before running step 4, modify the `kibana.yml` file from
the\r\n`kibana-dev-docker` repo and include the following so we might be
able\r\nto verify the version of chromium running;\r\n ```yaml\r\n
logging.loggers:\r\n - name: plugins.reporting\r\n level: debug\r\n
```\r\n- complete the steps outlined in the README, you'll have a linux
distro\r\nof kibana running on port `5601`\r\n- Attempt creating exports
of PDF and PNG reports, in dashboard, canvas,\r\nand visualizations, on
report creation attempt we would see a log output\r\nthat prints out the
chromium version exactly matching this;\r\n\r\n<img width=\"1326\"
alt=\"Screenshot 2024-09-18 at 14 50
19\"\r\nsrc=\"https://github.com/user-attachments/assets/7206781a-e8f9-469c-ad65-fd13749766b2\">\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<[email protected]>\r\nCo-authored-by:
Elastic Machine
<[email protected]>","sha":"91ca8ab95c01f88ea2d79779f3670c88bf269da0"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.15","label":"v8.15.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Eyo O. Eyo <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
3 people authored Sep 19, 2024
1 parent 398a758 commit 21582a7
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 65 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@
"pretty-ms": "6.0.0",
"prop-types": "^15.8.1",
"proxy-from-env": "1.0.0",
"puppeteer": "22.13.1",
"puppeteer": "23.3.1",
"query-string": "^6.13.2",
"rbush": "^3.0.1",
"re-resizable": "^6.9.9",
Expand Down
34 changes: 17 additions & 17 deletions packages/kbn-screenshotting-server/src/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ export class ChromiumArchivePaths {
platform: 'darwin',
architecture: 'x64',
archiveFilename: 'chrome-mac.zip',
archiveChecksum: 'fa8004f3c8c5574c089c901e48429d1b01720bf3dd25e05ac56c41d0ab470c10',
binaryChecksum: '56f25cb6881e5c2b1aac0d8e87630517d1af8effdc9319d35f872add048df1ca',
archiveChecksum: '0a3d18efd00b3406f66139a673616b4b2b4b00323776678cb82295996f5a6733',
binaryChecksum: '8bcdaa973ee11110f6b70eaac2418fda3bb64446cf37f964fce331cdc8907a20',
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
revision: 1300317, // 1300313 is not available for Mac_x64
revision: 1331485, // 1331488 is not available for Mac_x64
location: 'common',
archivePath: 'Mac',
isPreInstalled: false,
Expand All @@ -58,44 +58,44 @@ export class ChromiumArchivePaths {
platform: 'darwin',
architecture: 'arm64',
archiveFilename: 'chrome-mac.zip',
archiveChecksum: 'bea49fd3ccd6aaccd7cdc4df38306f002a2934aaa2c044f3b5a3272b31ec77ca',
binaryChecksum: '4c55d9e47deb1179c377c9785afdcdb5f3d3f351bff62b414d43e32ff195bd55',
archiveChecksum: '426eddf16acb88b9446a91de53cc4364c7d487414248f33e30f68cf488cea0c0',
binaryChecksum: '827931739bfdd2b6790a81d5ade8886c159cd051581d79b84d1ede447293e9cf',
binaryRelativePath: 'chrome-mac/Chromium.app/Contents/MacOS/Chromium',
revision: 1300314, // 1300313 is not available for Mac_Arm
revision: 1331488,
location: 'common',
archivePath: 'Mac_Arm',
isPreInstalled: false,
},
{
platform: 'linux',
architecture: 'x64',
archiveFilename: 'chromium-5b5d829-locales-linux_x64.zip',
archiveChecksum: '799e8fd5f47ea70b8a3972d39b2617c9cbebc7fc433a89251dae312a7c77534b',
binaryChecksum: '216b8f7ff9b41e985397342c2df54e4f8e07a01a3b8a929f39b9a10931d26ff5',
archiveFilename: 'chromium-fe621c5-locales-linux_x64.zip',
archiveChecksum: '12ce2e0eac184072dfcbc7a267328e3eb7fbe10a682997f4111c0378f2397341',
binaryChecksum: '670481cfa8db209401106cd23051009d390c03608724d0822a12c8c0a92b4c25',
binaryRelativePath: 'headless_shell-linux_x64/headless_shell',
revision: 1300313,
revision: 1331488,
location: 'custom',
isPreInstalled: true,
},
{
platform: 'linux',
architecture: 'arm64',
archiveFilename: 'chromium-5b5d829-locales-linux_arm64.zip',
archiveChecksum: '961e20c45c61f8e948efdc4128bb17c23217bbcb28537f270ccf5bf0826981e7',
binaryChecksum: 'fc4027fb6b1c96bef9374d5d9f791097fae2ec2ddc4e0134167075bd52d1458f',
archiveFilename: 'chromium-fe621c5-locales-linux_arm64.zip',
archiveChecksum: 'f7333eaff5235046c8775f0c1a0b7395b7ebc2e054ea638710cf511c4b6f9daf',
binaryChecksum: '8a3a3371b3d04f4b0880b137a3611c223e0d8e65a218943cb7be1ec4a91f5e35',
binaryRelativePath: 'headless_shell-linux_arm64/headless_shell',
revision: 1300313,
revision: 1331488,
location: 'custom',
isPreInstalled: true,
},
{
platform: 'win32',
architecture: 'x64',
archiveFilename: 'chrome-win.zip',
archiveChecksum: '27a2ed1473cefc6f48ff5665faa1fbcc69ef5be47ee21777a60e87c8379fdd93',
binaryChecksum: 'd603401a5e6f8bd734b329876e4221a4d24a1999f14df6e32eeb5e6a72520d96',
archiveChecksum: 'fa62be702f55f37e455bab4291c59ceb40e81e1922d30cf9453a4ee176b909bc',
binaryChecksum: '1345e66583bad1a1f16885f381d1173de8bf931487da9ba155e1b58bf23b2c66',
binaryRelativePath: path.join('chrome-win', 'chrome.exe'),
revision: 1300320, // 1300313 is not available for win32
revision: 1331487, // 1331488 is not available for win32
location: 'common',
archivePath: 'Win',
isPreInstalled: true,
Expand Down
2 changes: 1 addition & 1 deletion x-pack/build_chromium/linux/args.gn
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ v8_symbol_level = 0
enable_ink = false
rtc_build_examples = false
angle_build_tests = false
enable_screen_ai_service = false
use_fake_screen_ai = true
enable_vr = false

# Please, consult @elastic/kibana-security before changing/removing this option.
Expand Down
25 changes: 14 additions & 11 deletions x-pack/plugins/screenshotting/server/browsers/chromium/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,17 @@ export class HeadlessChromiumDriver {
if (error) {
await this.injectScreenshottingErrorHeader(error, getPrintLayoutSelectors().screenshot);
}
return this.page.pdf({
format: 'a4',
preferCSSPageSize: true,
scale: 1,
landscape: false,
displayHeaderFooter: true,
headerTemplate: await getHeaderTemplate({ title }),
footerTemplate: await getFooterTemplate({ logo }),
});
return Buffer.from(
await this.page.pdf({
format: 'a4',
preferCSSPageSize: true,
scale: 1,
landscape: false,
displayHeaderFooter: true,
headerTemplate: await getHeaderTemplate({ title }),
footerTemplate: await getFooterTemplate({ logo }),
})
);
}

/*
Expand All @@ -272,6 +274,7 @@ export class HeadlessChromiumDriver {
}

const { boundingClientRect, scroll } = elementPosition;

const screenshot = await this.page.screenshot({
clip: {
x: boundingClientRect.left + scroll.x,
Expand All @@ -282,8 +285,8 @@ export class HeadlessChromiumDriver {
captureBeyondViewport: false, // workaround for an internal resize. See: https://github.com/puppeteer/puppeteer/issues/7043
});

if (Buffer.isBuffer(screenshot)) {
return screenshot;
if (screenshot.byteLength) {
return Buffer.from(screenshot);
}

if (typeof screenshot === 'string') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export class HeadlessChromiumDriverFactory {
pipe: !this.config.browser.chromium.inspect,
userDataDir: this.userDataDir,
executablePath: this.binaryPath,
ignoreHTTPSErrors: true,
acceptInsecureCerts: true,
handleSIGHUP: false,
args: chromiumArgs,
defaultViewport: viewport,
Expand Down
76 changes: 42 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8310,16 +8310,16 @@
resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
integrity sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=

"@puppeteer/browsers@2.2.4":
version "2.2.4"
resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.2.4.tgz#4307245d881aa5a79743050be66568bad0f6ffbb"
integrity sha512-BdG2qiI1dn89OTUUsx2GZSpUzW+DRffR1wlMJyKxVHYrhnKoELSDxDd+2XImUkuWPEKk76H5FcM/gPFrEK1Tfw==
"@puppeteer/browsers@2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.4.0.tgz#a0dd0f4e381e53f509109ae83b891db5972750f5"
integrity sha512-x8J1csfIygOwf6D6qUAZ0ASk3z63zPb7wkNeHRerCMh82qWKUrOgkuP005AJC8lDL6/evtXETGEJVcwykKT4/g==
dependencies:
debug "^4.3.5"
debug "^4.3.6"
extract-zip "^2.0.1"
progress "^2.0.3"
proxy-agent "^6.4.0"
semver "^7.6.2"
semver "^7.6.3"
tar-fs "^3.0.6"
unbzip2-stream "^1.4.3"
yargs "^17.7.2"
Expand Down Expand Up @@ -14199,10 +14199,10 @@ chromedriver@^128.0.1:
proxy-from-env "^1.1.0"
tcp-port-used "^1.0.2"

[email protected].1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.6.1.tgz#533612dd166b7b36a8ba8b90685ad2fa0c98d064"
integrity sha512-kSxJRj0VgtUKz6nmzc2JPfyfJGzwzt65u7PqhPHtgGQUZLF5oG+ST6l6e5ONfStUMAlhSutFCjaGKllXZa16jA==
[email protected].5:
version "0.6.5"
resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-0.6.5.tgz#31be98f9ee5c93fa99d240c680518c9293d8c6bb"
integrity sha512-RuLrmzYrxSb0s9SgpB+QN5jJucPduZQ/9SIe76MDxYJuecPW5mxMdacJ1f4EtgiV+R0p3sCkznTMvH0MPGFqjA==
dependencies:
mitt "3.0.1"
urlpattern-polyfill "10.0.0"
Expand Down Expand Up @@ -15763,12 +15763,12 @@ [email protected], debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9:
dependencies:
ms "2.0.0"

debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5:
version "4.3.6"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.6.tgz#2ab2c38fbaffebf8aa95fdfe6d88438c7a13c52b"
integrity sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==
debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7:
version "4.3.7"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52"
integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==
dependencies:
ms "2.1.2"
ms "^2.1.3"

[email protected]:
version "4.3.1"
Expand Down Expand Up @@ -16229,10 +16229,10 @@ detective@^5.0.2:
defined "^1.0.0"
minimist "^1.1.1"

[email protected].1299070:
version "0.0.1299070"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz#b3e4cf0b678a46f0f907ae6e07e03ad3a53c00df"
integrity sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg==
[email protected].1330662:
version "0.0.1330662"
resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1330662.tgz#400fe703c2820d6b2d9ebdd1785934310152373e"
integrity sha512-pzh6YQ8zZfz3iKlCvgzVCu22NdpZ8hNmwU6WnQjNVquh0A9iVosPtNLWDwaWVGyrntQlltPFztTMK5Cg6lfCuw==

dezalgo@^1.0.0, dezalgo@^1.0.4:
version "1.0.4"
Expand Down Expand Up @@ -26273,26 +26273,29 @@ punycode@^2.1.0, punycode@^2.1.1:
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==

puppeteer-core@22.13.1:
version "22.13.1"
resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-22.13.1.tgz#3ba03e5ebd98bbbd86e465864cf00314e07309de"
integrity sha512-NmhnASYp51QPRCAf9n0OPxuPMmzkKd8+2sB9Q+BjwwCG25gz6iuNc3LQDWa+cH2tyivmJppLhNNFt6Q3HmoOpw==
puppeteer-core@23.3.1:
version "23.3.1"
resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-23.3.1.tgz#b93d825e586f5f7dc268128a31a31c62bbe378ae"
integrity sha512-m5gTpITEqqpSgAvPUI/Ch9igh5sNJV+BVVbqQMzqirRDVHDCkLGHaydEQZx2NZvSXdwCFrIV///cpSlX/uD0Sg==
dependencies:
"@puppeteer/browsers" "2.2.4"
chromium-bidi "0.6.1"
debug "^4.3.5"
devtools-protocol "0.0.1299070"
"@puppeteer/browsers" "2.4.0"
chromium-bidi "0.6.5"
debug "^4.3.7"
devtools-protocol "0.0.1330662"
typed-query-selector "^2.12.0"
ws "^8.18.0"

puppeteer@22.13.1:
version "22.13.1"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-22.13.1.tgz#f8e4217919b438f18adb754e9d8414fef58fb3de"
integrity sha512-PwXLDQK5u83Fm5A7TGMq+9BR7iHDJ8a3h21PSsh/E6VfhxiKYkU7+tvGZNSCap6k3pCNDd9oNteVBEctcBalmQ==
puppeteer@23.3.1:
version "23.3.1"
resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-23.3.1.tgz#830ac4b2c264ae4a610b79be77aff23bb13efa2c"
integrity sha512-BxkuJyCv46ZKW8KEHiVMHgHEC89jKK9FffReWjbw1IfBUmNx+6JIZyqOtaJeSwyolTdVqqb5fiPiXflKeH3dKQ==
dependencies:
"@puppeteer/browsers" "2.2.4"
"@puppeteer/browsers" "2.4.0"
chromium-bidi "0.6.5"
cosmiconfig "^9.0.0"
devtools-protocol "0.0.1299070"
puppeteer-core "22.13.1"
devtools-protocol "0.0.1330662"
puppeteer-core "23.3.1"
typed-query-selector "^2.12.0"

pure-rand@^6.0.0:
version "6.0.2"
Expand Down Expand Up @@ -30878,6 +30881,11 @@ typed-array-length@^1.0.6:
is-typed-array "^1.1.13"
possible-typed-array-names "^1.0.0"

typed-query-selector@^2.12.0:
version "2.12.0"
resolved "https://registry.yarnpkg.com/typed-query-selector/-/typed-query-selector-2.12.0.tgz#92b65dbc0a42655fccf4aeb1a08b1dddce8af5f2"
integrity sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==

typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
Expand Down

0 comments on commit 21582a7

Please sign in to comment.