Skip to main content
Sonny_Lazuardi_Hermawan
New Member
March 1, 2023
Question

figma.importStyleByKeyAsync throwing Error: Unable to create style

  • March 1, 2023
  • 24 replies
  • 1629 views

This plugin API was working before, after today’s update we got this error

Error: Unable to create style

Any advice?

This topic has been closed for replies.

24 replies

thomas_TikTok-Design-UX-APAC
March 6, 2023

request return the same key that i used to importStyleByKeyAsync

Yeonhee_Lee
March 6, 2023

I see the same error when I run the plugin against a file I have the editor’s access to. It doesn’t happen if I copy the same file and run the same plugin against as an owner.
Does this bug have anything to do with the authority?

March 7, 2023

I’m using the latest style key return by figma API. Not sure if the backend changes you mentioned affected those style created a few years ago.

The network request was success. I believe it’s the Figma client that throws the error

I’m using https://api.figma.com/v1/files/${file_id} to fetch all the style keys. My guess here it might related to this api returning outdated style keys.

thomas_TikTok-Design-UX-APAC
March 7, 2023

i found that style key get from rest api return is different from getLocalPaintsStyles
that’s why this error happen

thomas_TikTok-Design-UX-APAC
March 7, 2023

yes, if you run getLocalPaintsStyles in lib file,you will find that key is different from https://api.figma.com/v1/files/${file_id}

Alexander_Rodin
March 9, 2023

Hi, any solution for this one? Also ran into the same error

Daniel_Buitrago_Jara
New Member
March 13, 2023

Hi, is there a solution for this issue?

I already confirmed that the style ids where updated (they didn’t change in my case) and it keeps throwing the same error.

James_Yang
Figmate
Figmate
March 14, 2023

Hi all, we plan to roll out a fix for this “Unable to create style” error by the end of day Wednesday March 15. This error primarily comes up for older styles that have been moved to another file.

Alexander_Rodin
March 17, 2023

Still getting the same error. Maybe there is something I need to do with the style in the lib for the fix to work?

Active Member
March 17, 2023

I also can’t load team style by ID.