Repository navigation
[miniflare] Use Chrome 152 in local Browser Run sessions - #16954
Conversation
🦋 Changeset detectedLatest commit: af206e2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
be4ea4b to
ef02532
Compare
a9ef5bb to
ba7ca7a
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers |
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Match the Chrome version that Browser Run uses in production, and update @cloudflare/puppeteer to 2.0.1 and @cloudflare/playwright to 1.4.0. puppeteer-core 25, which @cloudflare/puppeteer 2.x is based on, wraps a waitForSelector timeout in a new error and keeps the original as its cause. Include the causes' messages when classifying quick action errors, so the timeout still maps to code 6002.
Chrome 152 keeps its NSS database in $XDG_DATA_HOME/pki/nssdb instead of ~/.pki/nssdb, so check that path and point XDG_DATA_HOME at the test's home. @cloudflare/puppeteer 2.x deprecates the string form of page.setUserAgent, so pass an options object. It also deprecates page.setCookie, but the suggested BrowserContext.setCookie requires a domain and has no url field, which Browser Run's cookies option accepts, so keep the page-level call.
On slower machines, Chrome 152 answers DevTools HTTP requests before it opens its initial about:blank page, so /json/list could be empty straight after acquiring a session. Probe /json/list instead of /json/version and wait until it includes a page target. Chrome 152 also lists its own browser UI and extension service worker targets, in no fixed order. The tests now pick the page target instead of the first one, and compare only page targets across the target list endpoints.
Puppeteer deprecated the page-level `setCookie`. `BrowserContext.setCookie` needs a `domain`, but the API also accepts a cookie with only a `url`, so take the domain from the URL, and make the cookie secure for an `https` URL, as Chrome does when it gets the URL itself.
The comment on BROWSER_VERSION still said the version follows the upstream puppeteer that @cloudflare/puppeteer branched off. It now follows the Chrome version that Browser Run uses in production. Also fix the grammar in the changeset title.
ba7ca7a to
af206e2
Compare
There was a problem hiding this comment.
💬 Approved with comments — The version bump comes with matching compatibility fixes and tests. The only open item is an optional SUGGESTION about cookie scope for URL-only cookies.
Findings: 1 suggestion (1 is an inline comment on the diff)
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
📋 Code Quality: 💬 1 suggestion
The compatibility fixes look correct. One optional note about URL-only cookies is still open.
Recommendation: 💬 Optional Nits
- [SUGGESTION] A URL-only cookie may lose its URL-derived path, and may stop being host-only, now that
context.setCookieis used (author says the behaviour is unchanged; untested for URLs with a path) (packages/miniflare/src/plugins/browser-rendering/quick-actions/page.ts:81)
View full review
packages/miniflare/src/plugins/browser-rendering/quick-actions/page.ts:81-86:toCookieDatatakes the hostname fromurlbut does not take its path. It also always sets an explicitdomain, which can make a host-only cookie into a domain cookie. The author says this behaves the same as before. The new test only uses an origin URL, though, so it does not cover a URL with a path. This is optional.
The cause chaining for waitForSelector in afterNavigation matches the new "frame got detached" mapping in errors.ts. The /json/list readiness probe matches the updated launcher stub in the tests.
✅ All other checks passed
🚀 Release: ✅ LGTM
The changeset is a patch for Miniflare and describes the move to Chrome 152 in local Browser Run sessions. The browser tests were updated to match.
🔒 Security: ✅ LGTM
No security concerns in the version bumps or the related code changes.
📖 AGENTS.md: ✅ LGTM
No AGENTS.md updates are needed.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The BROWSER_VERSION comment and the changeset match the change.
Reviewed commit: af206e20
## pnpm-workspace.yaml (default) ## Dependency Updates | Package | From | To | Type | | --- | --- | --- | --- | | `@cloudflare/vitest-plugin` | 1.8.4 | 1.8.5 | patch | | `@cloudflare/workers-types` | 5.20261118.1 | 5.20261119.1 | minor | | `miniflare` | 5.20261117.0-beta | 5.20261118.0-beta | minor | | `wrangler` | 4.164.0 | 4.165.0 | minor | ## Release Notes <details> <summary><b>@<!---->cloudflare/vitest-plugin</b> (1.8.4 → 1.8.5)</summary> ### Patch Changes - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-18 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#16949](cloudflare/workers-sdk#16949) [`110c162`](cloudflare/workers-sdk@110c162) Thanks [@<!---->edmundhung](https://github.com/edmundhung)! - Fail remote RPC binding requests on network errors instead of hanging Remote bindings that connect over RPC treated every network failure, such as being offline, a DNS or TLS error, as a preview reload. The request then waited silently for a reload that never came. These requests now fail with the error, while GET and HEAD requests interrupted by an actual reload are still retried. - [#14578](cloudflare/workers-sdk#14578) [`6750663`](cloudflare/workers-sdk@6750663) Thanks [@<!---->penalosa](https://github.com/penalosa)! - Fix `Dynamic require` errors when importing packages from ES modules Importing these packages in a Node.js ES module could fail with `Dynamic require of "..." is not supported` when a dependency loaded a Node.js built-in. These imports now work without requiring a CommonJS wrapper. - Updated dependencies [[`24bd3c3`](cloudflare/workers-sdk@24bd3c3), [`0a4315f`](cloudflare/workers-sdk@0a4315f), [`8f26e90`](cloudflare/workers-sdk@8f26e90), [`3595295`](cloudflare/workers-sdk@3595295), [`3595295 …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/%40cloudflare/vitest-plugin%401.8.5) </details> <details> <summary><b>miniflare</b> (5.20261117.0-beta → 5.20261118.0-beta)</summary> ### Patch Changes - [#16954](cloudflare/workers-sdk#16954) [`0a4315f`](cloudflare/workers-sdk@0a4315f) Thanks [@<!---->mkuritsu](https://github.com/mkuritsu)! - Local Browser Run sessions now use Chrome 152 Local Browser Run bindings now run Chrome 152.0.7977.64, the same version that Browser Run uses in production. Miniflare will download Chrome 152 the first time you start a local Browser Run session after you upgrade. - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-18 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" The following dependency versions have been updated: | Dependency | From | To | | ------------------------- | ------------- | ------------- | | @<!---->cloudflare/workers-types | ^5.20261117.1 | ^5.20261118.1 | | workerd | 1.20261117.1 | 1.20261118.1 | - [#14578](cloudflare/workers-sdk#14578) [`6750663`](cloudflare/workers-sdk@6750663) Thanks [@<!---->penalosa](https://github.com/penalosa)! - Fix startup failures in Miniflare and C3 when loading ESM dependencies Miniflare and `create-cloudflare` can now load dependencies that use Node.js's `createRequire()` without failing on an invalid file URL. This prevents these dependencies from causing an error before …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/miniflare%405.20261118.0-beta) </details> <details> <summary><b>wrangler</b> (4.164.0 → 4.165.0)</summary> ### Minor Changes - [#10598](cloudflare/workers-sdk#10598) [`24bd3c3`](cloudflare/workers-sdk@24bd3c3) Thanks [@<!---->Ehbraheem](https://github.com/Ehbraheem)! - Add a new `--force` flag to `d1 migrations apply` which skips the interactive confirmation and applies any pending migrations non-interactively. This is useful for CI and automation. Usage example: ``` wrangler d1 migrations apply <db> --remote --force ``` Fixes #5017 ### Patch Changes - [#16019](cloudflare/workers-sdk#16019) [`8f26e90`](cloudflare/workers-sdk@8f26e90) Thanks [@<!---->penalosa](https://github.com/penalosa)! - Correct the dry-run setup message to say "exiting now" instead of "existing now". The previous wording contained a typo and appeared in Wrangler setup output and other consumers of shared autoconfig. - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update `DEFAULT_COMPAT_DATE` to 2026-11-18 Use the bundled workerd release's compatibility date by default when scaffolding new projects or when no compatibility date is configured. - [#17003](cloudflare/workers-sdk#17003) [`3595295`](cloudflare/workers-sdk@3595295) Thanks [@<!---->dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" The following dependency versions have been updated: | Dependency | From | To | | ------------------------- | ------------- | ------------- | | @<!---->cloudflare/workers-types | ^5.20261117.1 | ^5.20261118.1 | | workerd | 1.20261117.1 | 1.20261118.1 | - [#16719](https://github.com/cl …[full notes](https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.165.0) </details> --- *This PR was auto-generated by [catalog-update-action](https://github.com/brandhaug/catalog-update-action).* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Small PR to bump chrome version of local browser run session to use 152 (the same used in production)
Additionally it also bumps cloudflare/puppeteer, cloudflare/playwright and mdream packages used by browser run to their newly released versions