Closed Bug 1546481 Opened 1 year ago Closed 1 year ago

"Do you want the application “” to accept incoming network connections?" on macOS, web-platform-test edition


(Testing :: web-platform-tests, defect)

Version 3
Not set


(firefox68 fixed)

Tracking Status
firefox68 --- fixed


(Reporter: robwu, Assigned: robwu)




(1 file)

Same issue as bug 1540078, but now when running web-platform-tests.

Test case: mach test testing/web-platform/tests/domparsing

When the host is omitted, a new socket will listen at any address,
which triggers the following firewall warning:

Do you want the application ""
to accept incoming network connections?

Since the default behavior without approval is to deny,
it should be safe to limit this to local connections only.

Doing so gets rid of the FIVE firewall prompts that appear when a wpt
test is started, for each server (http, https, http2, ws, wss).

While I'm at it, I've also fixed the port detection logic to not trigger
the firewall prompt (it appears at mach wpt-serve).

Duplicate of this bug: 1127934

James, could you take a look at the review request? Thanks!

Flags: needinfo?(james)

Right, sorry, this got lost :/ Thanks for the patch; I'll look at it today. I have a feeling it may conflict with some other logic and so there might be a better/simpler approach, but I need to dive into the code to be sure.

Does removing the line at work (so that bind_address is set to True)? I think we previously disabled that because it was coupled to a check that the hosts were actually resolvable (which they need not be when running with Firefox), but on my machine it seems to work and I think that's the correct solution to this (the patch seems to be much like setting bind_address to always be True). Unfortunatley I don't have a mac to test.

The port detection part may need a different fix, however.

Flags: needinfo?(james) → needinfo?(rob)

Yes, it did work. The end result is the same: The server will bind to instead of any address.

I have updated the patch, so it now only has two changes: the one you suggested and the port detection one.

Flags: needinfo?(rob)
Pushed by
Let wpt test servers listen at localhost r=jgraham
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68