Running vscode in WSL throws fatal error version mismatch between v8 binary and snapshot - visual-studio-code

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.

Related

Jupyter extension for VSCode on Linux throws error when doing anything Jupyter related

After installing code-oss on Manjaro Linux along with the Jupyter extension for code and jupyter-notebooks itself, the extension seems to error when I try to do anything Jupyter related inside code. If I try to create a new notebook from the command pallete, it pops up a dialog saying this:
Command 'Jupyter: Create New Jupyter Notebook' resulted in an error (command 'jupyter.createnewnotebook' not found)
Code then tells me that the extension activation failed and to open the chrome developer console for more information. This is what the chrome console then says:
extension activation failed Error: Extension 'ms-toolsai.jupyter' CANNOT use API proposal: notebookEditor. Its package.json#enabledApiProposals-property declares: but NOT notebookEditor. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-toolsai.jupyter
Initial Pop-up error
Chrome Console error
You can solve that problem by inserting"enable-proposed-api": ["ms-toolsai.jupyter"] in the start settings of vs code. So press CTRL+ALT+P -> "Preference: Configure Runtime Arguments" then insert the upper line. After that restart vscode.
Had the same problem and found out this is happening because of the open source version of code - OSS. It does not have the proper config in the product.json.
The accepted solution to add to Runtime Arguments unfortunately didn't work on Arch.
Easiest solution for me was to install code-features from AUR.
You can find more info on arch wiki site
Or directly on microsoft docs regarding oss code issues.
The solution to add "enable-proposed-api": ["ms-toolsai.jupyter"] to the runtime of vscode didn't work for me on Arch linux. But when I started vscode from the command line using the argument "--enable-proposed-api ms-toolsai.jupyter" the problem was solved. So I created a custom desktop launcher for this:
Fist, copy the desktop launcher to your applications folder
$ cp /usr/share/applications/code-oss.desktop ~/.local/share/applications/.
Then edit the new file:
$ nano ~/.local/share/applications/code-oss.desktop
Now add "--enable-proposed-api ms-toolsai.jupyter" to both of the Exec lines like so:
[Desktop Entry]
Name=Code - OSS
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/bin/code-oss --enable-proposed-api ms-toolsai.jupyter --unity-launch %F
Icon=com.visualstudio.code.oss
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=TextEditor;Development;IDE;
MimeType=text/plain;application/x-code-oss-workspace;
Actions=new-empty-window;
Keywords=vscode;
[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/usr/bin/code-oss --enable-proposed-api ms-toolsai.jupyter --new-window %F
Icon=com.visualstudio.code.oss
I restarted my computer and the problem was solved.

Cargo build broke after using VS code

For a while I have been editing my Rust program with Pycharm Professional. However, I was curious and experimented with VS Code. At first my project was compiling and running. However, it suddenly started throwing a pretty wild error on cargo build and cargo run (while cargo check is fine), even in cmd outside of VS Code:
error: linking with `link.exe` failed: exit code: 1104
= note: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "C:\\rust\\book\\target\\debug\\deps\\book.1apvyby1qhuehv3.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1cw7xmk0cjjg5uln.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1e8ho0j4rykowhcr.rcgu.o" "C:\\rust\\book\\target\\debug\\deps\\book.1g2fbveo2gp7bxds.rcgu.o"
..............
..............
= note: LINK : fatal error LNK1104: cannot open file 'C:\rust\book\target\debug\deps\book.exe'
book is the name of my project.
I am on Windows 10, System Type: x64-based PC.
VS Code version 1.63.2
Sometimes VSCode file watcher watches the files in target/, that is not good.
So open the Settings, search for exclude, and in all "list-like" cofigurations add **/target/**, do a cargo clean and restart VSCode. This should fix this and future problems
Had to remove the directory, and redownload the whole project(used Git).

How to open slimerjs without display?

My environment:
Ubuntu 16.04, slimerjs 1.0.0, firefox 58.0, root.
I'm trying to execute a js-scenario, but I got an error:
Error: no DISPLAY environment variable specified
Got the same error in phantomjs, and it was solved by:
export QT_QPA_PLATFORM=offscreen
But on slimerjs it had no effect.

Eclipse (2018-09) CDT project with Cygwin, can't debug the binary

It seems that everything cygwin-related configured and works fine in my Eclipse project, for example Eclipse is able to invoke 'make' or 'gcc', and can even run the compiled binary and show the output in the Eclipse console window.
However, when I try to debug my binary within Eclipse, I get the following error:
Error in final launch sequence:
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 0xc0000135.
Failed to execute MI command:
-exec-run
Error message from debugger back end:
During startup program exited with code 0xc0000135.
During startup program exited with code 0xc0000135.
I do able to launch gdb from my Cygwin console, so it is installed correctly (I assume). But why it fails when I try to use it from Eclipse?
For my case, as you say, it turns out that adding the Cygwin bin folder to the PATH variable solves this problem.
I use Eclipse 2020-06 and Cygwin 64bit on Win7 64bit. And installing Cygwin doesn't change the PATH variable currently.
But it is also confused to me that "build" and "run" work fine in Eclipse whithout the Cygwin bin in PATH.

Could not run VS Code on CentOS 7 with x2go

I have installed the latest version of VS Code on CentOS 7.
However when I try to run VS Code, it loads for some time trying to open, but then nothing happens, no errors, nothing.
I have tried to installed both trough rpm package and zipped files, but got the same result in both cases.
I'm using x2go to connect to my CentOS 7.
Add the following line to the file /etc/x2go/x2goagent.options:
X2GO_NXAGENT_DEFAULT_OPTIONS+=" -extension BIG-REQUESTS"
Then restart the server and try again.
I had the same problem and added the --verbose flag to get more info (see below). Googling for the "gl_surface_glx.cc" error brought me to https://github.com/atom/atom/issues/4360 which contains the above workaround. VS Code now works for me on CentOS7 with X2GO.
Without this workaround the following error is seen (using the --verbose flag):
$ code --user-data-dir=/home/user1646217
--verbose [19526:0719/091952.335817:WARNING:audio_manager.cc(317)] Multiple instances of AudioManager detected
[19526:0719/091952.335923:WARNING:audio_manager.cc(278)] Multiple
instances of AudioManager detected
[19549:0719/091952.363736:ERROR:gl_surface_glx.cc(411)] GLX 1.3 or
later is required.
[19549:0719/091952.363836:ERROR:gl_initializer_x11.cc(130)]
GLSurfaceGLX::InitializeOneOff failed.
[19549:0719/091952.366430:ERROR:gpu_child_thread.cc(327)] Exiting GPU
process due to errors during initialization