Hi,
Just upgraded to 1.30 and VSCode don't properly start. It just load the background, and then stays there. Nothing in it is working, not even dev tools.
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
Please see if you can find any logged output that could help us find the source of the issue:
code --verbose from the command line and attach the outputThanks!
➜ code --verbose [16:05]
[main 16:05:14] Starting VS Code
[main 16:05:14] from: /Applications/Visual Studio Code.app/Contents/Resources/app
[main 16:05:14] args: { _: [],
help: false,
h: false,
version: false,
v: false,
wait: false,
w: false,
diff: false,
d: false,
add: false,
a: false,
goto: false,
g: false,
'new-window': false,
n: false,
'unity-launch': false,
'reuse-window': false,
r: false,
'open-url': false,
performance: false,
p: false,
'prof-startup': false,
verbose: true,
logExtensionHostCommunication: false,
'disable-extensions': false,
disableExtensions: false,
'list-extensions': false,
'show-versions': false,
nolazy: false,
issue: false,
'skip-getting-started': false,
'skip-release-notes': false,
'sticky-quickopen': false,
'disable-restore-windows': false,
'disable-telemetry': false,
'disable-updates': false,
'disable-crash-reporter': false,
'skip-add-to-recently-opened': false,
status: false,
s: false,
'file-write': false,
'file-chmod': false,
'driver-verbose': false,
trace: false }
[main 16:05:14] Resolving machine identifier...
[main 16:05:14] Resolved machine identifier: 76c05ae4b81fadfd9f64d8dfd546764fa7a68e651795b310c5dc6049197b8a13
[main 16:05:14] [storage :memory:] open()
[main 16:05:14] telemetry/optInStatus { optIn: true }
[main 16:05:14] [storage :memory:] getItems(): Map(0) {}
[main 16:05:14] update#setState idle
[main 16:05:14] windowsManager#open
2018-12-13 16:05:14.515 Electron[56556:31158258] *** WARNING: Textured window <AtomNSWindow: 0x7f8668e4e830> is getting an implicitly transparent titlebar. This will break when linking against newer SDKs. Use NSWindow's -titlebarAppearsTransparent=YES instead.
[main 16:05:14] [storage :memory:] Trace (event): SELECT * FROM ItemTable
[main 16:05:14] [storage :memory:] updateItems(): insert(Map(3) {telemetry.instanceId => 0921b9ce-5897-48d9-b939-76f0e9cd8a0a, telemetry.firstSessionDate => Thu, 13 Dec 2018 15:05:14 GMT, telemetry.currentSessionDate => Thu, 13 Dec 2018 15:05:14 GMT}), delete(Set(0) {})
[main 16:05:14] [storage :memory:] Trace (event): BEGIN TRANSACTION
[main 16:05:14] [storage :memory:] Trace (event): INSERT INTO ItemTable VALUES ('telemetry.instanceId','0921b9ce-5897-48d9-b939-76f0e9cd8a0a')
[main 16:05:14] [storage :memory:] Trace (event): INSERT INTO ItemTable VALUES ('telemetry.firstSessionDate','Thu, 13 Dec 2018 15:05:14 GMT')
[main 16:05:14] [storage :memory:] Trace (event): INSERT INTO ItemTable VALUES ('telemetry.currentSessionDate','Thu, 13 Dec 2018 15:05:14 GMT')
[main 16:05:14] [storage :memory:] Trace (event): END TRANSACTION
[56556:1213/160515.721537:INFO:CONSOLE(1503)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1503)
[56556:1213/160515.732623:INFO:CONSOLE(1503)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1503)
{ Error: EACCES: permission denied, unlink '/Users/Emmanuel/Library/Application Support/Code/logs/20181210T091817/main.log'
errno: -13,
code: 'EACCES',
syscall: 'unlink',
path: '/Users/Emmanuel/Library/Application Support/Code/logs/20181210T091817/main.log' }
[main 16:05:44] update#checkForUpdates, state = idle
[main 16:05:44] update#setState checking for updates
[main 16:05:47] update#setState idle
[main 16:05:47] telemetry/update:notAvailable { explicit: false }
[56556:1213/160548.231328:INFO:CONSOLE(5)] "[uncaught exception]: Error: EACCES: permission denied, unlink '/Users/Emmanuel/Library/Application Support/Code/User/workspaceStorage/1544429898570/storage.db'
Error: EACCES: permission denied, unlink '/Users/Emmanuel/Library/Application Support/Code/User/workspaceStorage/1544429898570/storage.db'", source: /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js (5)
[56556:1213/160548.231445:INFO:CONSOLE(5)] "Error: EACCES: permission denied, unlink '/Users/Emmanuel/Library/Application Support/Code/User/workspaceStorage/1544429898570/storage.db'
Error: EACCES: permission denied, unlink '/Users/Emmanuel/Library/Application Support/Code/User/workspaceStorage/1544429898570/storage.db'
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:81:350", source: /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-window.js (5)
This is all I can get. As said, the developer tools won't open, so nothing from it.
@EmmanuelBeziat you see a window at least, do you? That is just empty?
Any chance you are using different user accounts to run Code? There are some permission errors in the output that seem suspicious.
Yes, I see the empty window of Code. I pasted a video to show this, but it didn’t displayed (and I rolled back to 1.29.1 since then, so I can't make a screenshot now).
I’m the only user on my computer, there's no other account.
@joaomoreno I have a feeling the window gets stuck at this point:
[56556:1213/160515.732623:INFO:CONSOLE(1503)] "%cTRACE", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (1503)
{ Error: EACCES: permission denied, unlink '/Users/Emmanuel/Library/Application Support/Code/logs/20181210T091817/main.log'
errno: -13,
code: 'EACCES',
syscall: 'unlink',
path: '/Users/Emmanuel/Library/Application Support/Code/logs/20181210T091817/main.log' }
Since we require the log service very early on startup, that would explain why nothing else continues after that.
The error about not being able to delete the workspace storage folder is actually coming from the shared process 30s after startup and is unrelated, even though it shows a similar error message.
@EmmanuelBeziat can you run ls -la /Users/Emmanuel/Library/Application Support/Code/logs/20181210T091817/main.log so that we get an idea which user owns that file?
@joaomoreno actually now that I see how createSpdLogService is implemented (returning a null implementation on error), it could be that we still continue to load but then something else fails due to permissions errors....
@bpasero It seems that the file is owned by root:
-rw-r--r-- 1 root staff 889 10 déc 17:33 /Users/Emmanuel/Library/Application Support/Code/logs/20181210T091817/main.log
Seeing that, I tried to launch VSCode with sudo, and it worked. So I just had to change the log file ownership, and now its working fine; though it’s weird that it occurs on this specific update…
I bet it would occur on previous updates too. Glad you're unblocked.
@joaomoreno I am still confused why this would prevent a startup from happen. Imho the logger should fallback to a null implementation if it has issues on startup.
I bet it would occur on previous updates too.
It didn't for as fas as I can remember (more than one year). And when I was stuck, I just had to reinstall the previous version for it to work, so I doubt it. It really happened with this specific version.
cc @sandy081 Do you know of anything that has happened recently in terms of startup and log files?
Are you sure is it because of creating spdlog file? Because I do not see any error trace while creating spdlog file. Is there some other issue which got fixed when running as sudo?
Nothing that I can relate, and this is the only file that I had to change ownership to get VSCode to work.
Steps:
logs folder to be readonly by current user
I think this is no different when a folder in user home directory like workspaceStorage is made readonly. As discussed with @bpasero we should show a dialog when there are such errors.
Most helpful comment
@bpasero It seems that the file is owned by root:
-rw-r--r-- 1 root staff 889 10 déc 17:33 /Users/Emmanuel/Library/Application Support/Code/logs/20181210T091817/main.logSeeing that, I tried to launch VSCode with sudo, and it worked. So I just had to change the log file ownership, and now its working fine; though it’s weird that it occurs on this specific update…