[422] API request client error with Shopify CLI

AI-generated summary

Issue: After logging in with “shopify theme dev --store {store}”, users on Shopify CLI 3.44.1 repeatedly receive “[422] API request client error,” despite seeing “:check_mark: Logged in.” Logging out via “shopify auth logout” does not resolve it, and “shopify theme info” still shows they’re logged in and can push themes.

Context: Reported on macOS (darwin-arm64) with zsh, Node v19.7.0, Ruby 3.2.1. A screenshot indicates “Development Theme ID Not set,” suggesting no development theme is selected.

Resolution (confirmed by multiple users):

  • Ensure a development theme exists and pass its ID explicitly: “shopify theme dev --store {store} --theme {theme-id}”.
  • If you don’t have the ID, create/upload a theme first (e.g., “shopify theme push”) to obtain the theme ID, or upload via the Shopify admin, then rerun the dev command with --theme.
  • One user referenced an external post with additional details.

Outcome: Setting/using a valid Development Theme ID resolves the 422 error for affected users. No official root cause or Shopify-side fix noted; the thread appears resolved by the workaround.

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?

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

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

I’ve managed to solve it this morning.

All details here : https://community.shopify.com/post/1976188

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

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}

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

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.