Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

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

CryptoBear
Shopify Partner
1 0 4

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?

 

CryptoBear_0-1704422903315.png

 

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

Replies 28 (28)

Dan2712
Shopify Partner
6 0 3

echo the question

rikyriky
Shopify Partner
1 0 2

I also have this problem, has it been resolved?

Liam
Community Manager
3108 344 911

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?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

su-Eig
Shopify Partner
2 0 1

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

NickShi
Shopify Partner
26 3 4

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:

 

error.jpg

 

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.

- If helpful then please Likes and make it as a Solution.
- If you want to develop a store/app, or need custom software development services Email Me
NickShi
Shopify Partner
26 3 4

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.

- If helpful then please Likes and make it as a Solution.
- If you want to develop a store/app, or need custom software development services Email Me
uacc
Shopify Partner
5 0 1

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

Pinkman_Z
Shopify Partner
3 0 0

Still unable to run dev

Mr_L
Shopify Partner
1 0 2

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:image.pngimage1.png

Snipaste_2024-01-09_11-52-41.png

SylviaZ
Shopify Partner
6 0 0

Your method works. I finally managed to run the template project successfully.

Pinkman_Z
Shopify Partner
3 0 0

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

JohnnyChen
Shopify Partner
7 0 0

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

Shopify Developer

FocuxPlus
Shopify Partner
7 0 2

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       

UI & Web design lab | We have always been focused on plus the next idea. Passionate about using code for design.
Liam
Community Manager
3108 344 911

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

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

PPSpring
Visitor
1 0 0

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 

NickShi
Shopify Partner
26 3 4

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

- If helpful then please Likes and make it as a Solution.
- If you want to develop a store/app, or need custom software development services Email Me
Liam
Community Manager
3108 344 911

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

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

huahua007
Shopify Partner
6 0 0

Is there any solution to the same problem

Merci
Shopify Partner
1 0 0

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

Liam
Community Manager
3108 344 911

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?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

stevendai
Shopify Partner
2 0 0

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

tedisabear
Tourist
6 0 2

Hi Liam,

Yes, as Shopify site developmer in China, we have to work on VPN. While it was working well before Jan-4, I guess some upgrades in our national GFW caused this problem after Jan-5. Sadly, we can only search for help from the Shopify team, and we don't have words in front of our government.

tedisabear
Tourist
6 0 2

I just solved this by changing my VPN from V2Ray to WireGuard. WireGuard works because it detours every data packet from my PC to the remote server, while V2Ray doesn't. 

 

After setting up the WireGuard, remember to turn off the kill switch in WireGuard settings or you cannot access 127.0.0.1. 

JohnnyChen
Shopify Partner
7 0 0

Some developers have to use cli with proxy due to network environment, Can we support that?

Shopify Developer

nake
Shopify Partner
3 0 0

I have the same problem. It was resolved by use Clash Enhanced Mode.

jacofki
Visitor
1 0 0

Can you give me same explanation of how you did it? thanks

tian1
Shopify Partner
1 0 0

解决了吗

 

stevendai
Shopify Partner
2 0 0

need to use v2ray client with valid subscription with tls parameter turned on and https-proxy-client in node-fetch index.js together . Also when use npm start add parameter like this npm start  --tls-min-v1.3.