Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Replace localhost with ipv4 to avoid ipv6 issue #2339

Merged
merged 2 commits into from
Nov 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/extension-runners/chromium.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ export class ChromiumExtensionRunner {
// Start a websocket server on a free localhost TCP port.
this.wss = await new Promise((resolve) => {
const server = new WebSocket.Server(
{port: 0, host: 'localhost'},
// Use a ipv4 host so we don't need to escape ipv6 address
// https://github.com/mozilla/web-ext/issues/2331
{port: 0, host: '127.0.0.1'},
// Wait the server to be listening (so that the extension
// runner can successfully retrieve server address and port).
() => resolve(server));
Expand Down