Skip to content

Support SHOPIFY_HTTP(S)_PROXY usage in theme commands #5890

Closed

Description

@reeswell

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

The CLI should successfully render the storefront through the configured HTTP proxy.

Actual behavior

The CLI fails to render the storefront with a 502 Bad Gateway error, despite proper proxy configuration.

Verbose output

Verbose output
Failed to render storefront with status 502 (Bad Gateway).
URL: [REDACTED]

TypeError: fetch failed
  at node:internal/deps/undici/undici:13510:13
  at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
  at async render2 [...]
  at async Object.handler [...]
  at async Server.<anonymous> [...]

Reproduction steps

1.Set HTTP proxy environment variables:

$env:SHOPIFY_HTTP_PROXY = "http://127.0.0.1:PORT"
$env:SHOPIFY_HTTPS_PROXY = "http://127.0.0.1:PORT"
2.Run shopify theme dev -e development
3.CLI starts successfully and provides preview URLs
4.Immediately encounters 502 Bad Gateway error

### Operating System

Windows 11

### Shopify CLI version (`shopify --version`)

@shopify/cli/0.0.0-snapshot-20250313171017

### Shell

powershell

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

v22.15.1

### What language and version are you using in your application?

_No response_

Activity

  1. added
    Type: Bug
    on May 23, 2025
  2. jpallard6120 commented on May 26, 2025

    @jpallard6120

    I have the exact same error here. Log output identical to @reeswell.

    • WSL 2 on Windows 10
    • @shopify/cli/3.80.7 wsl-x64 node-v24.1.0
  3. jpallard6120 commented on May 26, 2025

    @jpallard6120

    I have the exact same error here. Log output identical to @reeswell.

    • WSL 2 on Windows 10
    • @shopify/cli/3.80.7 wsl-x64 node-v24.1.0

    Removing a plugin through shopify plugin reset solved the issue for me.

  4. reeswell commented on May 27, 2025

    @reeswell
    Author

    I have the exact same error here. Log output identical to @reeswell.

    • WSL 2 on Windows 10
    • @shopify/cli/3.80.7 wsl-x64 node-v24.1.0

    Removing a plugin through shopify plugin reset solved the issue for me.

    Thank you for your response. However, when I tried shopify plugins reset, it shows "Found 0 plugin" and the issue still persists.

    Here's what I've tried:

    1. Ran shopify plugins reset -> Result: "Found 0 plugin"
    2. Completely uninstalled and reinstalled Shopify CLI
    3. Cleared npm cache and configurations

    My environment:

    • WSL 2 on Windows 11
    • @shopify/cli/3.53.0
    • Node.js v22.15.1
      • Theme: Liquid theme
  5. added
    Area: @shopify/theme
    on Jun 12, 2025
  6. charlespwd commented on Jun 12, 2025

    @charlespwd
    Contributor

    Do you have docs for the SHOPIFY_HTTP_PROXY? Couldn't find anything.

  7. added
    Area: @shopify/cli
    Area: @shopify/cli-kit
    and removed
    Area: @shopify/theme
    on Jun 12, 2025
  8. charlespwd commented on Jun 12, 2025

    @charlespwd
    Contributor

    Looks l like a CLI core/kit issue

  9. reeswell commented on Jun 19, 2025

    @reeswell
    Author

    Do you have docs for the SHOPIFY_HTTP_PROXY? Couldn't find anything.

    #5520

  10. fredmanxu commented on Jul 5, 2025

    @fredmanxu

    Same error, How did you finally solve it?

  11. HowardTangOvO commented on Jul 7, 2025

    @HowardTangOvO

    Same error, Is there any solution for this?

  12. cmoaciopm commented on Aug 3, 2025

    @cmoaciopm

    Same error. Any update for this issue?

  13. wmlutz commented on Aug 8, 2025

    @wmlutz

    I am also having this problem. I'm commenting so I get notifications if an answer pops up.

  14. 12 remaining items

  15. github-actions commented on Jan 22, 2026

    @github-actions
    Contributor

    This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
    → If there's no activity within a week, then a bot will automatically close this.
    Thanks for helping to improve Shopify's dev tooling and experience.

    P.S. You can learn more about why we stale issues here.

  16. changed the title [-]502 Bad Gateway Error When Using HTTP Proxy with `shopify theme dev`[/-] [+]Support SHOPIFY_HTTP(S)_PROXY usage in theme commands[/+] on Jan 22, 2026
  17. github-actions commented on Mar 6, 2026

    @github-actions
    Contributor

    This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
    → If there's no activity within a week, then a bot will automatically close this.
    Thanks for helping to improve Shopify's dev tooling and experience.

    P.S. You can learn more about why we stale issues here.

  18. YoniChechik commented on Aug 18, 2026

    @YoniChechik

    still exists- please reopen @graygilmore

  19. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
    → If there's no activity within a week, then a bot will automatically close this.
    Thanks for helping to improve Shopify's dev tooling and experience.

    P.S. You can learn more about why we stale issues here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: @shopify/cliArea: @shopify/cli-kitArea: @shopify/themeType: Bugno-issue-activity

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions