Webassembly.CompileError

Hi,

we have installed an ONLYOFFICE-Documentserver 9.2.1 on Debian 11/Bullseye (deb). It runs behind an Nginx-Reverseproxy, which is configured according document-server-proxy/nginx/proxy-to-virtual-path.conf at master · ONLYOFFICE/document-server-proxy · GitHub.

When we open https:////example the Firefox developer console displays the following error messages:


wasm streaming compile failed: CompileError: wasm validation error: at offset 3572998: invalid data initializer-kind field fonts.js:15:451
instantiateAsync https://…/officedocs/9.2.1-53e4380a69d14734b32aa9a7e6d87f86/sdkjs/common/libfont/engine/fonts.js:15 (Async: promise callback)
instantiateAsync https://…/officedocs/9.2.1-53e4380a69d14734b32aa9a7e6d87f86/sdkjs/common/libfont/engine/fonts.js:15 (Async: promise callback)
instantiateAsync https://…/officedocs/9.2.1-53e4380a69d14734b32aa9a7e6d87f86/sdkjs/common/libfont/engine/fonts.js:15
createWasm https://…/officedocs/9.2.1-53e4380a69d14734b32aa9a7e6d87f86/sdkjs/common/libfont/engine/fonts.js:17
https://…/officedocs/9.2.1-53e4380a69d14734b32aa9a7e6d87f86/sdkjs/common/libfont/engine/fonts.js:82
https://…/officedocs/9.2.1-53e4380a69d14734b32aa9a7e6d87f86/sdkjs/common/libfont/engine/fonts.js:122

falling back to ArrayBuffer instantiation fonts.js:15:497

failed to asynchronously prepare wasm: CompileError: wasm validation error: at offset 3572998: invalid data initializer-kind field fonts.js:15:21

Aborted(CompileError: wasm validation error: at offset 3572998: invalid data initializer-kind field) fonts.js:13:29

Uncaught (in promise) RuntimeError: Aborted(CompileError: wasm validation error: at offset 3572998: invalid data initializer-kind field). Build with -sASSERTIONS for more info.

Try to create a document on exampleserver (just new.docx) the editor starts, but the document cannot be opened or modified.

When we bypass the proxy, it works.

I suspect, that the problem for the browser is in fonts.wasm. Do we need any special configuration in Nginx for transfering it through the proxy?

Thank you for any information

Ok, the problem is fixed.

After replace the following subs_filter-rule:

subs_filter ‘(href|src)="(?!http)(?=/)’ ‘$1="/’ gri;

through:

subs_filter ‘/web-apps/apps/api/documents/preload.html’ ‘//web-apps/apps/api/documents/preload.html’;
subs_filter ‘/web-apps/apps/api/documents/api.js’ ‘//web-apps/apps/api/documents/api.js’;

, everything works fine.

Thanks.