-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReferenceError: SharedArrayBuffer is not defined #3
Comments
Having the same issue with chrome as well. |
OK seems like this cna be partially solved by adding this in next.config:
Bow I am getting another error: Error: ffmpeg.wasm is not ready, make sure you have completed load(). Wonder if his has something to do with SSR in next.js? Weird thing is that ffmpeg-core seems to be loaded initially but this error goes off if I try to run any command. |
Try to run chrome with this flag enabled, it worked for me!
|
You can add this in index.html
|
<script> if (!crossOriginIsolated) SharedArrayBuffer = ArrayBuffer; </script> It's giving this error now
|
Weird, it worked for me with that, without adding the flag. Chrome version Version 94.0.4606.81. |
Yeah :( |
Add below packge details for any SharedBufferArray issues. either add npm package or js file itself |
This issue is caused by the updates of Chrome 92. This document will helps you: According the document, you need to add these headers to make a page cross-origin isolated: Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin This is a same solution as previous comment. And I tried, it works. I just added a file |
I think this would help in CRA |
I had the same problem, running my app with The part in the config looks like this:
|
Hello, you might be calling createFFmpeg in a component. It should be called only once. Mine had same problem as yours, but after I moved createFFmpeg out of component, it worked. |
For anyone who met a same problem, and cant just set Cross-Origin-Embedder-Policy as
My page have to load resource like image from others' blobstore/cdn ,they dont have 'Cross-Origin-Resource-Policy' in their reponse header, and I cant control the response header I believe this is due to this update
|
|
Building on @niilz note above - using the create-react-app and testing on localhost, I found that adding the headers to the webpackDevServer.config.js removed the 'SharedArrayBuffer is not defined' error for me. On my system (MAC) the file was in: [My react project]/node_modules/react-scripts/config Extract from the webpackDevServer.config.js for reference: .
. |
Thanks very much |
In NextJS this solution might work but when I set those headers, my app cannot contact stripe and supabase anymore. |
OMG,that seems works fine for me. I have resource from CDN too, and cannot control any header of them. |
Hello - this is a super exciting project. Thanks for the React template. I'm having issues with trying this on Next.js and I suspect that would happen with this template as well.
ReferenceError: SharedArrayBuffer is not defined
From what I have read, this was a Firefox bug that is now happening in Chrome as well? Is there any resolution for this yet?
Thanks!
The text was updated successfully, but these errors were encountered: