Issue: net::ERR_CONTENT_DECODING_FAILED
Issue: net::ERR_CONTENT_DECODING_FAILED 200 (OK) started yesterday
Observation: This error occurs randomly and only for cached content (Cf-Cache-Status: HIT). The response headers show Content-Encoding: gzip.
Cause: The issue seems related to R2 storage, as it can be reproduced directly on R2.
Examples:
• Error: https://pub-f0eceff175764d6daad6785b769f727b.r2.dev/stars_zoWSu63q603uN2jJgPjzJ.svg
• No Error: https://pub-f0eceff175764d6daad6785b769f727b.r2.dev/WS-logo-white_YEQ0Xbj7_5v5mHD2F_nt4.svg
Metadata Difference:
Using aws s3api head-object --bucket assets-production --key {objectKey}:
Problematic Metadata:
Files without issues only have filename in the metadata.
2 Replies
Using following
Seems like solves the issue
BUUUT we have enormous amount of such files, we are saas service and solution above is hard for us to do fast
Not sure 100% but seems like changing workers compatibility date
"2023-05-01" => "2024-05-16" solved the proxying of such files.
So worker with code
now has no issues
At least I can't reproduce for a long time. (before this error after worker was also random enough so hard to say does compatibility flag solved anything)
Probably this flag https://developers.cloudflare.com/workers/platform/changelog/#2024-04-03 brotli_content_encoding is now default