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
ERR_INVALID_ARG_TYPE when testing extension on 1.47.1 #102642
Comments
Looking at the code I think this is most likely an error that your extension threw while starting up. eg you would get this when calling node path APIs with cc @jrieken if you have any ideas |
@roblourens That doesn't explain why 1.47.0 doesn't have this issue, and why starting the test manually via cmd or launch.json also doesn't have this problem. Is there anything I can try or any diagnostic messages I can provide? |
I have the same problem. I'm running tests from jenkins that runs on some local account, on Windows 10. When I log into my normal user account and try to reproduce it (run tests from command line), there is no error. I have logged with remote desktop into the local account that jenkins is running on, tried to reproduce it from command line - didn't reproduce (no error). Restarted jenkins service, tried running it again from jenkins - the error disappeared. I disconneted but I think the session stil lives? I noticed that someone had similar problem (same error, different stacktrace, related to user windows user/session) - #102751 |
Also repros with 1.47.2. |
cc @deepak1556 it kind of sounds like we are calling require with |
Do the tests run in admin mode in CI? |
I assume so for our CI, since we are also installing some software in the CI. |
@roblourens We have another user hitting this with the Docker extension when running VSCode as admin: microsoft/vscode-docker#2175 |
Just wanted to add that the PowerShell extension is also hitting this with a similar error in 1.47.1: From devtools:
We're tracking it here: PowerShell/vscode-powershell#2808 |
Sorry about the issue, this seems to be related to the recent CVE fix https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-1416 where the node path resolution introduced a dependency on Can the devs affected by this issue confirm if those env variables are undefined on your setup ? |
They are undefined in our CI builds, but are defined when remoting to the test machine and running node there manually. So this behavior seems to be consistent with our issue. |
Thanks for the confirmation, just pushed a fix. But the earliest fix available for testing is tomorrow and recovery stable build will be out next week. As a temporary workaround until then you could define those env variables for ci. Any ideas on why these might be undefined in some environments ? |
I can't speak for OP, but in the PowerShell extension case, where this is happening is where the user is running vscode as another user elevated with administrator privileges. I can confirm that when I launch a process as this other user, the variables are there, but when I elevate the variables are no longer present. With regards to what I understand of OPs description, when being run as a service, there likely won't be a homedrive or homepath variable as they're not fully loaded profiles so leave out some variables and such. This would explain why they couldn't reproduce with logging in remotely. |
Would like some volunteering to validate the fix, please use any of the following builds |
This looks promising. I am starting vscode from separate admin account and I experienced the issue where I could not set Python interpreter, postgresql extension could not be started, and I could not install Remote - WSL extension. All works now! How soon until you push update to official realize? |
Looks good to me. Starting from elevated PowerShell window and directly via "Run as administrator" work with the insider version. The PowerShell session within vscode gets started. |
Did some tests and looks like this fix works for our scenario. Thanks! |
Thanks all for testing, this will be released into recovery |
Thanks for your help. |
Yup, I also confirm the latest insiders build works and properly launches the integrated PowerShell console. |
Closing this issue in preparation for recovery release |
Steps to Reproduce:
After updating to 1.47.1, we started to see ERR_INVALID_ARG_TYPE when running automated tests for our extension in (Azure DevOps) pipeline. The agent runs as a service. I could NOT repro this error repro manually in any way. 1.47.0 doesn't have this problem. Error message:
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
at h._doHandleExtensionTests (c:\Agent_work\1\s\Extension.vscode-test\vscode-1.47.1\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:841:405)
at processTicksAndRejections (internal/process/task_queues.js:85:5)
The text was updated successfully, but these errors were encountered: