Skip to content

Embbeded Webcontainer doesnt work #2100

Open
blackbaud/skyux
#4480

Description

@sevenzing

Describe the bug

Having this error in embedded project

Unable to run Embedded Project
Looks like this project is being embedded without proper isolation headers.

[Read more about browser support for embedded projects](https://developer.stackblitz.com/platform/webcontainers/browser-support#embedding)

We tried to add headers like credentialless of cross-origin isolation but it didnt work.

Issue also ocures locally

Link to the blitz that caused the error

https://ensnode.io/docs/integrate/integration-options/enskit/example

https://stackblitz.com/edit/w4ozjb2k?file=src%2FApp.tsx

Steps to reproduce

Simply go to url and see the error

Expected behavior

Previously we have this example worked fine

Parity with Local

Screenshots

Image

Platform

  • OS: macOS
  • Browser: Chrome, Brave
  • Version: "@stackblitz/sdk": "^1.11.0",

Additional context

No response

Activity

  1. github-actions commented on May 21, 2026

    @github-actions

    We noticed that you did not provide a StackBlitz or Bolt reproduction link. Please update the issue and add a link to a public project.

  2. bolt-new-by-stackblitz commented on May 21, 2026

    @bolt-new-by-stackblitz

    Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

  3. sevenzing commented on May 21, 2026

    @sevenzing
    Author

    probably related issue: #2045

  4. sevenzing commented on May 21, 2026

    @sevenzing
    Author

    @SamVerschueren could you please take a look?

  5. SamVerschueren commented on May 21, 2026

    @SamVerschueren
    Contributor

    Hi @sevenzing! Thanks for reporting. A Google origin trial token has expired and we need to renew it. I flagged this internally as I'm not able to do this myself and will hopefully be fixed later today. I'll keep you posted.

  6. sevenzing commented on May 22, 2026

    @sevenzing
    Author

    @SamVerschueren thanks a lot! The issue is still present, maybe it's possible to fix it before weekends? 👀

  7. SamVerschueren commented on May 22, 2026

    @SamVerschueren
    Contributor

    Sorry, I forget to reach out again. The problem is... it looks like we are not able to solve this on our end.

    So for embeds, we relied on the UnrestrictedSharedArrayBuffer origin trial from Chrome to allow usage of SharedArrayBuffer. This allowed anyone who embedded a WebContainer project to just run it without having to jump all the hoops to get cross origin isolation working. You can read more about what it is and in a blogpost I write a couple years ago.

    HOWEVER, since the 18th of May they apparently stopped the origin trial which means we cannot used SharedArrayBuffer anymore without proper cross origin isolation.

    I might need to digg a bit deeper to see if there's a way to solve this without jumping through all the hoops because that would mean it's up to the embedder to do all the hard work.

  8. sevenzing commented on May 22, 2026

    @sevenzing
    Author

    @SamVerschueren
    Can we somehow quickfix it on our end? For example send some header? I already tried it locally but did not succeed. Temp dirty solution is OK for us

  9. sevenzing commented on May 25, 2026

    @sevenzing
    Author

    hey @SamVerschueren ! sorry for annoying pings 🥲

    As I understood this issue wont have a quick fix on your side since Chrome dropped origin trial 😠 Does it mean that there is no way to fix it and embedded window simply wont work anymore?

    Maybe there a way to quickly solve it on our end? As I said we can implement temp dirty solution 🙏

  10. ddubrava commented on May 25, 2026

    @ddubrava

    Hey! Thanks for digging into this. I experience the same issue here - https://ddubrava.github.io/angular-yandex-maps/#/v3/components/YMapComponent

  11. SamVerschueren commented on May 27, 2026

    @SamVerschueren
    Contributor

    No update on my side yet. I was out for a couple of days and now discussing internally on how to proceed here. Sorry for the delays but I'm trying to push for a solution.

  12. SamVerschueren commented on May 27, 2026

    @SamVerschueren
    Contributor

    I looked at it again and actually it might already work if you want.

    The StackBlitz SDK supports the option crossOriginIsolated: true starting from version 1.11.0. This serves the page with 3 extra headers

    • cross-origin-embedder-policy: credentialless
    • cross-origin-opener-policy: same-origin

    This means that you also need to set the following headers on the top level page

    • cross-origin-embedder-policy: credentialless
    • cross-origin-opener-policy: same-origin

    If you don't use the SDK but just embedding with the embed url, you can just add corp=1 to the embed URL.

    You also need to allow cross origin isolation in the iframe

    <iframe src="https://stackblitz.com/edit/create-a-map-v3?embed=1&view=preview&corp=1" allow="cross-origin-isolated">

    Please test this out and let me know.

    [EDIT]: You should make sure to upgrade the SDK to version 1.11.1.

  13. 9 remaining items

  14. alexovn commented on Jun 13, 2026

    @alexovn

    @SamVerschueren I have same error. I tried to add corp=1 to the embed URL and allow="cross-origin-isolated" attribute to iframe, but nothing works. There's a problem with fetching https://json.schemastore.org/package and https://json.schemastore.org/prettierrc requests.

    <iframe style='width: 100%; height: 700px' src="https://stackblitz.com/edit/vitejs-vite-qhzy6i6j?embed=1&file=src%2FApp.vue&corp=1" allow="cross-origin-isolated"></iframe>
    Image
  15. sevenzing commented on Jun 17, 2026

    @sevenzing
    Author

    @SamVerschueren yes, I'm using latest 1.11.0

    Updates from my side:

    1. I dont see headers in response from /run/ endpoint, this is strange:
    Image
    1. Also sharing my Application > Frames > run
    Image
    1. In previous message I wrote that

    The raw iframe approach with /edit/ works perfectly in Chrome, so If I use this iframe in our project it works perfect!

    But now when I paste this iframe I also get Unable to run Embedded Project, mysterious

  16. sevenzing commented on Jun 25, 2026

    @sevenzing
    Author
  17. SamVerschueren commented on Jul 1, 2026

    @SamVerschueren
    Contributor

    @sevenzing I don't see the corp=1 flag in the run endpoint you are calling? Am I missing something here? I also don't see the query param in the requests made on https://ensnode.io/docs/integrate/integration-options/enskit/example.

    @alexovn The failures on schemastore is not something we can do, it's because schemastore.org doesn't serve the correct headers.

    Sorry about the inconvenience here. I'm juggling multiple things.

  18. SamVerschueren commented on Jul 1, 2026

    @SamVerschueren
    Contributor

    @sevenzing I think I found the root cause. I'll let you know when I released a new version of the SDK.

  19. SamVerschueren commented on Jul 2, 2026

    @SamVerschueren
    Contributor

    @sevenzing Can you update to the latest @stackblitz/sdk version 1.11.1 and test again?

  20. alexovn commented on Jul 2, 2026

    @alexovn

    @sevenzing I don't see the corp=1 flag in the run endpoint you are calling? Am I missing something here? I also don't see the query param in the requests made on https://ensnode.io/docs/integrate/integration-options/enskit/example.

    @alexovn The failures on schemastore is not something we can do, it's because schemastore.org doesn't serve the correct headers.

    Sorry about the inconvenience here. I'm juggling multiple things.

    Okay, I got it. But can we ignore schemastore.org? Otherwise, it looks like no example that has been embedded will work

  21. SamVerschueren commented on Jul 3, 2026

    @SamVerschueren
    Contributor

    Yes, I believe you can ignore it. I think they get loaded in order to get some code completion in package.json for known attributes. If they fail to load, you don't get auto completion, but that's fine. It does not prevent it from running.

  22. alexovn commented on Jul 3, 2026

    @alexovn

    Yes, I believe you can ignore it. I think they get loaded in order to get some code completion in package.json for known attributes. If they fail to load, you don't get auto completion, but that's fine. It does not prevent it from running.

    It's strange, 'cause I see that it may prevent loading a nested StackBlitz browser's example. I don't see any other purposes for this issue

  23. johnhwhite commented on Jul 14, 2026

    @johnhwhite

    We hit this issue when using the legacy, WebPack-based Angular dev-server in a webcontainer, and switching to the application builder also added the Cross-Origin-Resource-Policy header necessary to work in the webcontainer on StackBlitz.

    Our case was using openProject and not embedded projects, but adding the comment in case it helps others who encounter this issue.

  24. banzor commented on Sep 3, 2026

    @banzor

    We are experiencing this same issue. I tried adding the headers to our host page and adding the attributes to the iframe tag. Nothing is solving it.

    I have embedded a few different stackblitz samples in tutorials on our documentation site. Recently, they have become unable to render.

    See embed here:
    https://developer.mescius.com/spreadjs/docs/tutorials/how-to-import-and-export-excel-xlsx-using-javascript

    Sample here:
    https://stackblitz.com/edit/spreadjs-import-export-excel

    Error message:
    Unable to run Embedded Project
    Looks like this project is being embedded without proper isolation headers.

    Using iframe to embed. These have worked for a long time but broke suddenly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions