vscode: Can't open vscode and it will flashback without anything
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.79.2
- OS Version: Windows 10 Enterprise 22H2
Steps to Reproduce:
- In CMD I use the instruct: cd C:\Program Files\Microsoft VS Code (the road vscode install) C:\Program Files\Microsoft VS Code>code
- It will open and flashback with the error report:
[main 2023-06-16T05:15:52.896Z] update#setState idle
[3204:0616/131553.294:ERROR:electron_api_utility_process.cc(123)] Failed to create null handle: System cannot find the specified file. (
0x2)
3.except this, system work right, such chrome and visual studio.And the GPU drive is latest.
4.I have tried
--no-sandbox
,it no use. And I also uninstall vscode many times, delete that two directories to deeply clear.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 31 (13 by maintainers)
@shellvon That’s Great! I restart this service and vscode finally can be used. It seems that the service has shot down by an error. Thank you for your answer.
sc query null
sc create null binPath= C:\Windows\System32\drivers\null.sys type= kernel start= auto error= normal
@Ambit15 Accodring your error logs:
It’s reported from electron source code here:
https://github.com/electron/electron/blob/e61359598214399cab97ca6a8ad541983059c331/shell/browser/api/electron_api_utility_process.cc#L123C25-L123C55
And you see, If electron run on windows and need
utilityProcess
, it’s need the NULL kernel service to run correctly. but it seems that your windows system was missing it.You can check it by run sc command by using
cmd.exe
:it produce the output like this:
if you don’t have this service, you can create it by following command:
But you need make sure the file
C:\Windows\System32\drivers\null.sys
exists. you can download it by using google search or from another windows machine with same version.Refs: