Open brave-builds opened 1 month ago
BraveNetworkAuditTest.BasicTests
failed on macos x64 beta v1.69.132.
I tried running the test on my Mac, and got timeout. After adjusting const int kMaxTimeoutPerLoadedURL = 30
, it succeeded. Let me try adjusting the seconds
My bad, I should have used npm run network-audit
instead of npm run test -- brave_network_audit_tests
[88891:259:0803/120521.801450:WARNING:brave_network_audit_browsertest.cc(171)] NETWORK AUDIT WARNING:http://127.0.0.1:60673/favicon.ico
[88891:259:0803/120521.804476:ERROR:brave_network_audit_browsertest.cc(175)] NETWORK AUDIT FAIL:https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$req=ChYKCGNocm9taXVtEgoxMjcuMS43MC4wGgwIBRAEIgQgASACKAEaDAgBEAQiBCABIAIoARoMCAMQBCIEIAEgAigBGgwIBxAEIgQgASACKAEaDAgBEAgiBCABIAIoBBoMCA8QBCIEIAEgAigBGgwICRAEIgQgASACKAEiAggB&$ct=application/x-protobuf&key=dummytoken
[88891:259:0803/120521.804665:ERROR:brave_network_audit_browsertest.cc(175)] NETWORK AUDIT FAIL:https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$req=ChYKCGNocm9taXVtEgoxMjcuMS43MC4wGgwIBRAEIgQgASACKAEaDAgBEAQiBCABIAIoARoMCAMQBCIEIAEgAigBGgwIBxAEIgQgASACKAEaDAgBEAgiBCABIAIoBBoMCA8QBCIEIAEgAigBGgwICRAEIgQgASACKAEiAggB&$ct=application/x-protobuf&key=dummytoken
[88891:259:0803/120521.804846:ERROR:brave_network_audit_browsertest.cc(175)] NETWORK AUDIT FAIL:https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$req=ChYKCGNocm9taXVtEgoxMjcuMS43MC4wGgwIBRAEIgQgASACKAEaDAgBEAQiBCABIAIoARoMCAMQBCIEIAEgAigBGgwIBxAEIgQgASACKAEaDAgBEAgiBCABIAIoBBoMCA8QBCIEIAEgAigBGgwICRAEIgQgASACKAEiAggB&$ct=application/x-protobuf&key=dummytoken
../../brave/browser/net/brave_network_audit_browsertest.cc:280: Failure
Value of: PerformNetworkAuditProcess(events)
Actual: false
Expected: true
network-audit FAILED. Import /Users/sangwoo/brave-browser/src/network_log.json in chrome://net-internals for more details.
Stack trace:
0 brave_network_audit_tests 0x0000000102afde2c brave::(anonymous namespace)::BraveNetworkAuditTest::TearDownInProcessBrowserTestFixture() + 1468
1 brave_network_audit_tests 0x0000000104d4fe28 content::BrowserTestBase::SetUp() + 2004
2 brave_network_audit_tests 0x0000000104d4c204 InProcessBrowserTest::SetUp() + 380
[88891:259:0803/120521.823613:INFO:brave_network_audit_browsertest.cc(191)] Network audit results stored in /Users/sangwoo/brave-browser/src/network_audit_results.json
[ FAILED ] BraveNetworkAuditTest.BasicTests, where TypeParam = and GetParam() = (273875 ms)
It seems we were trying to block safebrowsing.googleapis.com/
but not sure why/where it was requested. Can we get a help from who knows safe browsing well?
@fmarier
@bridiver was investigating these failures last month and wasn't sure whether or not it was a browser problem: https://bravesoftware.slack.com/archives/C7VLGSR55/p1719517463492349?thread_ts=1719477643.270759&cid=C7VLGSR55
BraveNetworkAuditTest.BasicTests
failed on macos x64 nightly v1.70.55.
I tried to reproduce locally on Linux using mitmproxy and I only saw requests to safebrowsing.brave.com
(as expected).
I also ran the network auditor locally using:
npm run network-audit -- --enable-pixel-output-in-tests
and it was successful.
Maybe it's a macOS-only problem?
These requests are for the Safe Browsing lists. They take place within 5 minutes of startup.
@sangwoo108 Were you able to reproduce locally?
Yes, the callstack above was from my m1 macbook
@sangwoo108 Hm, okay, I guess there might be something Safe Browsing-related that's only enabled on Mac and not on Windows or Linux. Strange, but possible.
Does it happen both on arm64 and x86_64 builds on Mac?
Got the same error on my intel mac
[1401:259:0808/162039.115320:ERROR:brave_network_audit_browsertest.cc(175)] NETWORK AUDIT FAIL:https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$req=ChYKCGNocm9taXVtEgoxMjguMS43MC4wGgwIBRAEIgQgASACKAEaDAgHEAQiBCABIAIoARoMCAEQCCIEIAEgAigEGgwIARAEIgQgASACKAEaDAgPEAQiBCABIAIoARoMCAMQBCIEIAEgAigBGgwICRAEIgQgASACKAEiAggB&$ct=application/x-protobuf&key=dummytoken
[1401:259:0808/162039.115846:ERROR:brave_network_audit_browsertest.cc(175)] NETWORK AUDIT FAIL:https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$req=ChYKCGNocm9taXVtEgoxMjguMS43MC4wGgwIBRAEIgQgASACKAEaDAgHEAQiBCABIAIoARoMCAEQCCIEIAEgAigEGgwIARAEIgQgASACKAEaDAgPEAQiBCABIAIoARoMCAMQBCIEIAEgAigBGgwICRAEIgQgASACKAEiAggB&$ct=application/x-protobuf&key=dummytoken
[1401:259:0808/162039.116391:ERROR:brave_network_audit_browsertest.cc(175)] NETWORK AUDIT FAIL:https://safebrowsing.googleapis.com/v4/threatListUpdates:fetch?$req=ChYKCGNocm9taXVtEgoxMjguMS43MC4wGgwIBRAEIgQgASACKAEaDAgHEAQiBCABIAIoARoMCAEQCCIEIAEgAigEGgwIARAEIgQgASACKAEaDAgPEAQiBCABIAIoARoMCAMQBCIEIAEgAigBGgwICRAEIgQgASACKAEiAggB&$ct=application/x-protobuf&key=dummytoken
I don't see anything Mac-specific in the code. That endpoint is defined here and then used here.
We override it here in Brave (prefix defined here), but for some reason on Mac that network delegate isn't redirecting this.
cc @goodov who might have some ideas for why the network delegate (or the network audit script) is not working on Mac.
Setting to P2 until we know whether it's the test or the static redirects which are broken.
BraveNetworkAuditTest.BasicTests
failed on macos x64 release v1.69.168.
Greetings human!
Bad news.
BraveNetworkAuditTest.BasicTests
failed on macos x64 beta v1.69.131.Stack trace
``` [ RUN ] BraveNetworkAuditTest.BasicTests [ FAILED ] BraveNetworkAuditTest.BasicTests ```Previous issues
* #39415 * #38812 * #38418 * #37557 * #35021 * #34795 * #34277 * #34351 * #34294 * #33737 * #31796 * #31766 * #28812 * #28150 [Find all](https://github.com/brave/brave-browser/issues?q=type%3Aissue+label%3Abot%2Ftype%2Ftest+in%3Atitle+%22Test+failure%3A+BraveNetworkAuditTest.BasicTests%22)