Closed slicertech closed 8 months ago
@slicertech where are you loading the wasm files from? (vsl_impl.wasm
, dapm_impl.wasm
, dvdnr.wasm
, dvwc_impl.wasm
)
This error comes from the web browser preventing the Wed Assembly libraries from being loaded if they were not loaded from a secure / trusted place. In your case, the MIME type of the files that are downloaded must be application/wasm
. This seems like an update you can make on the backend that serves the files.
Hi @FabienLavocat ,
Thanks for the reply.
If I grep for WASM
in our code base, I find the file here:
*/node_modules/@voxeet/voxeet-web-sdk/dist/vsl_impl.wasm
We serve our react application via AWS S3 and Cloudfront. I found this guide: https://arne.xyz/2020/08/21/aws-s3-cloudfront-unity3d-webgl/ So I am trying to find where the *.wasm files are hosted.
You need to copy all the files from the dist
folder in your application directory.
If you're using WebPack, here's an example: https://github.com/dolbyio-samples/dolbyio-web-file-presentation-service/blob/main/webpack.config.js#L32C1-L40C12
Thanks, @FabienLavocat, I will try this and get back to you. We are just waiting for a chance to test our changes.
I'm going to close this issue for now, if you still have questions, don't hesitate to reach out.
Hi @FabienLavocat ,
Apologies, I just got to test my code. I am still getting the issue. I copied this: https://github.com/dolbyio-samples/dolbyio-web-file-presentation-service/blob/main/webpack.config.js#L32C1-L40C12
new CopyWebpackPlugin({ patterns: [ { from: './node_modules/@voxeet/voxeet-web-sdk/dist/dvwc_impl.wasm', noErrorOnMissing: true, }, { from: './node_modules/@voxeet/voxeet-web-sdk/dist/voxeet-dvwc-worker.js', noErrorOnMissing: true, }, { from: './node_modules/@voxeet/voxeet-web-sdk/dist/voxeet-worklet.js', noErrorOnMissing: true, }, { from: './node_modules/@voxeet/voxeet-web-sdk/dist/vsl_impl.bin', noErrorOnMissing: true, }, { from: './node_modules/@voxeet/voxeet-web-sdk/dist/vsl_impl.wasm', noErrorOnMissing: true, }, ], }),
Still the same issue.
In our build file:
rw-r--r--@ 1 jg staff 5442 12 Dec 13:11 asset-manifest.json drwxr-xr-x@ 11 jg staff 352 12 Dec 13:10 customers -rw-r--r--@ 1 jg staff 2997945 12 Dec 13:11 dvwc_impl.wasm -rw-r--r--@ 1 jg staff 1047 12 Dec 13:10 favicon.ico -rw-r--r--@ 1 jg staff 54915 12 Dec 13:10 gamecastsdk-0.1.0.min.js -rw-r--r--@ 1 jg staff 2118 12 Dec 13:11 index.html -rw-r--r--@ 1 jg staff 34769 12 Dec 13:10 logo192.png -rw-r--r--@ 1 jg staff 121199 12 Dec 13:10 logo512.png -rw-r--r--@ 1 jg staff 504 12 Dec 13:10 manifest.json -rw-r--r--@ 1 jg staff 67 12 Dec 13:10 robots.txt drwxr-xr-x@ 5 jg staff 160 12 Dec 13:11 static -rw-r--r--@ 1 jg staff 933 12 Dec 13:10 videoPlayer.html -rw-r--r--@ 1 jg staff 176341 12 Dec 13:11 voxeet-dvwc-worker.js -rw-r--r--@ 1 jg staff 13801 12 Dec 13:11 voxeet-worklet.js -rw-r--r--@ 1 jg staff 508384 12 Dec 13:11 vsl_impl.bin -rw-r--r--@ 1 jg staff 1771142 12 Dec 13:11 vsl_impl.wasm
Could you please share the Network tab of the web console from Chrome. I'd like to see the failing requests.
Also, make sure your server know the mime type application/wasm
.
Do I need to make server changes? I found this: https://arne.xyz/2020/08/21/aws-s3-cloudfront-unity3d-webgl/ ?
The problem is described in the link you shared.
.wasm, .wasm.gz or .wasm.br files should be served with a Content-Type: application/wasm response header.
Since you run this website locally (at least in the screenshots), you need to add the mime type to your local computer.
I will take a look and get report back
@FabienLavocat deployed my changes to AWS S3 bucket. As you can see, the files have been copied to the base path. If I look in AWS, the *.wasm files have the correct content-type.
Thoughts?
You should check your network tab, the log entry says that it's not returned as "application/wasm".
@FabienLavocat can you tell me where dapm_impl.wasm
comes from? That looks to be the offending file.
This was not in the list of files to be copied to the base path.
https://github.com/voxeet/voxeet-sdk-web/blob/master/dvwc_impl.wasm The file is in both this GitHub repo and NPM package. You should indeed copy this file to your project (or S3 bucket).
Hi @FabienLavocat , OK, progress. I added the file above and also moved the files to the correct folder. Now, the WASM files load correctly. I now see this new error :-)
Any help here?
Do you have this file audio_dnr.bin
on your S3 storage? Make sure all the files from the NPM package are copied over.
Hey @FabienLavocat ,
So all the files in node_modules/@voxeet/voxeet-web-sdk/dist
should be copied over?
Yes
@FabienLavocat OK that has fixed most of the issues :-) thanks!
The last warning that shows is: INFO: Created TensorFlow Lite XNNPACK delegate for CPU. (dapm_impl.wasm?2febc590a084ffcb3bb2bfb2b8da4a15:0x446c6 INFO: Created TensorFlow Lite XNNPACK delegate for CPU.)
I don't think this is an issue.
It's an INFO
, everything is good there.
Hi,
It seems, everytime we call
await VoxeetSDK.conference.join(conference, joinOptions);
joinOptions:
we see the below warnings:
wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
falling back to ArrayBuffer instantiation
failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 64 6f @+0
Aborted(CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 64 6f @+0)
Can we get some advice on what this is and the effect this may have?
Thanks.