Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug?]: Internal Error: Error when performing the request #201

Open
ChangYinHan opened this issue Oct 26, 2022 · 13 comments
Open

[Bug?]: Internal Error: Error when performing the request #201

ChangYinHan opened this issue Oct 26, 2022 · 13 comments

Comments

@ChangYinHan
Copy link

ChangYinHan commented Oct 26, 2022

I install the node v16.18.0 and enable the corepack as the guide at https://yarnpkg.com/getting-started/install.
And the following error show when I try to run yarn help on my windows 10.

Internal Error: Error when performing the request
    at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\corepack\dist\corepack.js:16064:20)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:494:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Is there anyone who can help me? thanks.

@hojas
Copy link

hojas commented Oct 26, 2022

+1

@Inirit
Copy link

Inirit commented Nov 9, 2022

EDIT: This did not repro for me when I downgraded to v16.18.1, so my repro may not be the same as the original issue despite the surface level error message being the same. I currently suspect my problem has to do with new requirements imposed by OpenSSL 3.0 that my corporate network is incompatible with.

I am having a potentially similar problem, though I am using node v18.12.1 (the latest LTS). I'm trying to enable yarn for my project, but when I run "corepack prepare yarn@stable --activate" I get this same error. I am also running Windows 10.

Since the error is so vague I went in to my local corepack.js script and added some print statements just before the error gets logged and this is what I get:

url: https://repo.yarnpkg.com/tags
Error: write EPROTO C0590000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:c:\ws\deps\openssl\openssl\ssl\statem\extensions.c:922:

    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) {
  errno: -4046,
  code: 'EPROTO',
  syscall: 'write'
}

@xwnwho
Copy link

xwnwho commented Jan 17, 2023

same situation.

@gedw99
Copy link

gedw99 commented Feb 1, 2023

same on mac..

@merceyz here is a full repo of what i am getting on a clean machine

makefile:



print:
	@echo ""
	@echo "make:                $(shell which make)"
	@echo "vscode:              $(shell which code)"
	@echo ""
	@echo "-- docker --"
	@echo "docker:              $(shell which docker)"
	@echo "colima:              $(shell which colima)"
	@echo ""
	@echo "-- yarn --"
	@echo "corepack:            $(shell which corepack)"
	@echo "corepack version:    $(shell corepack -v)"
	@echo "node:                $(shell which node)"
	@echo "node version:        $(shell node -v)"
	@echo "yarn:                $(shell which yarn)"
	@echo "yarn version:        $(shell yarn -v)"


dep:
        brew install corepack
    

init:
       corepack enable
       corepack prepare [email protected] --activate

make dep:

brew install corepack
==> Fetching dependencies for corepack: brotli, c-ares, icu4c, libuv and node
==> Fetching brotli
==> Downloading https://ghcr.io/v2/homebrew/core/brotli/manifests/1.0.9
Already downloaded: /Users/gwed/Library/Caches/Homebrew/downloads/922ce7b351cec833f9bd2641f27d8ac011005f8b1f7e1119b8271cfb4c0d3cd7--brotli-1.0.9.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/brotli/blobs/sha256:ed4f61a9dc166cb1241e6b0a890298789eb564bfac1b4438ebe8ddf3d2632662
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ed4f61a9dc166cb1241e6b0a890298789eb564bfac1b4438ebe8ddf3d2632662?se=2023-02-01T16%3A2
######################################################################## 100.0%
==> Fetching c-ares
==> Downloading https://ghcr.io/v2/homebrew/core/c-ares/manifests/1.19.0
Already downloaded: /Users/gwed/Library/Caches/Homebrew/downloads/7b6b0cb27c88e80486428502e6762e6520224b4dceec6c7b6b750e0cc15cc332--c-ares-1.19.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/c-ares/blobs/sha256:0830e352c2b4ee35920c8f8729b62bae6d6b22413b8209fd687a07b0e08b396d
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:0830e352c2b4ee35920c8f8729b62bae6d6b22413b8209fd687a07b0e08b396d?se=2023-02-01T16%3A2
######################################################################## 100.0%
==> Fetching icu4c
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/manifests/72.1
Already downloaded: /Users/gwed/Library/Caches/Homebrew/downloads/adaa2fd48ef337b5bfee51ed8902dab61120bb41bd18f98eb20e744fdd5548c1--icu4c-72.1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/blobs/sha256:ecb91e87e3e4d075e3e1392b8ec7dc6774bec47f4b534d318f2ec259052b10e4
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ecb91e87e3e4d075e3e1392b8ec7dc6774bec47f4b534d318f2ec259052b10e4?se=2023-02-01T16%3A2
######################################################################## 100.0%
==> Fetching libuv
==> Downloading https://ghcr.io/v2/homebrew/core/libuv/manifests/1.44.2-1
Already downloaded: /Users/gwed/Library/Caches/Homebrew/downloads/3f61296b9c87afe5cce06081875358b0b5661429cb5ac29e0078700e2ccbd0b9--libuv-1.44.2-1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/libuv/blobs/sha256:d3cc5bca7fe7512842102366b45b1948099eb8c24ab53093821295586b2de76d
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:d3cc5bca7fe7512842102366b45b1948099eb8c24ab53093821295586b2de76d?se=2023-02-01T16%3A2
######################################################################## 100.0%
==> Fetching node
==> Downloading https://ghcr.io/v2/homebrew/core/node/manifests/19.5.0
Already downloaded: /Users/gwed/Library/Caches/Homebrew/downloads/b6b9fda78ce61d065db5bf36bbdaadb7a49c5c586ee6db206252ca8419db0b74--node-19.5.0.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/node/blobs/sha256:111b207a4973969cc330ee2e43d8db585e2935326cb4c48c2a50eb05d4195be6
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:111b207a4973969cc330ee2e43d8db585e2935326cb4c48c2a50eb05d4195be6?se=2023-02-01T16%3A2
######################################################################## 100.0%
==> Fetching corepack
==> Downloading https://ghcr.io/v2/homebrew/core/corepack/manifests/0.15.3
Already downloaded: /Users/gwed/Library/Caches/Homebrew/downloads/1c3599bb3ff4a893a04c6287ef3fc3bd860aa99a3804300d8a8978139e73be81--corepack-0.15.3.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/corepack/blobs/sha256:4a91c6b4f7cb944bd62623c267730422913b9351bea68a85e52fcb949783d590
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:4a91c6b4f7cb944bd62623c267730422913b9351bea68a85e52fcb949783d590?se=2023-02-01T16%3A2
######################################################################## 100.0%
==> Installing dependencies for corepack: brotli, c-ares, icu4c, libuv and node
==> Installing corepack dependency: brotli
==> Pouring brotli--1.0.9.ventura.bottle.tar.gz
🍺  /usr/local/Cellar/brotli/1.0.9: 25 files, 2.3MB
==> Installing corepack dependency: c-ares
==> Pouring c-ares--1.19.0.ventura.bottle.tar.gz
🍺  /usr/local/Cellar/c-ares/1.19.0: 87 files, 655.7KB
==> Installing corepack dependency: icu4c
==> Pouring icu4c--72.1.ventura.bottle.tar.gz
🍺  /usr/local/Cellar/icu4c/72.1: 263 files, 77.8MB
==> Installing corepack dependency: libuv
==> Pouring libuv--1.44.2.ventura.bottle.1.tar.gz
🍺  /usr/local/Cellar/libuv/1.44.2: 51 files, 3.5MB
==> Installing corepack dependency: node
==> Pouring node--19.5.0.ventura.bottle.tar.gz
🍺  /usr/local/Cellar/node/19.5.0: 2,153 files, 55.9MB
==> Installing corepack
==> Pouring corepack--0.15.3.all.bottle.tar.gz
🍺  /usr/local/Cellar/corepack/0.15.3: 69 files, 2.4MB
==> Running `brew cleanup corepack`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

make print:

make:                /usr/local/opt/make/libexec/gnubin/make
vscode:              /usr/local/bin/code

-- docker --
docker:              /usr/local/bin/docker
colima:              /usr/local/bin/colima

-- yarn --
corepack:            /usr/local/bin/corepack
corepack version:    0.15.3
node:                /usr/local/bin/node
node version:        v19.5.0
yarn:                /usr/local/bin/yarn
yarn version:        Internal Error: Error when performing the request     at ClientRequest.<anonymous> (/usr/local/Cellar/corepack/0.15.3/libexec/lib/node_modules/corepack/dist/corepack.js:16073:20)     at ClientRequest.emit (node:events:512:28)     at TLSSocket.socketErrorListener (node:_http_client:496:9)     at TLSSocket.emit (node:events:512:28)     at emitErrorNT (node:internal/streams/destroy:151:8)     at emitErrorCloseNT (node:internal/streams/destroy:116:3)     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

make init:

corepack prepare [email protected] --activate
Preparing [email protected] for immediate activation...
Internal Error: Error when performing the request
    at ClientRequest.<anonymous> (/usr/local/Cellar/corepack/0.15.3/libexec/lib/node_modules/corepack/dist/corepack.js:16073:20)
    at ClientRequest.emit (node:events:512:28)
    at TLSSocket.socketErrorListener (node:_http_client:496:9)
    at TLSSocket.emit (node:events:512:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

@DLLluoluo
Copy link

+1

@bamf2077
Copy link

bamf2077 commented Mar 21, 2023

Same error, but it was ok when I turned on the VPN/proxy and re-run the command corepack prepare ***. There is TLSSocket in the error message, may it's your network problem in mainland China.

我也遇到了这个问题,但当我挂梯子后,重新运行 corepack prepare *** 命令就能用了。错误信息里写了 TLSSocket,应该就是大陆局域网问题。

@toFrankie

This comment was marked as off-topic.

@eh-klunscher
Copy link

I faced this fault on a machine which had an IPv6 only. Adding an IPv4 to establish communication solved the problem for me.

@from-nobody
Copy link

from-nobody commented Jun 1, 2023

Same error, but it was ok when I turned on the VPN/proxy and re-run the command corepack prepare ***. There is TLSSocket in the error message, may it's your network problem in mainland China.

我也遇到了这个问题,但当我挂梯子后,重新运行 corepack prepare *** 命令就能用了。错误信息里写了 TLSSocket,应该就是大陆局域网问题。

I am running the command 'corepack prepare yarn@ --activate' in my office network environment.It definitely needs network proxy to run it and I did set the proxy(configured by company) for my cmd, it still didn't work though.But I could use google and visit supposed to be banned websites with my proxy.I don't know what's going wrong.By the way, it works at home.

請問是自己配置的vpn代理嗎?我在自己家裡安裝沒有任何問題,在公司的網絡就不行,但是公司的網絡明明也是配置的代理啊~我的錯誤信息裡面也是有"TLSSocket".

Update:
I checked my yarn back at home, it doesn't set any proxy, everything goes smoothly. And in my office, I upgrade node to 18.xx and configure yarn proxy so that corepack of 0.17 version can be able to link the network.

@bamf2077
Copy link

Same error, but it was ok when I turned on the VPN/proxy and re-run the command corepack prepare ***. There is TLSSocket in the error message, may it's your network problem in mainland China.
我也遇到了这个问题,但当我挂梯子后,重新运行 corepack prepare *** 命令就能用了。错误信息里写了 TLSSocket,应该就是大陆局域网问题。

I am running the command 'corepack prepare yarn@ --activate' in my office network environment.It definitely needs network proxy to run it and I did set the proxy(configured by company) for my cmd, it still didn't work though.But I could use google and visit supposed to be banned websites with my proxy.I don't know what's going wrong.By the way, it works at home.

請問是自己配置的vpn代理嗎?我在自己家裡安裝沒有任何問題,在公司的網絡就不行,但是公司的網絡明明也是配置的代理啊~我的錯誤信息裡面也是有"TLSSocket".

Update: I checked my yarn back at home, it doesn't set any proxy, everything goes smoothly. And in my office, I upgrade node to 18.xx and configure yarn proxy so that corepack of 0.17 version can be able to link the network.

I think this error of corepack occurs randomly. I can download package managers successfully without a proxy on my office's Windows computer, but the subsystem for Linux on this computer keeps failing to download, and it's useless no matter the proxy is on or off.

我甚至认为能不能遇到 corepack 的这个错误完全随机,我在公司的 Windows 电脑上不用代理也可以正常下载包管理器,但是这台电脑上的 Linux 子系统就一直下载失败,挂了代理也没用。

@movahhedi
Copy link

I too have this problem.
Although curl runs fine, but using node to fetch the URL fails.

fetch("https://repo.yarnpkg.com/4.2.2/packages/yarnpkg-cli/bin/yarn.js")
Uncaught TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11576:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  cause: ConnectTimeoutError: Connect Timeout Error
      at onConnectTimeout (node:internal/deps/undici/undici:8522:28)
      at node:internal/deps/undici/undici:8480:50
      at Immediate._onImmediate (node:internal/deps/undici/undici:8511:13)
      at process.processImmediate (node:internal/timers:476:21)
      at process.topLevelDomainCallback (node:domain:161:15)
      at process.callbackTrampoline (node:internal/async_hooks:128:24) {
    code: 'UND_ERR_CONNECT_TIMEOUT'
  }
}

@cliffAtOsaic
Copy link

+1

@linghengqian
Copy link

  • About 3 years ago, cloud servers in some regions, including Guangdong, China, began to block direct access to https://registry.npmjs.org . This is mentioned in cannot install pnpm  #535 .

  • This makes the current issue appear to be opened in the wrong place, because corepack does not maintain the npmjs.org website.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests