mikaelvesavuori / figmagic

Figmagic is the missing piece between DevOps and design: Generate design tokens, export graphics, and extract design token-driven React components from your Figma documents.
https://docs.figmagic.com
MIT License
807 stars 71 forks source link

Payload too large error when syncing graphics #157

Closed ivkrpv closed 2 years ago

ivkrpv commented 2 years ago

Describe the bug Graphics sync doesn't work when your Figma file contains a lot of components (we have around 1700 components on a Graphics page). It throws an error in the console: Error: Error: Error: Missing one or more of required arguments: "figmaToken", "figmaUrl" when attempting to get data from Figma API!. But if you try to debug the error is actually 413 payload too large and it comes from: https://github.com/mikaelvesavuori/figmagic/blob/8ef723cecd4f3204080a64a1d25ab5250c8f2def/bin/frameworks/network/getFromApi.ts#L50

To Reproduce Just try to sync a Figma project with a Graphics page containing many components (even 1000 should be enough to get this error).

mikaelvesavuori commented 2 years ago

Interesting! I am pretty sure this would be a Figma issue, rather than something on the Figmagic/implementation side.

Unclear how I'd verify it right now though.

mikaelvesavuori commented 2 years ago

Closing as a Figma issue. Will add a backlog task to investigate and find patterns on this.