VSCode Version: 1.19.0
OS Version: Windows 10 1709 (16299.125)
Reproduces without extensions: Yes
There is no way to open VSCode after 1.19.0 update installed. It always launches blank screen and prints 2 error messages in debug console.
index.js:5 TypeError: Cannot read property 'comments' of null
at file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2920:762
at Array.forEach (native)
at e.setCustomTokenColors (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2920:735)
at new e (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:2927:679)
at t.create (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:90:103)
at e._createInstance (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:1209:289)
at e.createInstance (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:1208:560)
at e.initServiceCollection (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4516:741)
at e.createContents (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4511:118)
at e.open (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/workbench/workbench.main.js:4518:113)
onError # index.js:5
I tried to reinstall vscode or launch it without extensions - same result.
What's more, I got the same issue on Linux virtual machine:
VSCode Version: 1.19.0
OS Version: Ubuntu 17.10 x64
index.js:41 TypeError: Cannot read property 'comments' of null
at file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2920:762
at Array.forEach (native)
at e.setCustomTokenColors (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2920:735)
at new e (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:2927:679)
at t.create (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:90:103)
at e._createInstance (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1209:289)
at e.createInstance (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1208:560)
at e.initServiceCollection (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:4516:741)
at e.createContents (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:4511:118)
at e.open (file:///usr/share/code/resources/app/out/vs/workbench/workbench.main.js:4518:113)
This seems to be the same issue as #40339, which has already been fixed on VSCode's master branch. The issue's milestone (November Recovery 2017) indicates that it will be part of a 1.19.1 patch release.
For now, it looks like you can work around the issue by setting editor.tokenColorCustomization to {} (source):
Can you check if you have editor.tokenColorCustomizations set to null in your settings file (you can find it at ~/Library/Application Support/Code/User/settings.json). If yes, then set it to {} instead and then try opening VS Code.
Related
When I start VS Code, I get the error 'Unable to write to Folder Settings because no resource is provided.' How can I identify what's causing this and resolve it?
VS Code: 1.57.1
code-server: 3.11.0
OS: Ubuntu 18.04
Extensions:
Python: v2021.6.944021595
Jupyter: v2021.6.99
I have been using vscode with the cmake integration for visual studio community edition 2017. I'm only using visual studio integration to vscode, not the IDE. I just moved to Vstudio 19. Now cmake is failing because I cannot get it to recognize that it should use the new visual studio. See error output below.
What is really interesting is that it's using the correct cmake.exe from the VS19 folder, but the parameter it uses is "-G "Visual Studio 15 2017" that is causing the problem. I removed the c_cpp_properties.json file (then CMake: Clean/Rebuild) in my .vscode folder which had a reference to VS17 and that didn't help.
I've tried to remove all the extensions (C/C++ Extension Pack), checked every folder/file in my projects for references to that VS 17. Removed the build folder and CMake: Clean/Rebuild after reinstalling the extensions..
[variant] Loaded new set of variants
[kit] Successfully loaded 4 kits from C:\Users\wood\AppData\Local\CMakeTools\cmake-tools-kits.json
[main] Configuring folder: mycode
[proc] Executing command: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -Hc:/Users/wood/mycode/build -G "Visual Studio 15 2017" -T host=x64 -A win32
[proc] Executing command: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Hc:/Users/wood/mycode -Bc:/Users/wood/OneDrive/mycode/build -G "Visual Studio 15 2017" -T host=x64 -A win32
[cmake] Not searching for unused variables given on the command line.
[cmake] CMake Error at CMakeLists.txt:13 (project):
[cmake] Generator
[cmake]
[cmake] Visual Studio 15 2017
[cmake]
[cmake] could not find any instance of Visual Studio.
[cmake]
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "C:/Users/wood/OneDrive/mycode/build/CMakeFiles/CMakeOutput.log".
Any ideas where else that -G setting might be coming from?
Looked for 24 hours, posted a question, then solved in in the first five minutes.
I removed the file.
C:\Users\wood\AppData\Local\CMakeTools\cmake-tools-kits.json
Well, just renamed it.
Uninstalled the C/C++ extension pack, then re-installed the extension pack. It looked like there was a command to rescan for visual studio, but I missed that as it went by. When rebuilding the cmake I was asked to pick the architecture and everything is working again.
That rescan of visual studio, re-created the cmake-tools-kits.json file with the correct references.
I get the following error message on vs code regarding the docker extension:
"Cannot activate the 'Docker' extension because it depends on an unknown 'vs code.docker' extension"
vs code is the latest version and the Docker extension is from Microsoft
I reinstalled (clean) Visual Studio 2019 (Microsoft Visual Studio Community 2019 Version 16.8.5) and I get error when I try to clean solution, it complains about connection to https://api.nuget.org/v3/index.json.
When I copy paste the link to web browser I see all the packages but VS cannot reach any package.
When I rebuild I get all this error: 'obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
Then I do from NuGet Console > dotnet restore and I get error:
PM> dotnet restore
Determining projects to restore...
C:\Program Files\dotnet\sdk\5.0.103\NuGet.targets(131,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json. [C:\Program Files (x86)\Microsoft V
isual Studio\2019\Community\MyProjects2019\source\repos\Bank\Bank.sln]
C:\Program Files\dotnet\sdk\5.0.103\NuGet.targets(131,5): error : The SSL connection could not be established, see inner exception. [C:\Program Files (x86)\Microsoft Visual Studio\
2019\Community\MyProjects2019\source\repos\Bank\Bank.sln]
C:\Program Files\dotnet\sdk\5.0.103\NuGet.targets(131,5): error : The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot [C:\Program Files (x86
)\Microsoft Visual Studio\2019\Community\MyProjects2019\source\repos\Bank\Bank.sln]
PM>
I have been trying for 4 days to resolve this problem without success, any help, any tips.
Thanks
Whenever I run the code-insiders command inside WSL, I get the below error:
~/dev ᐅ code-insiders .
#
# Fatal error in , line 0
# Version mismatch between V8 binary and snapshot.
# V8 binary version: 7.7.299.13-node.16
# Snapshot version:
# The snapshot consists of 327888 bytes and contains 0 context(s).
#
#
#
#FailureMessage Object: 0x7fff0aac4bc0Illegal instruction
This has started happening spontaneously. I was using code-insiders for a while before in WSL without such problems.
What fixed it for me was closing a running vscode insiders window. This ran the automatic update of vscode itself (it shows a small gray window with progress bar). After that, running code-insiders . in WSL terminal downloaded the new vscode server version and then I could start code-insiders in WSL normally.