Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: theme dev proxy 502 on POST /account/login (regression of #3963?)

未关闭
#8,480 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
领域
cli

调研方向

首先,按照文档中记录的 store、theme 和 password 设置,通过 127.0.0.1:9292 上的 shopify theme dev 复现 POST /account/login 流程。跟踪报告的 fetch failed 响应周围的 theme dev 代理路径,并将其与 CLI 3.84.1 进行比较。完成的标准是:POST 及其跨域重定向能够通过代理完成,不出现 502,并保留客户会话。

由索引模型根据 Issue 内容生成。

描述

Environment
CLI version @shopify/cli@4.6.0
Node v24.14.1
OS macOS 15, also reproduced on Ubuntu 24.04 in GitHub Actions
Shop Shopify Plus, staging store on a password-protected primary domain
Summary

POST /account/login submitted to the local theme dev server (127.0.0.1:9292) fails at the CLI proxy with a 502 Bad Gateway, before the request reaches Shopify. This blocks any local automated flow (Playwright, WebdriverIO, curl) that needs a real customer session — the login form itself is unusable.

Looks like a possible regression of the (closed) #3963 which stated "It should work now no matter the version".

Error output

```
Failed to proxy request to /account/login with status 502 (Bad Gateway).
URL: https://.myshopify.com/account/login?_fd=0&pb=0

TypeError: fetch failed
at Object.processResponse (node:internal/deps/undici/undici:12793:20)
at node:internal/deps/undici/undici:13181:23
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at node:internal/deps/undici/undici:17409:7
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async Object.handler (file:///.../@shopify/cli/dist/chunk-Q7BOSHWX.js:7:6357)
at async Server. (file:///.../@shopify/cli/dist/chunk-Q7BOSHWX.js:7:9903)
```

Repro
  1. `shopify theme dev --store --theme --store-password `
  2. From any HTTP client: `POST http://127.0.0.1:9292/account/login\` with the standard storefront login form fields.
  3. The CLI logs the 502 above; the client sees a 502 response.
What we've tried
  • Both Playwright's `page.request.post` and real form submission via a browser navigation. Both fail identically — the failure is at the proxy, not the client.
  • Downgrading to `@shopify/cli@3.84.1`: this specific 502 does not occur, but the CLI then crashes with the (also known-broken) "Theme ID mismatch" bug during theme sync, so login can't complete for other reasons.
  • Bypass attempt: POST direct to the primary storefront domain and transplant the resulting `_shopify_essential` cookie onto `127.0.0.1`. Theme dev issues a new `_shopify_essential` on every proxied response and overwrites the injected value, so the logged-in session never reaches Shopify.
Impact

Any team running functional/end-to-end tests against `theme dev` that need a real customer session cannot do so today. The workaround suggested in similar older threads — pushing to a real dev theme and hitting the preview URL — is unworkable at CI scale for stores that hit the theme cap.

Ask

Whether the proxy's `fetch failed` path is a known/tracked regression, or if there's a supported configuration we're missing to keep POST → cross-domain-redirect flows working through 4.6.0.

主要语言
TypeScript
星标
750
派生
293
平均合并
3 天 20 小时
30 天内合并 PR
79

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Shopify/cli 的其他 Issue

查看 Shopify/cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。