StackBlitz SDK issues with Plugins

Hey community,

I’m trying to integrate StackBlitz’s SDK for generating sandboxes on the fly from my Figma plugin, but I’m facing a strange issue. I’m being redirected to the sandbox, but the code is missing, so probably the “body” isn’t reaching StackBlitz.

I reached out to the StackBlitz team as well, it’s all good from their side & works from browsers so most probably it’s Figma App which is stripping the request from the SDK for some reason.

What’s even weirder is I can’t see any network request being sent to the endpoint.

The steps I’m following are listed here: Creating projects with the SDK | StackBlitz Docs

Hey @Prakhar_Tandon, sorry to hear you’re having trouble!

As a first step, can you please ensure that you’ve filled out the plugin’s manifest’s networkAccess field with the StackBlitz domains you need to access?

More info here: Plugin Manifest | Plugin API

Hey @dvaliao,
the plugin currently has unrestricted network access.
“allowedDomains”: [“*”]

it may be related to the way requests are resialized when sent, or how the libs are build when creating the plugin code. I think it’s a complicated path to troubleshoot as you will not be able to easly recreate the ENV where the plugin runs.

For us, in order to be sure we don’t run into those kind of limitations, we created an labda in AWS with a public URL.

From Figma we make simple Post requests to this new endpoint, and we have full visibility in Lambdas logs of what the request coming form Figma looks like. so this will solve that part.

Next, the Lambda is doing all the work in nodeJS and this way you get full controll over this ENV.

You would make a test in lambda to create the sandbox. validate this step, and them move to send req from Figma to this lambda

I know it’s not a direct fix, but hope it helps.

Thanks, @Bogriceanu_Sorin. interesting approach. will try this out.