hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

Client network socket disconnected before secure TLS connection was established

Open Guo8a opened this issue 1 year ago • 1 comments

What is the location of your example repository?

At my local folder

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

"@remix-run/react": "^2.8.0", "@remix-run/server-runtime": "^2.8.0", "@shopify/cli": "3.60.0", "@shopify/cli-hydrogen": "^8.0.4", "@shopify/hydrogen": "2024.4.2", "@shopify/remix-oxygen": "^2.0.4", "graphql": "^16.6.0", "graphql-tag": "^2.12.6", "isbot": "^3.8.0", "react": "^18.2.0", "react-dom": "^18.2.0"

What version of Remix are you using?

"@remix-run/react": "^2.8.0", "@remix-run/server-runtime": "^2.8.0",

Steps to Reproduce

  1. npm create @shopify/hydrogen@latest -- --quickstart
  2. cd hydrogen-quickstart
  3. npm install
  4. npm run dev

There is nothing wrong with the above steps, and I can run the project perfectly and can see the content at localhost:3000.

continue:

npx shopify hydrogen link

Something error occured:

FetchError: request to 
    https://***.myshopify.com/admin/api/unstable/graphql.json failed, reason: 
    Client network socket disconnected before secure TLS connection was established
    Code: ECONNRESET

I'm in China mainland, can't visit shopify resource... https://github.com/Shopify/cli/issues/3225#issuecomment-1879660279 Is there anyway to fix the problem... I want link my shopify use hydrogen. Thanks >_<

Expected Behavior

link shopify success

Actual Behavior

at above

Guo8a avatar May 22 '24 07:05 Guo8a

Mmmm ...

From the looks of it, it is still part of Shopify CLI issue. Hydrogen CLI makes a request to the admin api. This uses the graphqlRequest which uses a httpAgent that isn't wrapped by the HttpsProxyAgent work around that was proposed in the other issue thread.

wizardlyhel avatar May 23 '24 23:05 wizardlyhel

Closing due to no response. Please re-open if still an issue.

blittle avatar Jul 18 '24 20:07 blittle

I am also experiencing this issue . same situation i am in China. when i attempt to link while creating a new project i get error message

`xS [FetchError]: request to https://relxint.myshopify.com/admin/api/unstable/graphql.json failed, reason: Client network socket disconnected before secure TLS connection was established at ClientRequest. (file:///Volumes/macpower/.npm/_npx/e1eac94ad41cc36f/node_modules/@shopify/create-hydrogen/dist/chunk-NIHY2BIB.js:823:300772) at ClientRequest.emit (node:events:507:28) at ClientRequest.emit (node:domain:489:12) at emitErrorEvent (node:_http_client:104:11) at TLSSocket.socketErrorListener (node:_http_client:518:5) at TLSSocket.emit (node:events:507:28) at TLSSocket.emit (node:domain:489:12) at emitErrorNT (node:internal/streams/destroy:170:8) at emitErrorCloseNT (node:internal/streams/destroy:129:3) at process.processTicksAndRejections (node:internal/process/task_queues:90:21) { type: 'system', errno: 'ECONNRESET', code: 'ECONNRESET' }

Node.js v23.11.0 npm error code 1 npm error path /Volumes/macpower/Documents/RelxGlobal npm error command failed npm error command sh -c create-hydrogen npm error A complete log of this run can be found in: /Volumes/macpower/.npm/_logs/2025-05-21T10_56_29_707Z-debug-0.log`

jbawsume avatar May 21 '25 11:05 jbawsume