`openProject` API always opens StackBlitz homepage when used in a Figma plugin
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 50
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
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 buildThis 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the official SDK example's index.ts and the reproduction repository; run npm run build, install the generated manifest.json in the Figma desktop app, and click the button. Compare the generated build bundle and the Figma plugin behavior with the expected openProject call. Done means the specified project opens in StackBlitz instead of the homepage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- figma, typescript
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100