Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(docker): update the amd64 Chrome for Testing browser to 153.0.8010.36
Yudhi Armyndharis28c41b84a100
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 039dae648..1e8c41603 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0### Security- The group invite-code read, over REST or the MCP `GroupGetInviteCode` tool, requires the OPERATOR role; the code is a transferable join capability, so a VIEWER key can no longer extract it ([GHSA-45fh-xj7x-vj2x](https://github.com/rmyndharis/OpenWA/security/advisories/GHSA-45fh-xj7x-vj2x)). Thanks Matija Petronijević for the report.+- The amd64 image ships Chrome for Testing 153.0.8010.36 instead of 146.0.7680.31, picking up the browser security fixes released since (the arm64 image uses the Debian chromium package).### Addeddiff --git a/Dockerfile b/Dockerfileindex 777bfc600..55d0fe967 100644--- a/Dockerfile+++ b/Dockerfile@@ -224,11 +224,21 @@ RUN npm install -g [email protected] && npm cache clean --force# amd64: download Chrome for Testing via Puppeteer and symlink it.# arm64: use Debian's chromium installed above (CfT has no linux-arm64 build).# test -n guards against a future path mismatch failing loudly instead of shipping a broken image.+#+# The CfT version is pinned so a rebuild installs the same browser. Nothing bumps it for us:+# dependabot does not read this line, and the image scans cannot see the binary (no dpkg package owns+# /opt/puppeteer), so a stale browser never fails a scan. To bump it, take the Stable version from+# https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json, confirm it has+# a linux64 chrome download in known-good-versions-with-downloads.json, and update the docs that+# repeat this command (scripts/dockerfile-patchers.spec.js fails until they match). It may be newer+# than the revision puppeteer-core pins; the arm64 image already runs whatever chromium Debian ships.+# On an amd64 build, check that a session paired under the old browser still reconnects and that a+# new whatsapp-web.js session reaches its QR code.RUN if [ "$TARGETARCH" = arm64 ]; then \ln -s /usr/bin/chromium /usr/local/bin/puppeteer-chrome; \else \mkdir -p /opt/puppeteer && \- PUPPETEER_CACHE_DIR=/opt/puppeteer ./node_modules/.bin/puppeteer browsers install '[email protected]' && \+ PUPPETEER_CACHE_DIR=/opt/puppeteer ./node_modules/.bin/puppeteer browsers install '[email protected]' && \chown -R openwa:openwa /opt/puppeteer && \chrome_path=$(find /opt/puppeteer/chrome/linux*/chrome-linux64/chrome | head -n 1) && \test -n "$chrome_path" && \diff --git a/docs/10-devops-infrastructure.md b/docs/10-devops-infrastructure.mdindex 904739b09..ca6b11016 100644--- a/docs/10-devops-infrastructure.md+++ b/docs/10-devops-infrastructure.md@@ -93,7 +93,7 @@ RUN npm ci --only=production# /usr/bin/chromium — see the repo's Dockerfile for the mixed multi-arch build.# Download Chrome for Testing via Puppeteer and point ENV to itRUN mkdir -p /opt/puppeteer && \- PUPPETEER_CACHE_DIR=/opt/puppeteer ./node_modules/.bin/puppeteer browsers install '[email protected]' && \+ PUPPETEER_CACHE_DIR=/opt/puppeteer ./node_modules/.bin/puppeteer browsers install '[email protected]' && \chrome_path=$(find /opt/puppeteer/chrome/linux*/chrome-linux64/chrome | head -n 1) && \test -n "$chrome_path" && \ln -s "$chrome_path" /usr/local/bin/puppeteer-chromediff --git a/docs/12-troubleshooting-faq.md b/docs/12-troubleshooting-faq.mdindex ec7c9c28a..9a275f3dc 100644--- a/docs/12-troubleshooting-faq.md+++ b/docs/12-troubleshooting-faq.md@@ -419,7 +419,7 @@ custom container that drops the `XDG_CONFIG_HOME` / `XDG_CACHE_HOME` setup or th**Cause D — Debian 12 OS Chromium SIGTRAP in non-root Pods.**If `Code: null` happens on Kubernetes, and the host kernel logs or `dmesg` shows `Trace/breakpoint trap (core dumped)` with exit code 133, the underlying Debian 12 OS `chromium` package has crashed due to strict non-root or seccomp constraints (even with `--no-zygote` or `Unconfined` seccomp).-_Fix:_ On amd64, do not use the `chromium` package from Debian's `apt` — it SIGTRAPs under strict non-root/seccomp. Instead, download Chrome for Testing via Puppeteer during the Docker build (`./node_modules/.bin/puppeteer browsers install '[email protected]'`) and point `PUPPETEER_EXECUTABLE_PATH` to it. (Chrome for Testing has no linux-arm64 build, so arm64 keeps Debian's `chromium`, which ships a native arm64 binary.) The official `Dockerfile` implements this mixed approach.+_Fix:_ On amd64, do not use the `chromium` package from Debian's `apt` — it SIGTRAPs under strict non-root/seccomp. Instead, download Chrome for Testing via Puppeteer during the Docker build (`./node_modules/.bin/puppeteer browsers install '[email protected]'`) and point `PUPPETEER_EXECUTABLE_PATH` to it. (Chrome for Testing has no linux-arm64 build, so arm64 keeps Debian's `chromium`, which ships a native arm64 binary.) The official `Dockerfile` implements this mixed approach.**Quick triage:** run `docker stats openwa-api`, click **Start**, and watch which resource spikes toward itslimit the instant before the failure — that tells you A vs B. If neither moves and you see the crashpaddiff --git a/scripts/dockerfile-patchers.spec.js b/scripts/dockerfile-patchers.spec.jsindex 29d0dc0f2..6ad18f04c 100644--- a/scripts/dockerfile-patchers.spec.js+++ b/scripts/dockerfile-patchers.spec.js@@ -55,3 +55,18 @@ test('every patcher is also wired into postinstall', () => {const missing = patchers.filter(p => !planned.includes(p));assert.deepEqual(missing, [], `not wired into postinstall: ${missing.join(', ')}`);});++test('docs install the same Chrome for Testing build as the image', () => {+ // The amd64 pin is bumped by hand, and the docs repeat the install command. A bump that misses+ // them leaves a copy-paste recipe for an older, unpatched browser.+ const pin = /browsers install 'chrome@([\d.]+)'/g;+ const images = [...dockerfile.matchAll(pin)].map(m => m[1]);+ assert.equal(images.length, 1, 'expected exactly one chrome@<version> install in the Dockerfile');+ const docs = fs+ .readdirSync(path.join(ROOT, 'docs'), { recursive: true })+ .filter(f => f.endsWith('.md'))+ .flatMap(f => [...fs.readFileSync(path.join(ROOT, 'docs', f), 'utf8').matchAll(pin)].map(m => `${f}: ${m[1]}`));+ assert.ok(docs.length > 0, 'no doc shows the install command; drop this test if that is intended');+ const stale = docs.filter(d => !d.endsWith(`: ${images[0]}`));+ assert.deepEqual(stale, [], `docs pin a different Chrome than the Dockerfile (${images[0]})`);+});