diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 20871ad9adaf77..18904fa286622e 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -112,7 +112,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . - build-args: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=0 + build-args: PUPPETEER_SKIP_DOWNLOAD=0 push: true tags: ${{ steps.meta-chromium-bundled.outputs.tags }} labels: ${{ steps.meta-chromium-bundled.outputs.labels }} diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index ae521843efb4e5..41b5ce335e48ec 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -49,7 +49,7 @@ jobs: uses: docker/build-push-action@v4 with: context: . - build-args: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=0 # also test bundling Chromium + build-args: PUPPETEER_SKIP_DOWNLOAD=0 # also test bundling Chromium load: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 88bd3415741ba9..08b77cda21d373 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ COPY ./package.json /app/ # lazy install Chromium to avoid cache miss, only install production dependencies to minimize the image size RUN \ set -ex && \ - export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true && \ + export PUPPETEER_SKIP_DOWNLOAD=true && \ yarn install --production --frozen-lockfile --network-timeout 1000000 && \ yarn cache clean @@ -84,18 +84,18 @@ COPY --from=dep-version-parser /ver/.puppeteer_version /app/.puppeteer_version ARG TARGETPLATFORM ARG USE_CHINA_NPM_REGISTRY=0 -ARG PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 +ARG PUPPETEER_SKIP_DOWNLOAD=1 # The official recommended way to use Puppeteer on x86(_64) is to use the bundled Chromium from Puppeteer: # https://pptr.dev/faq#q-why-doesnt-puppeteer-vxxx-work-with-chromium-vyyy RUN \ set -ex ; \ - if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = 0 ] && [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \ + if [ "$PUPPETEER_SKIP_DOWNLOAD" = 0 ] && [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \ if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \ npm config set registry https://registry.npmmirror.com && \ yarn config set registry https://registry.npmmirror.com ; \ fi; \ echo 'Downloading Chromium...' && \ - unset PUPPETEER_SKIP_CHROMIUM_DOWNLOAD && \ + unset PUPPETEER_SKIP_DOWNLOAD && \ yarn add puppeteer@$(cat /app/.puppeteer_version) && \ yarn cache clean ; \ else \ @@ -115,7 +115,7 @@ WORKDIR /app # install deps first to avoid cache miss or disturbing buildkit to build concurrently ARG TARGETPLATFORM -ARG PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 +ARG PUPPETEER_SKIP_DOWNLOAD=1 # https://pptr.dev/troubleshooting#chrome-headless-doesnt-launch-on-unix # https://github.com/puppeteer/puppeteer/issues/7822 # https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#noteworthy-obsolete-packages @@ -127,7 +127,7 @@ RUN \ apt-get install -yq --no-install-recommends \ dumb-init \ ; \ - if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = 0 ]; then \ + if [ "$PUPPETEER_SKIP_DOWNLOAD" = 0 ]; then \ if [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \ apt-get install -yq --no-install-recommends \ ca-certificates fonts-liberation wget xdg-utils \ @@ -149,7 +149,7 @@ COPY --from=chromium-downloader /app/node_modules/.cache/puppeteer /app/node_mod # if grep matches nothing then it will exit with 1, thus, we cannot `set -e` here RUN \ set -x && \ - if [ "$PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" = 0 ] && [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \ + if [ "$PUPPETEER_SKIP_DOWNLOAD" = 0 ] && [ "$TARGETPLATFORM" = 'linux/amd64' ]; then \ echo 'Verifying Chromium installation...' && \ ldd $(find /app/node_modules/.cache/puppeteer/ -name chrome -type f) | grep "not found" ; \ if [ "$?" = 0 ]; then \ diff --git a/app.json b/app.json index 21423c43459190..796f14bb931b84 100644 --- a/app.json +++ b/app.json @@ -14,7 +14,7 @@ "value": "80", "required": false }, - "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD": { + "PUPPETEER_SKIP_DOWNLOAD": { "value": "1", "required": false } diff --git a/package.json b/package.json index bf8aa61995605f..67ac2811c4d47d 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "pidusage": "3.0.2", "plist": "3.0.6", "proxy-chain": "2.3.0", - "puppeteer": "19.11.1", + "puppeteer": "20.0.0", "puppeteer-extra": "3.3.6", "puppeteer-extra-plugin-stealth": "2.11.2", "query-string": "7.1.3", diff --git a/yarn.lock b/yarn.lock index 826da8918b7f91..cae13ba5eddead 100644 --- a/yarn.lock +++ b/yarn.lock @@ -761,10 +761,10 @@ dependencies: safe-buffer "^5.0.1" -"@puppeteer/browsers@0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-0.5.0.tgz#1a1ee454b84a986b937ca2d93146f25a3fe8b670" - integrity sha512-Uw6oB7VvmPRLE4iKsjuOh8zgDabhNX67dzo8U/BB0f9527qx+4eeUs+korU98OhG5C4ubg7ufBgVi63XYwS6TQ== +"@puppeteer/browsers@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-1.0.0.tgz#89de56a718c922857b1d802aac473ebbe1f54d99" + integrity sha512-YKecOIlwH0UsiM9zkKy31DYg11iD8NhOoQ7SQ4oCpwDSd1Ud31WYRoAldbVlVBj9b4hLJIXxn7XSnkH1ta1tpA== dependencies: debug "4.3.4" extract-zip "2.0.1" @@ -6022,12 +6022,12 @@ punycode@^2.1.0, punycode@^2.1.1, punycode@^2.3.0: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -puppeteer-core@19.11.1: - version "19.11.1" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-19.11.1.tgz#4c63d7a0a6cd268ff054ebcac315b646eee32667" - integrity sha512-qcuC2Uf0Fwdj9wNtaTZ2OvYRraXpAK+puwwVW8ofOhOgLPZyz1c68tsorfIZyCUOpyBisjr+xByu7BMbEYMepA== +puppeteer-core@20.0.0: + version "20.0.0" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-20.0.0.tgz#21fdcd77ba8829e562a9f168fcce9e413029ceec" + integrity sha512-mQg1pXOqomTB0ecuv6WWrd+PxSeV4uC+wiUM+UYvENuKNq9m0fG9ZXhHLK1COwZH/A5IILzJH2sfQ0ivmxobGw== dependencies: - "@puppeteer/browsers" "0.5.0" + "@puppeteer/browsers" "1.0.0" chromium-bidi "0.4.7" cross-fetch "3.1.5" debug "4.3.4" @@ -6086,17 +6086,17 @@ puppeteer-extra@3.3.6: debug "^4.1.1" deepmerge "^4.2.2" -puppeteer@19.11.1: - version "19.11.1" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-19.11.1.tgz#bb75d518e87b0b4f6ef9bad1ea7e9d1cdcd18a5d" - integrity sha512-39olGaX2djYUdhaQQHDZ0T0GwEp+5f9UB9HmEP0qHfdQHIq0xGQZuAZ5TLnJIc/88SrPLpEflPC+xUqOTv3c5g== +puppeteer@20.0.0: + version "20.0.0" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-20.0.0.tgz#2383bb96d07865006091a3e7c684eebfd0f8b959" + integrity sha512-oVqHsbZFbZzEkRoNR2dZKhUG5fHAQ+vWTRLJ6vrKY5+amsz3bRF3BCTqidbDa6TG+bZ5Y4P+FVv6SUNzxsTvLA== dependencies: - "@puppeteer/browsers" "0.5.0" + "@puppeteer/browsers" "1.0.0" cosmiconfig "8.1.3" https-proxy-agent "5.0.1" progress "2.0.3" proxy-from-env "1.1.0" - puppeteer-core "19.11.1" + puppeteer-core "20.0.0" pure-rand@^6.0.0: version "6.0.2"