Closed Bug 1636689 Opened 4 years ago Closed 4 years ago

[puppeteer] Set pref to prevent favicon requests

Categories

(Remote Protocol :: Agent, task, P3)

task

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: impossibus, Unassigned)

References

Details

We see a lot of requests and errors relating to favicon.ico not being found.

◀ RECV {"sessionId":1,"method":"Network.requestWillBeSent","params":{"frameId":"18","documentURL":"http://localhost:8907/favicon.ico","request":{"url":"http://localhost:8907/favicon.ico","method":"GET","headers":{"host":"localhost:8907","user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0","accept":"image/webp,*/*","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate","connection":"keep-alive"},"hasPostData":false,"isLinkPreload":false},"requestId":"15350213115907","type":"Img"}}
<snip>
◀ RECV {"sessionId":1,"method":"Log.entryAdded","params":{"entry":{"source":"javascript","level":"error","text":"[Exception... \"Favicon at \"http://localhost:8907/favicon.ico\" failed to load: Not Found.\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: resource:///modules/FaviconLoader.jsm :: onStopRequest :: line 227\"  data: no]","timestamp":1589032965858,"url":"","lineNumber":0,"stackTrace":{}}}}

Looking at LinkHandler, these requests can be controlled by some prefs.

In the Puppeteer case, some tests in network.spec.js are flaky because of the extra favicon requests.

I wonder what is more appropriate: modify the tests to consider favicon requests or set the associated prefs to false by default for automation clients like Puppeteer?

Priority: -- → P3

Some Puppeteer unit tests already filter out favicon-related requests, so there's prior art there. In Gutenberg, we'd have to also allow associated console messages about missing favicons.

I'll just update the tests as part of Bug 1599260

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.