workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

Fetch failed: SSL_WRONG_VERSION_NUMBER

Open ResetPower opened this issue 2 years ago • 7 comments

What version of Wrangler are you using?

2.0.22

What operating system are you using?

macOS 12.3

Describe the Bug

> wrangler dev

 ⛅️ wrangler 2.0.22 
--------------------
⬣ Listening at http://localhost:8787
TypeError: fetch failed
    at Object.processResponse (/path/to/my-project/node_modules/wrangler/wrangler-dist/cli.js:74624:34)
    at /path/to/my-project/node_modules/wrangler/wrangler-dist/cli.js:74946:42
    at node:internal/process/task_queues:141:7
    at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:138:8)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  cause: [Error: 4569945600:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:332:
  ] {
    library: 'SSL routines',
    function: 'ssl3_get_record',
    reason: 'wrong version number',
    code: 'ERR_SSL_WRONG_VERSION_NUMBER'
  }
}
Something went wrong:
TypeError: fetch failed
    at Object.processResponse (/path/to/my-project/node_modules/wrangler/wrangler-dist/cli.js:74624:34)
    at /path/to/my-project/node_modules/wrangler/wrangler-dist/cli.js:74946:42
    at node:internal/process/task_queues:141:7
    at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
    at AsyncResource.runMicrotask (node:internal/process/task_queues:138:8)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

✘ [ERROR] fetch failed

ResetPower avatar Jul 19 '22 10:07 ResetPower

Hi @ResetPower - thanks for posting this issue. In order to help us resolve it, could you provide a runnable example of this problem that we could reproduce locally? Ideally a Wrangler project with appropriate wrangler.toml and source code, that we can run ourselves.

petebacondarwin avatar Jul 19 '22 10:07 petebacondarwin

I just created a new project using wrangler init without any modification

wrangler.toml

name = "my-project"
main = "src/index.ts"
compatibility_date = "2022-07-19"

ResetPower avatar Jul 19 '22 11:07 ResetPower

I unset environment variable $HTTP_PROXY $HTTPS_PROXY $http_proxy $https_proxy, and I met the problem below

✘ [ERROR] Error while creating remote dev session: TypeError: fetch failed

      at Object.processResponse
  (/path/to/my-project/node_modules/wrangler/wrangler-dist/cli.js:74624:34)
      at
  /path/to/my-project/node_modules/wrangler/wrangler-dist/cli.js:74946:42
      at node:internal/process/task_queues:141:7
      at AsyncResource.runInAsyncScope (node:async_hooks:202:9)
      at AsyncResource.runMicrotask (node:internal/process/task_queues:138:8)
      at processTicksAndRejections (node:internal/process/task_queues:96:5) {
    cause: ConnectTimeoutError: Connect Timeout Error
        at Timeout.onConnectTimeout [as _onTimeout]
  (/path/to/my-project/node_modules/wrangler/wrangler-dist/cli.js:69093:28)
        at listOnTimeout (node:internal/timers:561:11)
        at processTimers (node:internal/timers:502:7) {
      code: 'UND_ERR_CONNECT_TIMEOUT'
    }
  }

ResetPower avatar Jul 19 '22 12:07 ResetPower

This definitely looks like an issue with your proxy. Try leaving just HTTP_PROXY and see if you still have the problem? Do other commands like wrangler whoami work?

threepointone avatar Jul 19 '22 15:07 threepointone

Leaving just HTTP_PROXY and still have the problem. wrangler whoami works normally.

ResetPower avatar Jul 20 '22 02:07 ResetPower

I had the same problem: [ERROR] Error while creating remote dev session: TypeError: fetch failed。 I use this template and add my own account_id. https://github.com/flareact/flareact-template

attraction11 avatar Aug 11 '22 06:08 attraction11

Leaving just HTTP_PROXY and still have the problem. wrangler whoami works normally.

Hi, is there any progress?

attraction11 avatar Aug 11 '22 06:08 attraction11

wrangler dev does not support proxies, wrangler dev --local should fix it temporarily.

Adding this to the backlog.

rozenmd avatar Aug 31 '22 14:08 rozenmd

thank you!

superorange avatar Oct 17 '22 12:10 superorange