stackblitz/webcontainer-docs

[BUG] Can't run tutorial demo locally

Closed this issue · 3 comments

dgwyer commented

Describe the bug
I'm working through the tutorial here: https://webcontainers.io/tutorial/1-building-your-first-webcontainers-app.

However, I can't get it to work due to the following console error message.

image

I've tried restarting the dev server, and hard-refreshing the browser several times.

To Reproduce
Just follow the current tutorial steps.

Expected behavior
Expected it to work the same as the final project.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome 109.0.5414.120 (Official Build) (64-bit)

Hi @dgwyer. Have you read through the set up COOP/COEP headers section?

In order to use SharedArrayBuffer (which we heavily rely on), the page has to be cross origin isolated (like your error message indicates).

So make sure those headers are added to the dev server and it should work.

You can check this in Devtools as well

image

dgwyer commented

Update: It's resolved now. Was a misselling of a header. Thanks for the quick follow-up though!