Description
Does this issue occur when all extensions are disabled?: Unknown
Version: 1.91.1 (system setup)
Commit: f1e16e1
Date: 2024-07-09T22:06:49.809Z
Electron: 29.4.0
ElectronBuildId: 9728852
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22631
Steps to Reproduce:
- Wait for a VS Code update to be automatically installed at 12:00 on an arbitrary day (I do not know how/why/when exactly this occurs).
- Observe that any open VS Code window suddenly becomes nonfunctional - many button presses do nothing, tasks fail to launch.
- Observe that VS Code logs (e.g. user settings sync log) complain about missing
.js
files. - Observe that starting new VS Code instances fails with the below error message.
Error: Cannot find module 'C:\Program Files\Microsoft VS Code\resources\app\out\main'
at Module._resolveFilename (node:internal/modules/cjs/loader:1055:15)
at s._resolveFilename (node:electron/js2c/browser_init:2:115690)
at node:electron/js2c/browser_init:2:121111
at node:electron/js2c/browser_init:2:121360
at node:electron/js2c/browser_init:2:121364
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:392:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10)
at loadBuiltinModule (node:internal/modules/helpers:68:7)
at Module._load (node:internal/modules/cjs/loader:923:17)
at c._load (node:electron/js2c/node_init:2:13672)
Has happened twice so far (last time about a month ago, presumably with previous update).
VS code main.log
has the following on recent startup before the event:
2024-08-02 07:04:09.468 [info] update#setState idle
2024-08-02 07:04:39.476 [info] update#setState checking for updates
2024-08-02 07:04:39.480 [info] update#setState downloading
2024-08-02 07:04:39.481 [info] update#setState downloaded
The Application event log has some RestartManager
entries at the time when the problem started:
Starting session 0 - 2024-08-02T09:00:39.339256800Z.
Application 'C:\Program Files\Microsoft VS Code\Code.exe' (pid 8852) cannot be restarted - Application SID does not match Conductor SID..
(repeated with different PIDs)Machine restart is required.
Ending session 0 started 2024-08-02T09:00:39.339256800Z.
Next to the vanished resources/app/out
directory is a directory resources/app/node_modules.asar.unpacked
whose timestamp matches the event in the Application event log.
I surmise that VS Code tried to update itself but somehow messed up and left me with a broken installation. I will reinstall since I need to continue my work but I have made copies of relevant folders in case there may be something valuable in there (I was not able to find any other relevant logs, though).