Skip to content
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

figcd release failing #1

Open
atruttmann opened this issue Dec 6, 2023 · 3 comments
Open

figcd release failing #1

atruttmann opened this issue Dec 6, 2023 · 3 comments

Comments

@atruttmann
Copy link

atruttmann commented Dec 6, 2023

Hi Martin! We connected before on the Figma forum. Thanks for your great support earlier.

I'm having an issue releasing my plugin. It seems like it can't get the version_id and then the release fails. It's coming from this line. This is a new issue, I was able to successfully release on November 29.

preparedVersionId = preparedRelease.version_id;
TypeError: Cannot read properties of undefined (reading 'version_id')

I'm pretty sure this is not an authentication issue. I can get the current version using figcd current-version and figcd prepare works as well.

I'm trying to narrow down the issue now. It seems that either the fetch is failing on prepareReleaseResponse or possibly there is no meta attribute on the returned json? Maybe Figma changed something about the API recently?

Let me know if you need more information. Thanks in advance!

@atruttmann
Copy link
Author

atruttmann commented Dec 6, 2023

Found the source of the issue! prepareReleaseResponse was returning:

{
  error: true,
  status: 400,
  message: 'Resource must include a valid category',
  i18n: {
    id: 'community.sinatra.plugins.resource_must_include_a_valid_category',
    fallback_text: 'Resource must include a valid category',
    params: {}
  }
}

It looks like Figma recently required a category and subcategory for the plugin:

Screenshot 2023-12-06 at 10 09 33 AM
Screenshot 2023-12-06 at 10 15 01 AM

I did a manual release with the specified categories. Then I ran a figcd release and everything is working fine now that categories are specified.

I would suggest that figcd add options to specify the category and subcategory. It may also be useful to check if the response returns with an error and show that error to the user. For now my workaround has fixed the immediate issue for my plugin.

@martin-lysk
Copy link
Contributor

@atruttmann Sorry for the late response - Thanks a lot for the report and the details! Guess we will have to play the catch up game with figma here. I am currently pretty busy with parrot and only fix the things i ran into. If you would like - happy to review a PR ;-)

@macintoshhelper
Copy link
Contributor

Hi, specifying a category as an option should be supported now. The main limiting factor now for creating a release from scratch using figcd is the required icon and cover image uploads, which need to be done manually for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants