GettEngineering / Prism

Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.
https://prism.tools
MIT License
361 stars 21 forks source link

HTTP 404 during `prism generate` #24

Closed forsan closed 4 years ago

forsan commented 4 years ago

Thank you for the amazing tools!!

I face the error below if I use the first project, any other project working fine.

Screen Shot 2020-05-23 at 8 32 43 AM

The first project related to the design system and it contains colors, style guides, and spacing.

Screen Shot 2020-05-23 at 8 37 59 AM

Appreciate your support

freak4pc commented 4 years ago

Hey @forsan ! Thank you :)

I've added some more verbose logging for that failure on master. Do you mind cloning the project and running from source like so:

swift run --package-path /path/to/clone prism generate
forsan commented 4 years ago

Thank you for the swift response :)

Screen Shot 2020-05-23 at 10 10 35 PM
freak4pc commented 4 years ago

Mind copy pasting the error instead of screenshot ? Would be easier to read :)

forsan commented 4 years ago

Sorry about that.

❌ Error: An unknown HTTP 404 API error to https://api.zeplin.dev/v1/styleguides/5e4b66ed832f72b66719a8cb/colors?offset=0&limit=100 occured: keyNotFound(CodingKeys(stringValue: "detail", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"detail\", intValue: nil) (\"detail\").", underlyingError: nil)) An unknown HTTP 404 API error to https://api.zeplin.dev/v1/styleguides/5e4b66ed832f72b66719a8cb/spacing_tokens?offset=0&limit=100 occured: keyNotFound(CodingKeys(stringValue: "detail", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"detail\", intValue: nil) (\"detail\").", underlyingError: nil)) An unknown HTTP 404 API error to https://api.zeplin.dev/v1/styleguides/5e4b66ed832f72b66719a8cb/text_styles?offset=0&limit=100 occured: keyNotFound(CodingKeys(stringValue: "detail", intValue: nil), Swift.DecodingError.Context(codingPath: [], debugDescription: "No value associated with key CodingKeys(stringValue: \"detail\", intValue: nil) (\"detail\").", underlyingError: nil))

freak4pc commented 4 years ago

@forsan Any chance you can try hitting that API with your token?

You can do this here on the web as well:

https://docs.zeplin.dev/reference#createstyleguidecolor

There is some error but my parsing of it is wrong, so it would be useful if you could paste the error you're getting :)

Thank you!

forsan commented 4 years ago

Check please

Api --url 'https://api.zeplin.dev/v1/styleguides/5e4b66ed832f72b66719a8cb/colors?limit=30&offset=0'

Error 404 { "message":"Styleguide not found" }

freak4pc commented 4 years ago

Yeah I see. The fact you don't get a proper message is an issue (fixing it now).

The reason you get the error is much harder to debug. The only thing I can offer is that you send me your token so I can debug it here and then you can revoke your token and create a new one.

Let me know if that option makes sense to you (if yes you can send the token to freak4pc AT gmail dot com)

freak4pc commented 4 years ago

The error messaging should be fixed on 5309868

forsan commented 4 years ago

Thank you for your extreme support. the design team creates one style guides for ios project and the android project may be in the wrong way because I check many APIs and i can't retrieve the style guides or colors or anything. the team unlinks the shared style guides and upload only for ios project and now it's working fine.

1) 📱 DS (iOS) (18 colors, 0 text styles)

freak4pc commented 4 years ago

Still very weird, the styleguides should be automatically fetched so if the ID causes an issue this is either on my side or Zeplin's side...

If you could take the time to possibly create some fake project with that scenario I'd really love to debug it.

Happy it works for you for now! Can I close this issue ?

forsan commented 4 years ago

I'm sure it's from Zeplin because I try their APIs dashboard and not working with me. Sure, I will prepare the project ASAP and update you.

I have 2 questions if you allow me.

  1. I read in your website you are working on generate components, any expected date?
  2. and I saw on your swift Heros talk, you use GitHub to let the designer push the changes, and in our case we are using Bitbucket on-premise. So we can link our Bitbucket to a prism?

Sorry, I take a lot of time from you.

freak4pc commented 4 years ago

First about the issues - I also reached out to my friends at Zeplin so they can look into it, but if you make the project that would help a ton. Thank you!

About your questions:

Question 1 - Can't commit to any date unfortunately, it's a long experimental process :)

About your second question - You're not limited to GitHub or any other provider, since it's just a CLI tool you can run it as part of your CI to push the changes which is what we do. If you want to learn a bit more

I did a talk on Bitrise's meetup which outlines our personal automation process, so that might help you gain some inspiration around that: https://youtu.be/SI8rQp8HaQU?t=5520 (Starts at 1h32m).

freak4pc commented 4 years ago

Hey @forsan - Is there any chance you can share the e-mail address / Zeplin user you use for your token? @forsan

jhonatn commented 4 years ago

Can confirm i am seeing the same error message ( Styleguide not found )

freak4pc commented 4 years ago

Hey @baguio - I'm happy to look into ths for you, can you tell me your Zeplin email / username so I can ask my friends at the Zeplin API team? Thanks!

freak4pc commented 4 years ago

Thanks for the debugging info @baguio. This will be fixed in 0.4.1, I'll release it later today (Fixed in #37)