fix: disable DNS over HTTPS in Firefox settings#191
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
playwrightto exact version1.59.1inpackage.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
Playwright 1.60.0 can crash while serializing Firefox page errors when
pageError.locationis missing. Network environments using hosts/DNS overrides can also be bypassed by Firefox DoH/TRR, making AI Studio page errors more likely.