Search code examples
visual-studio-codeundefined-symbol

Unable to open Code-insiders undefined symbol SHA256


I am currently unable to open code-insiders (latest build) The interface loads and then immediately closes, however there are code-insider processes left behind still running in back ground that I have to kill directly.
The error in the log is:
/usr/share/code-insiders/code-insiders --unity-launch --enable-crashpad: symbol lookup error: /usr/share/code-insiders/resources/app/node_modules.asar.unpacked/vscode-encrypt/build/Release/vscode-encrypt-native.node: undefined symbol: SHA256_Init

I have seen similar posts that point to the libcrypt and libssh libraries and I have tried re-installing both with no change. I have also purged code and reinstalled the latest build. This still occurs if I try and launch with extensions disabled.
Any suggestions on where to search next would be appreciated.


Solution

  • SHA256_Init crash problem is due to the vscode-encrypt-native ELF is not linked against lcrypto so the symbols cannot be resolved properly.

    You can do a quick fix:

    $ find /usr/lib/ -type f -name "libcrypto.so.*"
    /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
    
    $ sudo apt instal patchelf
    
    $ sudo patchelf --add-needed libcrypto.so.1.1 /usr/share/code-insiders/resources/app/node_modules.asar.unpacked/vscode-encrypt/build/Release/vscode-encrypt-native.node
    

    Ref: https://github.com/microsoft/vscode/issues/142656#issuecomment-1034173634