422 API Request Client Error from Shopify CLI in CI/CD Pipeline

422 API Request Client Error from Shopify CLI in CI/CD Pipeline

phv-ppuente
Shopify Partner
3 0 0

I have been using the Shopify CLI in Github Actions to automatically deploy changes to a development theme for testing when a developer opens a pull request. It's been working great for months, but today all deployments started failing with the error message "[422] API request client error".

 

I've configured the following environment variables per Shopify's article (https://shopify.dev/docs/themes/tools/cli/ci-cd)

 

SHOPIFY_FLAG_STORE

SHOPIFY_CLI_THEME_TOKEN

- SHOPIFY_CLI_TTY

 

When I run "shopify theme push --development --verbose", this is the output:

 

2023-03-29T19:51:15.652Z: Running command theme push
shopify:theme:push init version: @oclif/core@2.1.4 argv: [ '--development', '--verbose' ] +0ms
2023-03-29T19:51:15.681Z: Ensuring that the user is authenticated with the Theme API with the following scopes:
[]

2023-03-29T19:51:15.682Z: Getting development theme...
2023-03-29T19:51:16.045Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/unstable/themes.json completed in 351 ms
With response headers:
- cache-control: no-cache
- content-type: application/json; charset=utf-8
- x-request-id: fbed7947-5295-42da-af42-2960fc3495df

╭─ ──╮
│ e │
│ r │
│ r │
│ o │
│ r │
│ │
│ │
│ │
│ │
│ [ │
│ 4 │
│ 2 │
│ 2 │
│ ] │
│ │
│ A │
│ P │
│ I │
│ │
│ r │
│ e │
│ q │
│ u │
│ e │
│ s │
│ t │
│ │
│ c │
│ l │
│ i │
│ e │
│ n │
│ t │
│ │
│ e │
│ r │
│ r │
│ o │
│ r │
│ │
╰────╯

2023-03-29T19:51:16.164Z: Unable to log analytics event - no information on executed command
Error: Process completed with exit code 1.

I updated the Theme Access password in the pipeline to no effect.

 

Interestingly, when I configure my local environment to use the same theme access password and environment variables, the theme pushes with no issue.

Replies 0 (0)