error: Client network socket disconnected before secure TLS connection was established

Hello! Today, when I ran the shopify theme pull command locally, it suddenly reported an error. It used to be fine before, what is the reason for this?

I tried switching my VPN and network, but neither worked.

4 Likes

echo the question

2 Likes

I also have this problem, has it been resolved?

2 Likes

Hi CryptoBear,

I haven’t seen this error before - have you tried logging out of your account via the CLI and then pulling again with the --store flag? Also, which version are you on - you might need to update?

I also have this problem. I tried the above operation but it didn’t work.

1 Like

I’m having this too, How did you resolve it

Same issue, it was happen in recently.

FetchError: request to

https://XXXX.myshopify.com/admin/api/2023-10/products.json?limit=5&published_status=published failed, reason:

Client network socket disconnected before secure TLS connection was established

If run shopify theme list, it shows:

request to https://XXXX.myshopify.com/admin/api/unstable/themes.j │

│ son?fields=id%2Cname%2Crole%2Cprocessing failed, reason: Client network socket │

│ disconnected before secure TLS connection was established

Hi @Liam , I have same type of issue like this, my project (base on remix template) working good before, but now when after run “npm run dev” then click the generated app preview URL, the remix server console output “FetchError: request to https://hellonick.myshopify.com/admin/api/2023-10/graphql.json failed, reason: Client network socket disconnected before secure TLS connection was established” error, there is some log as below:

I believe it’s occured during “authenticate.admin(request)” function call.

package.json info:

@shopify/app: V3.53.0

@shopify/cli: V3.53.0

@shopify/shopify-app-remix: V2.1.0

@shopify/shopify-api: V8.1.1

And, did Shopify recently changed some basic network service providers or not ? if yes, the issue maybe it’s related to it.

I have tried the method you said, and the above error phenomenon will still occur, which was discovered today.

Sorry, guys. This issue seems caused by our network firewall from 2024-01-04.

we fixed it by http_proxy or https_proxy terminal command. Hope it help other domestic bro.

How do I set up http_proxy, I set it up and it doesn’t seem to work.

1 Like

Still unable to run dev

Have you encountered this problem again today? I met again today

Hi folks - still looking into this with our internal teams. Will update asap.

1 Like

Hey, brother, I am using the node template development of the shopify app. I also had this error yesterday. After searching for some information, I found that someone on GitHub had a similar experience recently (https://github.com/Shopify/cli/issues/ 3225), my final solution is to find node-fetch in the project node modules and modify it through the https-proxy-agent package:

2 Likes

Hi FocuxPlus - are you using a VPN when you’re working with the CLI?

Hi Merci,

It’s possible this error is connected with using a VPN - when you’re working with the CLI, do you have a VPN enabled on your machine?

Same problem, I’m in China, whether using VPN or not, still get this error

request to https://xxxxxx.myshopify.com/admin/api/unstable/themes.j

│ son?fields=idxxxxx failed, reason: Client network │

│ socket disconnected before secure TLS connection was established

Hi, buddy. It’s caused by network, please refer to this ticket to fix it.

Hi Liam,

I am able to repro it with Postman desktop version (show above error) on Windows but the web version of Postman works fine (no error) and I think the web version goes through cloud. Web version is with web vpn on.

I think if you can try to catch the requests from above two different Postman methods on the server side, it might help.

Thanks and waiting for the fix.

Steven