Open roblourens opened 1 month ago
Also seeing this in 1.91.1 on Linux with a basic auth proxy.
It works when the proxy doesn't require authentication. It also work with basic auth using https
and fetch
in the extension host.
Shared process uses the net API from the main process which doesn't use the proxy auth feature I added recently, it will be addressed with https://github.com/microsoft/vscode/issues/223452
@deepak1556 This seems to work on Windows and macOS, so maybe there is a bug separate from https://github.com/microsoft/vscode/issues/223452.
Oh that is interesting, I always assumed all extension requests are triggered from the shared process which go through the main process net API and any proxy requiring basic auth should have failed these requests. But you are right, given the requests pass on macOS and windows there must be a difference I am missing. I looked at the network logs and this is what I see on macOS
1) Requests to update service, telemetry use the main process net api and they are failing with ERR_TUNNEL_CONNECTION_FAILED
as expected.
2) Requests to marketplace.visualstudio.com
seems to be happening from the renderer process and these will get the auth dialog causing them to work as expected. The initiator = "vscode-file://vscode-app"
seems to confirm that the requests are triggered from workbench.
I am wondering how this looks like on linux. @chrmarti can you share the netlog, maybe also use a fresh user data dir and extensions dir to avoid http caches.
Using a PAC script I see some PAC related errors, will retry without PAC script to be isolate. Attaching netlog with PAC script.
Without PAC script worked:
linux-basic-auth-proxy-netlog.json
The PAC script is simple:
function FindProxyForURL(url, host) {
if (dnsDomainIs(host, "marketplace.visualstudio.com"))
return "PROXY localhost:3111";
return "PROXY localhost:3122";
}
And it works on Windows and macOS and also when triggered from the extension host on Linux. Is the PAC script evaluated differently when queried from the extension host? For https
we are going through Electron.Session.resolveProxy
in the main process, for fetch
I don't know.
My test setup uses the dev container at https://github.com/microsoft/vscode-proxy-agent/tree/main/.devcontainer/basic-auth-test to run the proxies and serve the PAC script.
Testing #221327
I'm getting these errors when trying to install extensions