Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Brotli-Compressed WEBGL Build Not Working on Firebase Hosting

83 views
Skip to first unread message

Stefano Valle

unread,
Sep 27, 2024, 1:04:48 PM9/27/24
to Firebase Google Group
Hi Everyone,
I'm having trouble serving a Brotli-compressed WEBGL Build on Firebase Hosting.

The build works fine on other hosting server providers, but on Firebase, the browser throws a "WebAssembly streaming compilation failed" error related to the Content-Encoding header of a .wasm.br file.

I've confirmed that the file is not corrupted, and when tested with curl on my terminal,  the correct headers (Content-Type: application/wasm and Content-Encoding: br) are being served. However, the browser still fails to load the file.

I've tried to deploy the build without Brotli compression and it perfectly works, I've disabled the browser cache and tested again, but the issue persists, and checked the logs in Google Cloud Logging, and all requests return 200 OK with the right headers.

All this even if the firebase.json is configured to serve the .wasm.br file with the correct Content-Type and Content-Encoding, but it seems something is going wrong specifically with how Firebase handles the Brotli compression.

Could you help me figure out why this is happening?

Thanks,
Stefano.
Immagine 2024-09-27 112934.png
Immagine 2024-09-27 105139.png
Immagine 2024-09-27 104401.png
Immagine 2024-09-27 105117.png
Reply all
Reply to author
Forward
0 new messages