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

RESOLVED FIXED in Firefox 68


3 months ago
2 months ago


(Reporter: robwu, Assigned: robwu)


Version 3

Firefox Tracking Flags

(firefox68 fixed)



(1 attachment)

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 "Python.app"
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 https://searchfox.org/mozilla-central/source/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py#148 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 rob@robwu.nl:
Let wpt test servers listen at localhost r=jgraham
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/16705 for changes under testing/web-platform/tests
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.