VSCode Extension Host Terminated Unexpectedly OSX Catalina - visual-studio-code

Have recently updated to Catalina, since then have not been able to run/debug in VSCode. On start of VSCode I see a pop-up with message - extension host quit unexpectedly.
In developer tools I see message:
dyld: Symbol not found: _iconv Referenced from: /usr/lib/libarchive.2.dylib Expected in: /opt/local/lib/libiconv.2.dylib in /usr/lib/libarchive.2.dylib
What to do?

For me, it was an issue with mysql library installed on my mac. Nothing to do with vscode.
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib:$DYLD_LIBRARY_PATH

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.

The terminal process failed to launch: A native exception occurred during launch (File not found: )

I keep using vscode debug for long time. But it began to fails to use debug from yesterday.
It reports that The terminal process failed to launch: A native exception occurred during launch (File not found: ).
I can use powershell in terminal.
I have tried solution in (https://code.visualstudio.com/docs/supporting/troubleshoot-terminal-launch), but none of them works.
Code -version: 1.47.3
Operating System version: windows 10 1909 build 18363.959
all extensions:
albert.TabOut
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer-2
Equinusocio.vsc-community-material-theme
Equinusocio.vsc-material-theme
equinusocio.vsc-material-theme-icons
eryouhao.brackets-light-pro
formulahendry.code-runner
formulahendry.terminal
Gruntfuggly.todo-tree
HookyQR.beautify
James-Yu.latex-workshop
kisstkondoros.vscode-gutter-preview
manasxx.background-cover
marlosirapuan.nord-deep
MS-CEINTL.vscode-language-pack-zh-hans
ms-python.python
ms-python.vscode-pylance
ms-vscode.cpptools
naumovs.color-highlight
niudai.vscode-zhihu
nnthink.aixcoder
redhat.java
skacekachna.win-opacity
sldobri.nord-5-stars
TabNine.tabnine-vscode
VisualStudioExptTeam.vscodeintellicode
vscjava.vscode-java-debug
vscjava.vscode-java-dependency
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
vscode-icons-team.vscode-icons
wix.vscode-import-cost
yzhang.markdown-all-in-one
zhuangtongfa.material-theme
setting.json:
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"
In my case this problem arising after updating VS Code version to 1.54.3 on Ubuntu 18.04.
This problem is resolved by restarting VS Code after the update.
Yep, that's kinda what my problem was...PS had been blocked at a system-admin level.
Make sure that you can actually run PS from the command-line or start window.
Win10 popup
I fixed it by change "terminal.integrated.inheritEnv" to false in setting.json.
I also had the same issue and asked the question one week before yet didn't get solution.
here is link of my question
[link]Visual Studio (VS-code) code terminal is failed to launch
1 solution i got:
the issue arises when you delete some of it's files before by mistake and you don't know try to remember that or simply recover your pc to 3 weeks ago atleat so all files will be placed suitably.
I had the error. To fix it, I looked at all the terminal settings in VSCode and checked out the ones that weren't set to the default value. Eventually, I found that the path to my PowerShell had changed to the preview version I had installed. Reverting this to its default got it working again. Hope this helps someone.

Emacs is unable to run code in swift-mode since upgrading to Catalina

When I try to run code in emacs swift-mode with C-c C-z, I receive the following message:
'warning: unable to find and load segment named '__OBJC_RO' at
0x7fff6e030000 in '/usr/lib/libobjc.A.dylib' in macosx dynamic loader
plug-in.
warning: unable to find and load segment named '__OBJC_RW' at
0x7fff919d9080 in '/usr/lib/libobjc.A.dylib' in macosx dynamic loader
plug-in.'
I am running emacs version 26.3 and macOS version 10.15
Does anybody have a resolution for this issue?

New VSCode extension can't find vscode

Why does a new VSCode extension created with yeoman generator immediately not find vscode when starting debug?
Clean install of node, yeoman, and generator "code".
While I can continue to debug with this error, why isn't vscode found? Is it extraneous if debugging actually works?
Type Ctrl+` to get the console and then npm i whereupon you will get a message similar to this
Detected VS Code engine version: ^1.31.0 Found minimal version that
qualifies engine range: 1.31.0 Fetching vscode.d.ts from:
https://raw.githubusercontent.com/Microsoft/vscode/7c66f58312b48ed8ca4e387ebd9ffe9605332caa/src/vs/vscode.d.ts
vscode.d.ts successfully installed!
After that things should be hunky dory.

"ERROR : No emulator images (avds) found" running ionic on osx 10.10

This is the full error message I got after running ionic emulate android
*running cordova emulate android
Running command: /Users/DeadLift/Documents/ionic/myApp/hooks/after_prepare/010_add_platform_class.js /Users/DeadLift/Documents/ionic/myApp
add to body class: platform-android
Running command: /Users/DeadLift/Documents/ionic/myApp/platforms/android/cordova/run --emulator
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.1.2
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
/Users/DeadLift/Documents/ionic/myApp/platforms/android/cordova /node_modules/q/q.js:126
throw e;
^
ERROR : No emulator images (avds) found.
1. Download desired System Image by running: /usr/local/Cellar/android-sdk/24.1.2/bin/android sdk
2. Create an AVD by running: /usr/local/Cellar/android-sdk/24.1.2/bin/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver
Error: /Users/DeadLift/Documents/ionic/myApp/platforms/android/cordova/run: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23) *emphasized text*
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)*
I follow all the above by creating an avd and it give me the same message again.
Thanks.
Vikas's answer is pretty spot on, however (sometimes) just running android avd won't work, which is what I found out after hours of trying to get it working.
When ever I ran android avd in my terminal it would give me the following error:
zsh: command not found: android
This is because I needed to add the Android SDK paths for the platform-tools and tools to my zshrc file (you might be running bash or something else on your terminal).
Simple fix was to add these files to my zshrc PATH environment, You can do this too by using your favourite text editor and depending on what shell you're using.
This link: http://docs.phonegap.com/en/2.8.0/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android helped me out a hell of a lot getting this fixed.
So I used subl ~/.zshrc (because sublime is my text editor and i've setup symlinks)
I Found my exports PATH and changed it to represent the following:
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/dev/.rbenv/versions/2.2.3/bin/ruby:/Users/dev/Library/Android/sdk/platform-tools:/Users/dev/Library/Android/sdk/tools:$PATH"
I then saved the file, closed down sublime and ran source ~/.zshrc in my terminal window, and now I can run android avd and it now opens the Android Virtual Device Manager with no problems.
A reminder your shell might be different to mine (i.e. not running with zsh)and your exports PATH might look different as well, but it's pretty easy to figure out, and the link above will also help if you get stuck.
Actually it is not able to find AVD (Android virtual device). You have to create one.
Type "android avd" from Command Promt to use the graphical manager to setup an emulator image to work with for running your app on. The graphical tool is fairly straight forward to use.