-
Notifications
You must be signed in to change notification settings - Fork 26
Description
I encountered an issue with the openProject API of the StackBlitz SDK while creating a Figma plugin. The plugin renders a button that, when clicked, is supposed to create a project using the StackBlitz SDK. However, instead of opening the specified project, it always redirects to the StackBlitz homepage.
The implementation is based on your official example:
https://stackblitz.com/edit/sdk-create-project-with-npm-ts?file=index.ts
Steps to Reproduce:
-
Clone the repository: GitHub Repo Link
-
Build the plugin:
$ npm run build
This will generate a manifest.json file and a
build/directory containing the JavaScript bundle(s) for the plugin.To watch for code changes and rebuild the plugin automatically:
$ npm run watch
-
Install the plugin in Figma:
- In the Figma desktop app, open a Figma document.
- Search for and run
Import plugin from manifest…via the Quick Actions search bar. - Select the
manifest.jsonfile that was generated by thebuildscript.
-
Click on the "Create StackBlitz project" button in the plugin.

Expected Behavior:
The openProject API should create and display the specified project in StackBlitz.
Actual Behavior:
The openProject API always redirects to the StackBlitz homepage instead of creating the project.
Additional Notes:
- The issue might be related to restrictions in Figma’s environment (e.g., iframe sandboxing or CORS).
- There’s also a CodeSandbox link in the plugin, which works as expected.