Open Bug 2005328 Opened 14 days ago Updated 10 days ago

147.0b1 fails decoding dcb content-encoding from Google searches

Categories

(Core :: Networking: HTTP, defect)

Firefox 147
defect

Tracking

()

UNCONFIRMED

People

(Reporter: antti, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0

Steps to reproduce:

Using 147.0b1 Ubuntu Snap, I wanted to do some Google searches, or even navigate directly to https://www.google.com/search?q=foo - but this depends on the account I've used to logged in to Google

Actual results:

I get a "Content Encoding Error - The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."

However seems to be dependent on which account I am signed in to in Google (I've got several). Behaviour not displayed in all cases.

When the crash happens requests go out with
Accept-Encoding gzip, deflate, br, zstd, dcb, dcz; Available-Dictionary :0pXbvRhUtQZWK5qWdUXVG2ZJzP3y7cS7YIwS41UZF+8=: and the server responds with Content-Encoding: dcb. Whenever the search results do get displayed the server did respond with Content-Encoding: br

Expected results:

Google search should have worked (naturally).

I've not been able to reproduce in Chrome.

Component: Untriaged → Networking: HTTP
Product: Firefox → Core

I've verified that the content works - copied the request as curl; downloaded the content into a file, removed 36 heading bytes, fetched the referred-to shared dictionary from https://www.google.com/shared_dict/srp/d295dbbd1854b506562b9a967545d51b6649ccfdf2edc4bb608c12e3551917ef.dict and brotli -d -c -D dict payload then successfully decodes it to HTML, so it must be a bug in Firefox then.

The bytes I stripped from the payload were ff444342d295dbbd1854b506562b9a967545d51b6649ccfdf2edc4bb608c12e3551917ef before brotli decompression which matches the description from https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Compression_dictionary_transport

Unfortunately I am not able to verify that the response would not contain sensitive data so I cannot include it into the bug :/

I've updated Firefox Snap to rev 7507 (147.0b2-1) and the problem still persists.

Setting about:config network.http.accept-encoding.dictionary from dcb, dcz to "" seems to work around this symptom with Google but I see tofu garbage on other sites.

Same issue with 147.0b2 (aarch64) on macOS 15.7.2

Indeed, if I set network.http.accept-encoding.dictionary to empty string then chess.com breaks, it serves bare content-encoding: br and that results in garbage html. What worked so far as a workaround was to set that to foo instead :D

Hi, I'm also having this issue. Firefox 147.0b1 (20251208163038) x86_64-pc-mingw32 Win11 26100

I was able to workaround by setting the mentioned about:config property to a single space

Hi Randell, could you take a look?
Thanks.

Flags: needinfo?(rjesup)

Updated to 147.0b3. Still an issue. I am not sure if there is a dictionary copy locally in the cache that has been corrupted. If that's the case maybe the dictionary should be revalidated on content decoding error.

The problem still cannot be reproduced in incognito mode (google serves br, not zcb), need to be logged in to certain account when doing google search.

Name Firefox
Version 147.0b3
Build ID 20251213024254
Distribution ID canonical-002
User Agent Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0
OS Linux 6.14.0-36-generic #36~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Oct 15 15:45:17 UTC 2

When I clear the cache things start working but despite settin "network.http.accept-encoding.dictionary" to "dcb,dcz" and going through the motions it seems now Firefox is not sending dcb in accept-encoding, nor is it seeing the request to download the dictionary, so all bets are again off. The google search results get served as plain brotli.

You need to log in before you can comment on or make changes to this bug.