Describe the bug
When embedding a StackBlitz project using StackBlitzSDK.embedProject, the preview fails to render.
The error shown is "Unable to run Embedded Project. Looks like this project is being embedded without proper isolation headers."
I have enabled crossOriginIsolated on the hosting page, but the issue persists.
Link to the blitz that caused the error
https://stackblitz.com/edit/sdk-open-embed-sb-projects-js
Steps to reproduce
- Open the sandbox: https://stackblitz.com/edit/sdk-open-embed-sb-projects-js
- Embed the project using StackBlitzSDK.embedProject in a div.
- Wait for the preview area to load.
- Observe the error: "Unable to run Embedded Project. Looks like this project is being embedded without proper isolation headers."
Expected behavior
The embedded project preview should render correctly inside the div, without showing the isolation header error.
Parity with Local
Screenshots
Platform
- OS: Windows
- Browser: Chrome
- Version: 144.0.7559.97
Additional context
- The hosting page has headers:
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless
- The issue occurs even with these headers set.
- The error is reproducible with StackBlitz's official demo sandbox.
- Seems related to cross-origin isolation in embedded projects.
Describe the bug
When embedding a StackBlitz project using StackBlitzSDK.embedProject, the preview fails to render.
The error shown is "Unable to run Embedded Project. Looks like this project is being embedded without proper isolation headers."
I have enabled crossOriginIsolated on the hosting page, but the issue persists.
Link to the blitz that caused the error
https://stackblitz.com/edit/sdk-open-embed-sb-projects-js
Steps to reproduce
Expected behavior
The embedded project preview should render correctly inside the div, without showing the isolation header error.
Parity with Local
Screenshots
Platform
Additional context
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless