I ran across this exact issue and when googling the error message, this was the only page that popped up.
First I tried resolving this using CSP headers, as suggested by @riley-aws.
Unfortunately this did not do the trick.
So I dug a little deeper, and using a break point where the error occured, I was able to get the error details. This was quite interesting indeed and lead me to learn why the wasm file couldn't be executed.
Here's the error:
"wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'."
Obviously the solution was to add the 'application/wasm' mime type header for .wasm files.
I did that and it worked.
Hope this helps someone else!
To amazon I suggest to catch these promise errors to maybe log them with a little bit more context. Had I seen this error message in the console, I'd immediately have known what's up. If there's more I can do to help with this, pls let me know.
Edited by: janpaepke on Jun 9, 2021 5:54 AM
This error is potentially being caused by a limitation with the Content Security Policy(CSP) on the browser being used. More information on this behavior can be found https://docs.aws.amazon.com/ivs/latest/userguide/player-web.html#web-content-security-policy
Seeing as the error being seen is a relatively generic error, it would be beneficial if we could better understand if there is a CSP policy in place on your webpage? As well, if there is any sample code that you are able/willing to share, please feel free to include that, as it may help indicate why this error is being thrown.
Did you find a solution to this issue?
I'm having the exact same problem here. I tried to add the CSP configs (didn't have it on the server), but the issue still happens.
We have not found a solution yet, and have been running an older version in the interim. We will keep you posted on our findings as we find a way to complete the upgrade.
Thank you, this is a great find. I checked the mime type and found it was declared as binary/octet-stream.
I'll need to update my CI to set "application/wasm" properly when uploading to S3. Attaching a sample here for future reference:
aws s3 cp website/ s3://$WEBSITE_BUCKET --recursive --exclude "*.wasm"
aws s3 cp website/ s3://$WEBSITE_BUCKET --recursive \
--content-type "application/wasm" \
--exclude "" --include ".wasm"
I am also facing the same error, having already in place the mentioned content type. Actually, I am hosting the js library and wasm file from CDN. It works in the beginning but started to throw this error after an hour and a half of smooth running.
Previously, we were using version 1.1.2, which doesn't seem to have this error. However, there we were facing memory errors in that version, as we had frequent switching between different feeds on the browser.
Edited by: Sala on Jun 10, 2021 10:24 PM
Only this solution works perfectly. Thank you very much
Thank you AWS team for adding information regarding setting the Content-Type header on hosted assets.
For future reference of those reading this thread - https://docs.aws.amazon.com/ivs/latest/userguide/player-web.html - section "Setup With NPM"
TypeError: Cannot read property 'projectPath' of undefinedasked a year ago
'Undefined' Skipped rows error in Quicksiteasked 2 months ago
Are api call rate quotas adjustable in ivs?asked a year ago
username property in access_token is different between using SRP_AUTH and hosted UIasked 3 days ago
DocumentationPart Property Cloudformation exampleAccepted Answerasked 6 months ago
IVS player for Angularasked 2 years ago
Amazon Transcribe: Confidence and Speaker 'undefined'asked a day ago
IVS Player 1.3.1 - undefined property collectLogsAccepted Answerasked a year ago
AWS System Manager package and associationasked 4 years ago
"server response error0. undefined" - how to solve?asked 3 months ago