Skip to content

Web servers often serve WASM with incorrect MIME type; better docs/errors needed #400

@Toad06

Description

@Toad06

Hello,

I get an error when using a Web build on my site. Here is what is logged in the console in Firefox (Windows):

Loading SWF file images/file.swf
TypeError: Response has unsupported MIME type
Got SWF data
TypeError: Response has unsupported MIME type
Serious error loading Ruffle: TypeError: Response has unsupported MIME type
Serious error occured loading SWF file: TypeError: Response has unsupported MIME type

Chrome (Windows) is a bit more explicit:

TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.

It turns out the server interpreted the .wasm file as being of type "octet-stream". However, testing the build locally with WampServer has not solved the issue, despite the correct mime type being returned.

There is no issue on iPad (iPadOS 13 - Safari and Chrome), Ruffle runs as expected.

Thanks.


UPDATE:

Actually Apache needed an extra line in the .htaccess (even in the local server):

AddType application/wasm wasm

... and clearing browser's cache after this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-webArea: Web & Extensionsdocs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions