-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
"SharedArrayBuffer will require cross-origin isolation" with the dev server #6220
Comments
Hey 👋 I wanted to take a look but regardless to the issue itself, running "yarn build" for the simple example is routing to the 404 page, is it something known? So I added the following block into the setHeaders()
Verified that all tests are passing, and started "react-refresh" example instead, Updating the react dependencies also tweaked the parcel-create-react-app and the core/parcel package.json bin location from src/bin.js to lib/bin.js, I'm not sure why actually, maybe you'll know? LMK what is the right way of testing the headers additions? Thanks! |
That's probably because there's no HTML file in https://github.com/parcel-bundler/parcel/tree/v2/packages/examples/simple.
That only happens after running
Our existing dev server integration tests are here: https://github.com/parcel-bundler/parcel/blob/v2/packages/core/integration-tests/test/server.js |
@valentinbdv can you try using the crossorigin attribute as follows? |
I think what #6499 describes would fix this for you |
Thanks for your answers! @LironHazan, I confirm that the cross-origin attribute fixes the issue as I used it already. @mischnic I also tried to use proxyrc but then I guess I had the same issue as the one you linked. Do you know when the fix will be available? |
That bug is fixed already in the latest nightly |
I confirm this is working! Thanks a lot ;) |
Just continuing the above discussion, you can disable COEP by creating module.exports = function(app) {
app.use((req, res, next) => {
res.setHeader('Cross-Origin-Embedder-Policy', 'unsafe-none')
next()
})
} |
🐛 bug report
Using
SharedArrayBuffer
will require/already requires setting some headers on the server:https://developer.chrome.com/blog/enabling-shared-array-buffer/
💁 Solution
We already set the "normal" CORS headers:
parcel/packages/reporters/dev-server/src/Server.js
Lines 33 to 41 in a67a5f0
The dev server should set the headers described on the linked Chrome page, probably these:
The question is whether we can just always set them or if this can cause problems
🌍 Your Environment
The text was updated successfully, but these errors were encountered: