[422] API request client error with Shopify CLI

Solved

[422] API request client error with Shopify CLI

Soundsprinkler
Visitor
2 1 2

Hi,

 

I've installed the Shopify CLI, used this command to log in:

 

 

 

shopify theme dev --store {store}

 

 

 

I log in via the browser and I get an answer saying:

 

 

 

✔ Logged in

 

 

 

 But then immediately after I get:

 

 

 

[422] API request client error

 

 

 

That error keeps coming up if I run "shopify theme dev". I've tried logging out and in again with "shopify auth logout", no dice.

If I run:

 

 

 

shopify theme info

 

 

 

It says I'm logged in, and I can push the theme to the store. 

 

Shopify CLI version: 3.44.1

 

Anyone know why this is happening and how I can solve it?

Accepted Solution (1)

Soundsprinkler
Visitor
2 1 2

This is an accepted solution.

Solved it by manually uploading the theme via the admin, logging out with the CLI and logging back in again but with the theme ID:

shopify theme dev --store {store} --theme {theme-id}

 

View solution in original post

Replies 7 (7)

ErSanjay
Shopify Partner
321 20 47

@Soundsprinkler  do you still facing the issue?
which version of Shopify CLI client are you using?

Business Owner & Shopify Plus, Shopify app , Shopify Consultant - Full Stack Sofware Engineer
Warm regards,
Er Sanjay

If you find yourself in need of assistance with your store, don't hesitate to reach out! Feel free to send me a direct message, and I'll do my best to help you out.
jcs1
Shopify Partner
4 0 2

I have the same error here

Shopify CLI    3.44.1

OS             darwin-arm64

Shell          /bin/zsh

Node version   v19.7.0

Ruby version   3.2.1

 

Trying to setup a new development store but everytime i tried 'shopify theme dev' command, i have the 422 API Error Message

 

jcs1
Shopify Partner
4 0 2

yojisekiya
Shopify Partner
5 0 3

Hi, any luck on this?  My friend got exactly the same problem.

Soundsprinkler
Visitor
2 1 2

This is an accepted solution.

Solved it by manually uploading the theme via the admin, logging out with the CLI and logging back in again but with the theme ID:

shopify theme dev --store {store} --theme {theme-id}

 

yojisekiya
Shopify Partner
5 0 3

Thank you so much, we tried your solution and it finally worked!

 

Your solution made a lot of sense because when we run

 

shopify theme info

 

we get

 

Development Theme ID Not set

 

which means we should set theme ID with

 

shopify theme dev
 

224294944-37333721-6fbb-4d02-9756-0e1d029869ca.png

elamtechllc
Shopify Partner
1 0 0

Brand new to shopify cli
Its crazy I was trying to do this, even thought it was staring right at face.

I didnt know how to set theme id.
Finally i did `shopify theme push` to get the theme id

And then I ran command by @Soundsprinkler 
Works now.