stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.79k stars 145 forks source link

Stackblitz failing to boot WebContainer #783

Open pawanpratapweb opened 2 years ago

pawanpratapweb commented 2 years ago

Describe the bug

Wrong

i cannot open any of my stackblitz.

it only says: Failed to boot web Container

Link to the blitz that caused the error

https://stackblitz.com/edit/express-simple-fegv8x?file=integrations.vscode.userData.settingsRaw

Steps to reproduce

  1. simply open the project

you will get this error

Expected behavior

It should simply open and not show error.

the terminal also not opens.

Parity with Local

Screenshots

Capture

Platform

Browser name  = Chrome
Full version  = 104.0.0.0
Major version = 104
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 67656238,
  "usedJSHeapSize": 62860282,
  "jsHeapSizeLimit": 495714304
}
Hash = 1aed30d7bfa712aa778f484223078bdc72898352

Additional context

No response

fvsch commented 2 years ago

This project seems to work for me in both Chrome and Firefox.

Are there any errors shown in the browser's Console maybe?

pawanpratapweb commented 2 years ago

client-abb7f8e631f7a.js:2 RuntimeError: unreachable at aae9938e at aae9938e at _0x10676b (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:37901) at _0x425fe1 (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39252) at async _0x55897e._initSlabAsync (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:42107) at async _0x55897e.create (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39766) at async _0x127060.init (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:34:35144) (anonymous) @ client-abb7f8e631f7a.js:2

client-abb7f8e631f7a.js:2 Something went wrong RuntimeError: unreachable at aae9938e at aae9938e at _0x10676b (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:37901) at _0x425fe1 (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39252) at async _0x55897e._initSlabAsync (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:42107) at async _0x55897e.create (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39766) at async _0x127060.init (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:34:35144) (anonymous) @ client-abb7f8e631f7a.js:2

2webcontainer.1aed30d7bfa712aa778f484223078bdc72898352.js:6 Uncaught (in promise) RuntimeError: unreachable at aae9938e at aae9938e at _0x10676b (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:37901) at _0x425fe1 (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39252) at async _0x55897e._initSlabAsync (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:42107) at async _0x55897e.create (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39766) at async _0x127060.init (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:34:35144)

2express-simple-fegv8x:1 Uncaught (in promise) RuntimeError: unreachable at aae9938e at aae9938e at _0x10676b (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:37901) at _0x425fe1 (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39252) at async _0x55897e._initSlabAsync (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:42107) at async _0x55897e.create (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39766) at async _0x127060.init (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:34:35144)

pawanpratapweb commented 2 years ago

It worked for me in Firefox.

so we need to close this issue.

danielroe commented 2 years ago

I'm still experiencing this in Firefox.

Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://w-corp.staticblitz.com/fs_bg.f78fa732fec6c779d7f25afc3bb0f5f1091671ec.wasm. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200.
SX-9 commented 1 year ago

client-abb7f8e631f7a.js:2 RuntimeError: unreachable at aae9938e at aae9938e at _0x10676b (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:37901) at _0x425fe1 (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39252) at async _0x55897e._initSlabAsync (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:42107) at async _0x55897e.create (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39766) at async _0x127060.init (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:34:35144) (anonymous) @ client-abb7f8e631f7a.js:2

client-abb7f8e631f7a.js:2 Something went wrong RuntimeError: unreachable at aae9938e at aae9938e at _0x10676b (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:37901) at _0x425fe1 (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39252) at async _0x55897e._initSlabAsync (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:42107) at async _0x55897e.create (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39766) at async _0x127060.init (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:34:35144) (anonymous) @ client-abb7f8e631f7a.js:2

2webcontainer.1aed30d7bfa712aa778f484223078bdc72898352.js:6 Uncaught (in promise) RuntimeError: unreachable at aae9938e at aae9938e at _0x10676b (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:37901) at _0x425fe1 (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39252) at async _0x55897e._initSlabAsync (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:42107) at async _0x55897e.create (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39766) at async _0x127060.init (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:34:35144)

2express-simple-fegv8x:1 Uncaught (in promise) RuntimeError: unreachable at aae9938e at aae9938e at _0x10676b (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:37901) at _0x425fe1 (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39252) at async _0x55897e._initSlabAsync (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:42107) at async _0x55897e.create (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:15:39766) at async _0x127060.init (blitz.1aed30d7bfa712aa778f484223078bdc72898352.js:34:35144)

This is the same error i got on mobile

brianjenkins94 commented 1 year ago

Trying to set up a minimal project, I have this issue:

Screenshot 2023-06-11 at 9 21 38 PM

In my server.ts I set:

server.use(helmet({
    "contentSecurityPolicy": {
        "directives": {
            ...helmet.contentSecurityPolicy.getDefaultDirectives(),
            "default-src": ["'self'", "https://stackblitz.com/"],
            "script-src": ["'self'", "https:"]
        }
    },
    "crossOriginEmbedderPolicy": true,
    "crossOriginResourcePolicy": { "policy": "same-site" } // `cross-origin` yields the same error
}));

But the error I am receiving is in regards to Cross-Origin-Resource-Policy (CORP) rather than Embedder (COEP) or Opener (COOP) policies.

And it's specific to this request: https://stackblitz.com/headless?version=1.1.5

Which doesn't specify the Cross-Origin-Resource-Policy header in its response.

I run into the same the Cross-Origin-Embedder-Policy issue downloading this project and trying to run it locally: https://stackblitz.com/edit/stackblitz-webcontainer-api-starter-with-terminal?file=main.js

FreakeyPlays commented 8 months ago

Is there a way to fix this error? I got the same while deploying.