Issue Type: Bug
When I start VScode 1.49, proxy authentication window seems to popped up, but immediately closed.
Thus, updating any extensions are failed.
VS Code version: Code 1.49.0 (e790b931385d72cf5669fcefc51cdf65990efa5d, 2020-09-10T13:22:08.892Z)
OS version: Windows_NT x64 6.3.9600
Remote OS version: Linux x64 4.18.0-193.14.2.el8_2.x86_64
Confirm, my proxy auth dialog dissappear at VS start.
Sorry about this! can confirm the bug, sadly this is third time in the last few releases that proxy dialog was broken. @chrmarti we should add this to the smoke test list.
There was no change to the proxy code path in the past month, seems like this one broke with electron update. Trying to create a minimal repro now.
Created a minimal sample based on our implementation https://gist.github.com/deepak1556/c478da04a57addd17894f8c93844664b , running it with 9.2.1 in electron fiddle https://www.electronjs.org/fiddle doesn't repro the issue.
@chrmarti seems like this is not an issue with the electron update.
@deepak1556 checking the history of auth.ts I see that only the revert of Electron 9 appears:
https://github.com/microsoft/vscode/commit/227d533937b17f54bae09f94083bf6304e6262e1#diff-f4a449c54f8cff44ffedcbdf9ea0b2dd
But it looks like the revert of the revert (going back to Electron 9) did not happen for auth.ts? As such, for example this change did not make it back:
https://github.com/microsoft/vscode/commit/227d533937b17f54bae09f94083bf6304e6262e1#diff-f4a449c54f8cff44ffedcbdf9ea0b2dd
I think all of the spellcheck changes I did before did not make it back, any reason for this?
I think all of the spellcheck changes I did before did not make it back, any reason for this?
Yeah just noticed it, no reason, I seemed to have missed it with my revert.
checking the history of auth.ts I see that only the revert of Electron 9 appears:
yeah and it doesn't make any change apart from the spellcheck config which won't affect this issue. Don't see any other change in history related to auth code.
@deepak1556 I see the IPC listener being called with channel === 'vscode:fetchShellEnv': https://github.com/microsoft/vscode/blob/e790b931385d72cf5669fcefc51cdf65990efa5d/src/vs/code/electron-main/auth.ts#L91
Should these two lines move within the if block?
win.removeListener('close', onWindowClose);
win.close();
Not sure why this broke now, maybe this has also previously been a race condition that just now happens to hit more often.
@joaomoreno I suggest to queue this for a recovery release. Could take over as the owner of the code?
I may have broken this with my sandbox work where now the preload script will call this IPC message, but agree the fix to move this into an if block seems legit 馃憤
I'll let @deepak1556 tackle it. 馃憣
I can approve a PR.
Or I can fix :) https://github.com/microsoft/vscode/pull/106490
Thanks @chrmarti for narrowing down the issue!
@bpasero follow-up question, why is the ipc for vscode:fetchShellEnv being sent for proxy auth window ? I only see that whenResolved is waited for the workbench window which would be a different process from the auth window https://github.com/microsoft/vscode/blob/07ad5d6f18d91a365d6fa3faa2c2e05c590dc40f/src/vs/code/electron-browser/workbench/workbench.js#L55
There are many times vscode fail with proxy network. Could you please test it before release?
If an user cannot connect to proxy network. How do he update vscode? How do he know there is a fix?
Guys, it has been 3 times in a row. Can you at least add this in one of your test cases? This bug has no impact for personal use and small businesses but it is catastrophic for big cooperations.
Sorry for that, I added this to https://github.com/microsoft/vscode/issues/106489
Verified. @joaomoreno @deepak1556 I see the auth dialog twice, it seems there are two 'login' events from Electron for the same proxy. Is that a known issue?
I always see the authentication dialogue twice.
I've hear that VSCode have two HTTP engine in the past, thus I thought this could be normal behaviour.
If this is not expected behaviour, fixing this is happy to me.
Verified. @joaomoreno @deepak1556 I see the auth dialog twice, it seems there are two 'login' events from Electron for the same proxy. Is that a known issue?
For me it also so - dialog showing twice, as also credentials needed to be entered twice.
About showing twice proxy dialog, with the latest updated, I have checked and it shows only one time.
Could you check it?
@shkit @shamarin
About showing twice proxy dialog, with the latest updated, I have checked and it shows only one time.
Could you check it?
@shkit @shamarin
Will check it.
About showing twice proxy dialog, with the latest updated, I have checked and it shows only one time.
Could you check it?
@shkit @shamarin
Checked, it's showing twice.
@quyleanh I also see twice.
We will look into that issue as part of https://github.com/microsoft/vscode/issues/106489 as well.
We will look into that issue as part of #106489 as well.
Ok, thank you! And what about an option to store credentials so that there will be no need to enter them again after programm restart?
Yeah that might be possible too, will add it to the list.
Yeah that might be possible too, will add it to the list.
Great!
Please refer to #32566. It has been more than 3 years.
Version 1.49.1 fixed this for me. And then 1.49.2 promptly broke it again!
