Skip to content

fix: disable DNS over HTTPS in Firefox settings#191

Merged
bbbugg merged 2 commits into
mainfrom
codex/fix-doh-dns
May 30, 2026
Merged

fix: disable DNS over HTTPS in Firefox settings#191
bbbugg merged 2 commits into
mainfrom
codex/fix-doh-dns

Conversation

@bbbugg
Copy link
Copy Markdown
Member

@bbbugg bbbugg commented May 29, 2026

Summary

  • pins Playwright to 1.59.1 to avoid the Firefox page error crash seen in Playwright 1.60.0
  • disables Firefox/Camoufox DoH/TRR so browser DNS resolution respects system DNS and hosts rules
  • applies the DoH/TRR prefs to the main browser, VNC temporary browser, and auth-saving browser flow

Root cause

Playwright 1.60.0 can crash while serializing Firefox page errors when pageError.location is missing. Network environments using hosts/DNS overrides can also be bypassed by Firefox DoH/TRR, making AI Studio page errors more likely.

@bbbugg bbbugg marked this pull request as ready for review May 30, 2026 04:40
@bbbugg bbbugg requested a review from Copilot May 30, 2026 04:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Disables Firefox/Camoufox DNS-over-HTTPS (TRR) across all browser launch paths so that system DNS and /etc/hosts overrides are respected, and pins Playwright to 1.59.1 to avoid a Firefox pageError.location crash introduced in 1.60.0. Together these changes address #186, where users relying on hosts-file routing were hitting an unhandled TypeError in FFBrowserContext.

Changes:

  • Add FIREFOX_DOH_DISABLED_PREFS (network.trr.mode=5, network.trr.uri="") and apply it to the main browser, VNC browser, and auth-saving browser launches.
  • Pin playwright to exact version 1.59.1 in package.json.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/core/BrowserManager.js Defines DoH-disable prefs and applies them to both the main firefoxUserPrefs object and the temporary VNC browser launch.
scripts/auth/saveAuth.js Duplicates the DoH-disable prefs constant and passes it to the standalone auth-saving Firefox launch.
package.json Pins Playwright dependency to exact version 1.59.1 (was ^1.53.1) to avoid the 1.60.0 Firefox crash.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bbbugg bbbugg merged commit 215ac05 into main May 30, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown

🎉 此 PR 的修改已在版本 v1.3.0 中发布。
🎉 The changes in this PR have been released in version v1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feedback]: Disable DNS over HTTPS (DoH) in Firefox/Camoufox preferences to respect local /etc/hosts and prevent crashes

2 participants