Local Android test runs fail with "FATAL ERROR: Non-local network connections are disabled" on a machine with a public IP address
Categories
(Testing :: General, defect, P5)
Tracking
(firefox109 affected)
Tracking | Status | |
---|---|---|
firefox109 | --- | affected |
People
(Reporter: botond, Unassigned)
Details
(Keywords: regression)
Steps to reproduce
- Do a local android device (arm) build of mozilla-central
- Attempt to run a test locally, for example
./mach geckoview-junit org.mozilla.geckoview.test.PanZoomControllerTest
Expected results
The test runs successfully.
Actual results
Test run fails with (I've redacted the IP address which is my computer's public IP address):
FATAL ERROR: Non-local network connections are disabled and a connection attempt to <redacted> (<redacted>) was made.
You should only access hostnames available via the test networking proxy (if running mochitests) or from a test-specific httpd.js server (if running xpcshell tests). Browser services should be disabled or redirected to a local server.
A more detailed message in adb logcat
suggests the problematic connection attempt is coming from services/settings/Utils.jsm (hence I'm filing the bug in the associated component):
11-25 21:54:23.886 15911 15932 F MOZ_CRASH: Hit MOZ_CRASH(Attempting to connect to non-local address! opener is [resource://services-settings/Utils.jsm:280:14], uri is [http://<redacted>:8888/dummy-kinto/v1/buckets/monitor/collections/changes/changeset?collection=anti-tracking-url-decoration&bucket=main&_expected=0]) at /home/botond/dev/projects/mozilla/refactoring/netwerk/protocol/http/nsHttpChannel.cpp:6943
This is a somewhat recent (last few weeks) regression, this used to work before. (However, it's not easy to find a regression window because the repro steps involve a local mach
environment.)
Comment hidden (typo) |
Reporter | ||
Comment 2•2 years ago
|
||
Android emulator (x86_64) builds are affected as well.
Comment 3•2 years ago
|
||
This bug has been marked as a regression. Setting status flag for Nightly to affected
.
Reporter | ||
Comment 4•2 years ago
|
||
The error seems to be related to the fact that I was trying to run the test on a machine with a public IP address (i.e. connected directly to a modem with no router in between to create a local network). The errors go away when run in a more conventional setup.
So, there's probably nothing wrong with the Remote Settings Client code, but rather this is a more general issue running our test suites on a machine with a public IP address.
Comment 5•2 years ago
|
||
Setting environment variable MOZ_DISABLE_NONLOCAL_CONNECTIONS = "0" should disable the check for non-local connections.
Comment 6•2 years ago
|
||
The severity field is not set for this bug.
:ahal, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Reporter | ||
Comment 7•2 years ago
|
||
I sorted out my network situation and so this issue is no longer affecting my ability to run Android tests locally.
While it would be nice if the test harness supported running tests without a local network, this setup is probably sufficiently uncommon that it's not worth spending time on this.
Description
•