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

[Remote Tunnel] Cannot connect to tunnel though proxy because of socket hang up #10636

Open
antoinetran opened this issue Jan 16, 2025 · 3 comments

Comments

@antoinetran
Copy link

  • VSCode Version:1.95.3
  • VS Code Remote Tunnel 1.5.2
  • Local OS Version: Windows 10
  • Remote OS Version: Debian 12
  • Remote Extension/Connection Type: Dev Containers/WSL/Remote - Tunnels/VS Code Server
  • Logs:
2025-01-16 14:38:04.754 15:50 16/01/2025[error] Error: socket hang up
	at re.from (c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:940980)
	at w.<anonymous> (c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:963273)
	at w.emit (node:events:531:35)
	at h.forEach.d.<computed> (c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:680126)
	at ClientRequest.emit (node:events:519:28)
	at emitErrorEvent (node:_http_client:101:11)
	at Socket.socketOnEnd (node:_http_client:528:5)
	at Socket.emit (node:events:531:35)
	at endReadableNT (node:internal/streams/readable:1696:12)
	at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
	at At.request (c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:971833)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async E.axiosRequest (c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:75388)
	at async E.request (c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:76034)
	at async E.sendRequest (c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:69974)
	at async E.listTunnels (c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:64683)
	at async c:\Users\username\.vscode\extensions\ms-vscode.remote-server-1.5.2\dist\node\extension.js:2:1201977
	at async Y0.h (file:///c:/Users/username/Custom/app/vscode/VSCode-win32-x64-1.95.3/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:114:32825)
	at async Promise.all (index 1)
	at async t.RemoteTreeDataProvider.refreshTunnels (c:\Users\username\.vscode\extensions\ms-vscode.remote-explorer-0.4.3\dist\node\extension.js:1:7783)
	at async Promise.all (index 0)

Steps to Reproduce:

  1. install VS Code Remote Tunnel
    2.configure in Windows env for the account http_proxy and https_proxy
    3 follow VS Code Remote Tunnel doc about creating a tunnel through github.com

Note: we have a corporate proxy that does MTIM. Self-signed certificates are deployed at OS level.

@antoinetran
Copy link
Author

Image

@antoinetran
Copy link
Author

I also get these


2025-01-16 17:06:13.222 [info] ExtensionService#_doActivateExtension ms-vscode.remote-server, startup: false, activationEvent: 'onCommand:remote-tunnels.connectCurrentWindowToTunnel'
2025-01-16 17:06:16.673 [trace] [golang.go] INVOKE provider 'o=>o.provideHover(E.revive(r),i,s,n)'
2025-01-16 17:06:16.676 [trace] [golang.go] provider DONE after 3ms
2025-01-16 17:06:18.110 [debug] ProxyResolver#resolveProxy env http://ProxyIp:ProxyPort/https://global.rel.tunnels.api.visualstudio.com/tunnels?includePorts=true&labels=vscode-server-launcher&allLabels=true&global=true&api-version=2023-09-27-preview PROXY ProxyIp:ProxyPort 
2025-01-16 17:06:18.111 [trace] ProxyResolver#net.connect [{"lookupProxyAuthorization":"[Function: bound d_]","host":"ProxyIp","port":ProxyPort}]
2025-01-16 17:06:18.140 [trace] [golang.go] INVOKE provider 'n=>n.provideDocumentHighlights(E.revive(r),i,s)'
2025-01-16 17:06:18.143 [trace] [golang.go] provider DONE after 2ms
2025-01-16 17:06:20.087 [trace] ExtHostCommands#executeCommand workbench.getCodeExchangeProxyEndpoints
2025-01-16 17:06:22.100 [debug] ProxyResolver#resolveProxy env https://mobile.events.data.microsoft.com/OneCollector/1.0?cors=true&content-type=application/x-json-stream PROXY ProxyIp:ProxyPort 
2025-01-16 17:06:22.101 [trace] ProxyResolver#lookupProxyAuthorization callback proxyURL:http://ProxyIp:ProxyPort/ proxyAuthenticate:undefined proxyAuthenticateCache:undefined
2025-01-16 17:06:22.101 [trace] ProxyResolver#net.connect [{"ALPNProtocols":"http/1.1","lookupProxyAuthorization":"[Function: bound d_]","host":"ProxyIp","port":ProxyPort}]
2025-01-16 17:06:22.207 [trace] ProxyResolver#tls.connect [{"protocol":"https:","hostname":"mobile.events.d[32 chars]","method":"POST","headers":"[object Object]","agent":"[object Object]","_defaultAgent":"[object Object]","lookupProxyAuthorization":"[Function: bound d_]","noDelay":true,"servername":"mobile.events.d[32 chars]","secureEndpoint":true,"_vscodeAdditionalCaCerts":"[44 certs]","socket":"[object Object]"}]
2025-01-16 17:06:25.481 [trace] ExtHostCommands#executeCommand workbench.getCodeExchangeProxyEndpoints
2025-01-16 17:06:25.484 [debug] ProxyResolver#resolveProxy env https://github.com/login/oauth/access_token PROXY ProxyIp:ProxyPort 
2025-01-16 17:06:25.484 [trace] ProxyResolver#lookupProxyAuthorization callback proxyURL:http://ProxyIp:ProxyPort/ proxyAuthenticate:undefined proxyAuthenticateCache:undefined
2025-01-16 17:06:25.484 [trace] ProxyResolver#net.connect [{"ALPNProtocols":"http/1.1","lookupProxyAuthorization":"[Function: bound d_]","host":"ProxyIp","port":ProxyPort}]
2025-01-16 17:06:25.525 [trace] ProxyResolver#tls.connect [{"protocol":"https:","slashes":true,"auth":"null","hostname":"github.com","hash":"null","search":"null","query":"null","pathname":"/login/oauth/access_token","href":"https://github.[43 chars]","method":"POST","headers":"[object Object]","agent":"[object Object]","_defaultAgent":"[object Object]","lookupProxyAuthorization":"[Function: bound d_]","noDelay":true,"servername":"github.com","secureEndpoint":true,"_vscodeAdditionalCaCerts":"[44 certs]","socket":"[object Object]"}]
2025-01-16 17:06:25.805 [debug] ProxyResolver#resolveProxy env https://api.github.com/user PROXY ProxyIp:ProxyPort 
2025-01-16 17:06:25.805 [trace] ProxyResolver#lookupProxyAuthorization callback proxyURL:http://ProxyIp:ProxyPort/ proxyAuthenticate:undefined proxyAuthenticateCache:undefined
2025-01-16 17:06:25.805 [trace] ProxyResolver#net.connect [{"ALPNProtocols":"http/1.1","lookupProxyAuthorization":"[Function: bound d_]","host":"ProxyIp","port":ProxyPort}]
2025-01-16 17:06:25.851 [trace] ProxyResolver#tls.connect [{"protocol":"https:","slashes":true,"auth":"null","hostname":"api.github.com","hash":"null","search":"null","query":"null","pathname":"/user","href":"https://api.git[27 chars]","method":"GET","headers":"[object Object]","agent":"[object Object]","_defaultAgent":"[object Object]","lookupProxyAuthorization":"[Function: bound d_]","noDelay":true,"servername":"api.github.com","secureEndpoint":true,"_vscodeAdditionalCaCerts":"[44 certs]","socket":"[object Object]"}]
2025-01-16 17:06:26.176 [debug] ProxyResolver#resolveProxy env http://ProxyIp:ProxyPort/https://global.rel.tunnels.api.visualstudio.com/tunnels?includePorts=true&labels=vscode-server-launcher&allLabels=true&global=true&api-version=2023-09-27-preview PROXY ProxyIp:ProxyPort 
2025-01-16 17:06:26.177 [trace] ProxyResolver#net.connect [{"lookupProxyAuthorization":"[Function: bound d_]","host":"ProxyIp","port":ProxyPort}]
2025-01-16 17:06:26.477 [trace] [golang.go] INVOKE provider 's=>s.provideCodeLenses(E.revive(r),i)'
2025-01-16 17:06:26.477 [trace] [golang.go] provider DONE after 1ms
2025-01-16 17:06:26.478 [trace] [golang.go] INVOKE provider 's=>s.provideCodeLenses(E.revive(r),i)'
2025-01-16 17:06:26.478 [trace] [vscode.merge-conflict] INVOKE provider 's=>s.provideCodeLenses(E.revive(r),i)'
2025-01-16 17:06:26.480 [trace] ExtHostCommands#executeCommand setContext
2025-01-16 17:06:26.480 [trace] ExtHostCommands#executeCommand _setContext
2025-01-16 17:06:26.480 [trace] [vscode.merge-conflict] provider DONE after 1ms
2025-01-16 17:06:26.481 [trace] [golang.go] provider DONE after 3ms
2025-01-16 17:06:28.196 [debug] ProxyResolver#resolveProxy env https://mobile.events.data.microsoft.com/OneCollector/1.0?cors=true&content-type=application/x-json-stream PROXY ProxyIp:ProxyPort 
2025-01-16 17:06:28.196 [trace] ProxyResolver#lookupProxyAuthorization callback proxyURL:http://ProxyIp:ProxyPort/ proxyAuthenticate:undefined proxyAuthenticateCache:undefined
2025-01-16 17:06:28.196 [trace] ProxyResolver#net.connect [{"ALPNProtocols":"http/1.1","lookupProxyAuthorization":"[Function: bound d_]","host":"ProxyIp","port":ProxyPort}]
2025-01-16 17:06:28.303 [trace] ProxyResolver#tls.connect [{"protocol":"https:","hostname":"mobile.events.d[32 chars]","method":"POST","headers":"[object Object]","agent":"[object Object]","_defaultAgent":"[object Object]","lookupProxyAuthorization":"[Function: bound d_]","noDelay":true,"servername":"mobile.events.d[32 chars]","secureEndpoint":true,"_vscodeAdditionalCaCerts":"[44 certs]","socket":"[object Object]"}]

@antoinetran
Copy link
Author

The error trace is never the same, today I got

2025-01-16 23:23:09.794 [error] Error: Failed to establish a socket connection to proxies: ["PROXY ProxyIp:ProxyPort"]
	at _PacProxyAgent.<anonymous> (c:\Users\username\Custom\app\vscode\Microsoft VS Code\resources\app\node_modules\@vscode\proxy-agent\out\agent.js:132:19)
	at Generator.throw (<anonymous>)
	at rejected (c:\Users\username\Custom\app\vscode\Microsoft VS Code\resources\app\node_modules\@vscode\proxy-agent\out\agent.js:6:65)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-01-16 23:23:09.794 [error] Error: Failed to establish a socket connection to proxies: ["PROXY ProxyIp:ProxyPort"]
	at _PacProxyAgent.<anonymous> (c:\Users\username\Custom\app\vscode\Microsoft VS Code\resources\app\node_modules\@vscode\proxy-agent\out\agent.js:132:19)
	at Generator.throw (<anonymous>)
	at rejected (c:\Users\username\Custom\app\vscode\Microsoft VS Code\resources\app\node_modules\@vscode\proxy-agent\out\agent.js:6:65)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5

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

1 participant