Prismic CLI - Slice Machine commands fail with Err 502

All Prismic CLI sm commands fail with:
ERROR [SliceMachine/handleFrameworks] Unable to fetch manifests. Error code: 502

example: $ prismic sm --setup other CLI commands seem to work. Including login, init etc

  • I’m currently connected to a valid Prismic account via the login command.
  • Prismic-cli: 3.7.11
  • Node: 14.4.0

Edit: I receive the same error with prismic-cli@3.7.10

My guess is URLs are messed up in a config somewhere

1 Like

Hi,
I tested the CLI in 3.7.11 and don’t have any issue running a setup.
Do you have some error message or stacktrace? Or did you try another version of the CLI or another version of Node?

The error I receive is:
ERROR [SliceMachine/handleFrameworks] Unable to fetch manifests. Error code: 502

Same problem in CLI 3.7.11, 3.7.10, 3.7.9. Alpha and beta builds of the CLI won’t install give missing file errors.

I’ve not tried different versions of Node but I can. That said, its a 502 error (bad gateway) so I find it unlikely that a node version will change that. It’s also possible its a DNS caching issue somewhere.

I get that but I also tried various versions and I can’t manage to have the same issue so I’m trying to find any lead that could help me find out

Same errors with Node 14.4, 12.18.1, 10.21

What’s really odd is that Slice Machine setup, etc worked a week ago and I hadn’t made any changes to my environment before trying to trouble shot this issue.

Also I cleared DNS cache and completely changed DNS resolver

Exact same issue on a completely different machine.

Computer 1: Windows 10 WSL (Ubuntu 18.04) Node & Prismic CLI versions listed previously
Computer 2: Mac OS 10.15.5 Node 13.12.0, Prismic CLI 3.7.11

The only commonality is both machines are on the same network (that I control). But to make sure that wasn’t an issue, I used a VPN tunnel to completely bypass my local network. However, I still get the same issues on both machines.

Hey,

We just pushed a fix for this, can you try again?

Yes it works for me now. Thanks @Phil!

1 Like

Hi @online ,

Can you tell what version on the CLI you're using?

I'm experiencing this too from this morning. Two different machines (OSX Catalina / Windows 10) both running CLI 3.7.11.

Slice creation was also failing in the standard Prismic GUI so I thought perhaps you were having a bit of downtime prepping for the new SM release… but this has continued for a full day?

Hi Phil, today when Im running:

$ prismic sm --create-slice

It's getting stuck on "⠹ Downloading framework definitions".. and then times out with
"[SliceMachine/handleFrameworks] Unable to fetch manifests. Error code: 502"

Seems this error is back. I need access to this functionality urgently.
Could you have your team quickly look for any breaking changes.

This was working fine for me yesterday.

Thanks

Richie

Hey @online & @anthony1,

I'm investigating this with the team now, but like you said it might be related to the new release that we're pushing today.

Once I have more information I'll let you know.

Thanks.

OK, this is due to changes to the way we create slices in Slicemachine. We're revealing all right now in out product meetup, it's exciting!

Alternatively you can jump straight over to our new documentation on the new process:

I apologize if the change has caused you any inconvenience, unfortunately these are the risks involved when working with beta projects.

If you still run in to problems after checking out the docs, I'll be more than happy to help you here.

Also to stop the 502 errors with --create-slice you'll need to update your CLI to the latest version:

npm install --global prismic-cli@3.8.3-beta.0

prismic-cli 3.7.11
MacOS High Sierra (10.13.6)

Thanks for looking into this.

The Prismic project is very meta and as such there's extra work for everyone to wrap our heads around the layers in layers (this is also its strength and a core part of why it exists).

You folks are pretty responsive in the forums but I think its worth thinking harder on the developer experience and simplifying the experience.

I think one way to improve the project is that ALL devs need to use the CLI (while writers don't).
The CLI is not in a good state currently.

Long open issues and Pull Requests and NO Changeloge.

I recommend you request additional resource to maintain the prismic-cli project in a tighter state and also work out how breaking changes like happened here could be better disclosed.

It's a great project but we've found it unweildy to navigate and issues with the CLI dont give confidence (yes I appreciate this is an internal api change but I think you get my point).

Thanks

Hey,

It's true the Slicemachine is in beta at the moment and we are working very hard at making the Developer experience as smooth and easy as possible, this was the reasoning behind our creation of The Slice Builder and defining Slice models in your local project to push to Prismic.

The idea being like you said that developers will only really work through the CLI in that case.

In regards to the state of the CLI, I would say it's in very active maintenance, we had 4 team members working on it this week actually :joy:. Most of the issues in the git repo for the Prismic CLI were opened by our team and basically all of them were resolved with the latest update. The same goes for the PR's these are nearly all from our team.

Though I definitely agree that a change log could massively improve our communication and it is something that we have been discussing. So I'll push this further. :heavy_check_mark:

The latest change that we made was a tricky one as we wanted to play it close to our chests in communicating exactly what we had been working on and like you said it was an internal API change for Slicemachine users. So in the future we'll try our best not to communicate on big changes in the project.

Again sorry for the inconvenience this has caused your team and I hope you enjoy these new features that we've released as they should really improve your development workflow. :slight_smile:

Simply update to the latest version of the CLI to begin using them straight away:
npm install --global prismic-cli@3.8.3-beta.0

Thanks

2 Likes