Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: <The Theme Kit Admin GraphQL API responded unsuccessfully with the HTTP status 502> #5044

Closed
2 tasks done
leomafraa opened this issue Dec 5, 2024 · 1 comment
Closed
2 tasks done
Labels
Type: Bug Something isn't working

Comments

@leomafraa
Copy link

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

I am trying to execute a GitHub Action to create a new theme in my Shopify store. Below is the configuration of my action.yml file:

name: Create Release
on:
push:
tags:
- 'v*'

jobs:
create-release:
name: Create Release
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v4

  - name: Setup Node
    uses: actions/setup-node@v4
    with:
      node-version-file: '.nvmrc'
  
  - name: Setup Ruby
    uses: ruby/setup-ruby@v1
    with:
      ruby-version: 3.1
      bundler: 'latest'
  
  - name: Install Shopify CLI
    run: npm install -g @shopify/cli @shopify/theme
  
  - name: Pull Theme Content
    env:
      SHOPIFY_FLAG_STORE: '${{ secrets.PROD_STORE }}'
      SHOPIFY_CLI_THEME_TOKEN: ${{ secrets.PROD_THEME_ACCESS }}
      SHOPIFY_FLAG_PATH: ./src
      SHOPIFY_CLI_TTY: 0
      SHOPIFY_FLAG_VERBOSE: 1
    run: shopify theme pull --live --only templates/*.json --only config/settings_data.json
  
  - name: Install dependencies
    run: npm ci
  
  - name: Build
    run: npm run build
  
  - name: Create Release Theme
    env:
      SHOPIFY_FLAG_STORE: '${{ secrets.PROD_STORE }}'
      SHOPIFY_CLI_THEME_TOKEN: ${{ secrets.PROD_THEME_ACCESS }}
      SHOPIFY_FLAG_PATH: ./dist
      SHOPIFY_CLI_TTY: 0
      SHOPIFY_FLAG_VERBOSE: 1
      SHOPIFY_FLAG_JSON: 1
    run: shopify theme push --unpublished --theme 'Release ${{github.ref_name}}' --verbose

This configuration checks out the code, sets up Node and Ruby, installs Shopify CLI, pulls the theme content, installs dependencies, builds the project, and finally pushes the theme to Shopify as a release.

Actual behavior

When I make a request to:
https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json

to create a new theme using GitHub Actions, I encounter the following error:

The Admin GraphQL API responded unsuccessfully with the HTTP status 502.

Running shopify theme push --unpublished --theme ‘Release v2.5.3’ --verbose on my local terminal works well

This issue started occurring two days ago.

Verbose output

2024-12-05T19:31:47.084Z: Request to https://theme-kit-access.shopifyapps.com/cli/admin/api/2024-10/graphql.json completed in 14644 ms
With response headers:

  • cache-control: no-cache
  • content-type: text/html
  • server-timing: processing;dur=10402, socket_queue;dur=10.686, cfRequestDuration;dur=10595.999956
  • x-request-id: 92f0bef4-6212-4502-8582-844d45d14e88-1733427096

╭─ error ──────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ The Admin GraphQL API responded unsuccessfully with the HTTP status 502 │
│ and errors: │
│ │
│ {} │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯

2024-12-05T19:31:47.121Z:
Running system process:
· Command: npm prefix
· Working directory: /home/runner/work/shopify/shopify

╭─ error ──────────────────────────────────────────────────────────────────────╮
│ │
│ │
│ The Admin GraphQL API responded unsuccessfully with the HTTP status 502 │
│ and errors: │
│ │
│ {} │
│ │
│ │
╰──────────────────────────────────────────────────────────────────────────────╯

Reproduction steps

  1. Create an action to generate a new theme.
  2. Execute the action and check if the error occurs.

Operating System

ubunto 24.10

Shopify CLI version (shopify --version)

3.71.3

Shell

No response

Node version (run node -v if you're not sure)

No response

What language and version are you using in your application?

No response

@leomafraa leomafraa added the Type: Bug Something isn't working label Dec 5, 2024
@phv-ppuente
Copy link

Duplicate of #5031. The temporary workaround is to downgrade to 3.70.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants