Uncaught (in promise) RangeError: Offset is outside the bounds of the DataView #403
-
Hello! Thank you so much for this tool! I have been able to get it working on localhost, but can't get it to work when hosted on AWS Amplify. I'm getting an 'offset is outside the bounds of the dataview error' relating to the loader.js file. I have seen someone have a similar issue (https://bytemeta.vip/repo/jeffreylanters/react-unity-webgl/issues/175) where the issue was that the data file was encoded as text / html. I don't think this is the same issue I'm having, as in AWS I have set a custom header with the following:
The point that it throws the error is at: I'm rather new to using React and would really appreciate any help anyone can offer on what I've missed out here! Been searching for a week or so without any luck on a solution. Happy to DM a link to the webpage too if it's useful! Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Fixed it! For anyone else running in to this issue with AWS Amplify:
Thanks again for this amazing tool! |
Beta Was this translation helpful? Give feedback.
Fixed it! For anyone else running in to this issue with AWS Amplify:
Under Rewrites and redirects in AWS console, type 200 rewrites need to include both wasm and data to work correctly:
</^[^.]+$|\.(?!(css|gif|ico|jpg|js|png|txt|svg|woff|ttf|map|json|wasm|data)$)([^.]+$)/>
Thanks again for this amazing tool!