-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Failed to load colors from Figma #243
Comments
The error «Failed to load colors from Figma» occurs when the library gets a network error or a Figma API error. It is strange that adding
No, the library doesn't apply default regexp validation.
Because the library unable to get colors from Figma API. I agree with you that it is not clear from the error message what the cause of the error is. It should print Figma API error message at least. |
Unfortunately can't share the figma file. I did my best to replicate the issue on my own projects, but unfortunately, no success. It seems like this issue is quite rare. At my workplace, we follow the same design rules across many projects, but for some reason, this specific one is giving us trouble. |
Hey @subdan I just run into similar issue of |
@robertmusialek could you please share your Figma file so I can reproduce the issue? |
Unfortunately that is something I cannot share outside of our company :( |
@kiddden, @robertmusialek Which Figma plan do you have? |
Premium version |
There is no Premium plan. To export variables you must have Enterprise plan. |
I'm sorry, we use Professional Team plan |
Sync variables to code via REST API only available for Enterprise plan |
Do you use Variables or Color Styles for colors? |
We use color styles |
Did you try to use 0.37.6? |
Yes, this version works nicely. Forgot to mention it in the issue. Will update it now. |
@kiddden did you set |
No, we haven't touched color variables at all |
Tool version: 0.38.0
This week, I encountered a very strange bug. Everything was exporting fine except for the colors, and the terminal simply output the following error:
The design team thoroughly checked everything, but there were no results.
I decided to experiment with figma-export.yaml and added nameValidateRegexp specifically for colors. Before, it was commented. Here's what I got in the terminal:
I just fixed the regex to accept names that we use in Figma, and the problem was resolved.
I don't understand how it could be that with zero restrictions, it fails to export, but when I add restrictions, it works. Perhaps the library applies some default regex validation under the hood when we don't specify anything, but I couldn't find any information about this.
Another question is why it doesn't display any error message, when regex validation is commented.
I want to note that export works perfectly fine on other projects with the same config, and it also worked okay before on this project too. I'm not sure if this is a bug or not, and looking for a piece of advice.
UPD: There is no issue on 0.37.6, looks like the error is related to 0.38.0
The text was updated successfully, but these errors were encountered: