Unable to use 'shopify theme dev' socket disconnected before secure TLS connection was established

I’m encountering an issue when trying to use Shopify CLI to start the theme development mode.
error details in the attached screenshot below


develop environment:

Shopify CLI    3.69.2
OS             windows-amd64
Node version   v20.15.0
Ruby version   3.3.5

Has anyone experienced this issue before? Any suggestions on how to resolve this?

Thanks in advance for your help!

Did you try running the command again?

That reads like your network got disconnected when you were trying to fetch X resource.

I also feel like I have seen it before but it was weeks ago and I did not note what/when it worked again…

Anyway, if you do get it to work on your end, please share here the solution so that we can benefit from checking back here if we ever run into it. Thanks in advance! :muscle:

2 Likes

I also have this issue,how did you slove it? I have try to use VPN but did not work either.

Actually, I haven’t been able to solve this problem yet. I have tried using VPN and lowering the version of Shopify CLI, but none of these have worked

same issue, when try to pull theme, anyone resolved ?

Hi everyone,

I’m encountering a persistent issue when trying to run shopify theme dev for my development store, and I’m hoping someone can help debug it.

Problem

When I run:
shopify theme dev
The CLI hangs for a few seconds, then returns this error:
request to https://xxxxxx.myshopify.com/admin/api/2025-04/graphql.json failed, reason: Client network socket disconnected before secure TLS connection was established

This happens consistently. Sometimes the initial connection works (via curl), but subsequent ones fail with a TLS error:
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL

What I’ve Tried

  • Switched Node versions via nvm:
    • Node 22.14.0
    • Node 20.19.2
    • Node 18.20.4 (recommended)
  • Reinstalled @shopify/cli and ensured it’s global and updated.
  • Installed latest npm.
  • Used DEBUG=* to trace CLI — confirms TLS issue during theme sync.
  • Cleared DNS cache, restarted system.
  • Tried from different Shopify stores (same issue).
  • Verified store is accessible via browser and initial curl -I request.
  • Tried different networks (no VPN or firewall interfering).
  • Updated and relinked curl using brew install curl.
  • Exported NODE_OPTIONS=“–tls-min-v1.2” to enforce TLS settings.

Notes

  • This began after upgrading Node and reinstalling the CLI.
  • I am on macOS and using the CLI globally via nvm.

Any insights into what might be causing this TLS failure from the CLI, or how to further diagnose it, would be greatly appreciated.

Thanks in advance!