import mpg123-decoder to compile, but emit error: AsyncCompile: Wasm decoding failed: unknown section code #0x8 @+74772
kaneruan opened this issue · 12 comments
android 9
and I read some issue, then set charset to 'utf-8', but also emit same error.
Could you try the demo page on your device and test if the issue is also present there?
thanks your reply,i will try tomorrow. now it too late.
Can you share what setting you used to fix the first error, so others may be helped if they also encounter this?
The second issue is interesting, and should be supported by all modern browsers. I'm not sure what browser you are using though, since the user agent string you posted doesn't look correct and has odd spellings.
When the WASM code is compiled, the module is posted to the decoder web worker, which is then instantiated and used for decoding. I also cache the compiled module so it never needs to be recompiled for better performance. Here's the MDN document describing the process of sending a compiled module to a worker.
It's possible that some browser doesn't support this. Which browser / environment are you using?
It seems to be caused by the code editor's formatting. This issue likely arose from how my VSCode formatted the WASM output. When I open and edit it with WebStorm, this error doesn't occur.
The Second issue
userAgent: 'Mozilla/5.0 (Linux; Android 9; PDBM00 Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/70.0.3538.110 Mobile Safari/537.36, Douyu_Android,aver/10760000'
android phone
oppo A8, android9, built-in webview
If you have to support this device and webview, you might try using the main thread decoder rather than the web worker. The web worker version won't work if the browser you're using doesn't support sending the compiled WASM module to the worker. This is a key function of the web worker decoders.
Can you try Firefox and Chrome on the same device and check if that works?
thanks your reply, we decide to let user upgrade them system by toast.