OmniSharp/omnisharp-roslyn

[Linux/Dotnet8/Android] Unable to start LSP due to 2 possible errors

anzhi0708 opened this issue · 2 comments

Error log shows possible unmatch of configured version info and HOSTFXR missing

root@localhost:~/.omnisharp# dotnet --list-sdks                               
8.0.100 [/root/.dotnet/sdk]            
root@localhost:~/.omnisharp# dotnet --list-runtimes                           
Microsoft.AspNetCore.App 8.0.0 [/root/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.0 [/root/.dotnet/shared/Microsoft.NETCore.App]      
root@localhost:~/.omnisharp#
(Skipping ...)
2023-11-19T03:16:08.570 helix_lsp [ERROR] failed to initialize language server: server closed the stream             
2023-11-19T03:16:08.570 helix_lsp::transport [ERROR] omnisharp err <- "  - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=arm64&rid=debian.12-arm64&apphost_version=6.0.0-preview.7.21317.1\n"                            
2023-11-19T03:16:08.572 helix_lsp::transport [ERROR] omnisharp err: <- StreamClosed                                  
2023-11-19T03:16:12.773 helix_lsp::transport [ERROR] omnisharp err <- "A fatal error occurred. The required library libhostfxr.so could not be found.\n"    
2023-11-19T03:16:12.775 helix_lsp::transport [ERROR] omnisharp err <- "If this is a self-contained application, that library should exist in [/root/.omnisharp/].\n"                               
2023-11-19T03:16:12.775 helix_lsp::transport [ERROR] omnisharp err <- "If this is a framework-dependent application, install the runtime in the global location [/usr/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].\n"                         
2023-11-19T03:16:12.775 helix_lsp::transport [ERROR] omnisharp err <- "\n"    2023-11-19T03:16:12.775 helix_lsp::transport [ERROR] omnisharp err <- "The .NET runtime can be found at:\n"          
2023-11-19T03:16:12.776 helix_lsp::transport [ERROR] omnisharp err <- "  - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=arm64&rid=debian.12-arm64&apphost_version=6.0.0-preview.7.21317.1\n"                            
2023-11-19T03:16:12.778 helix_lsp [ERROR] failed to initialize language server: server closed the stream             
2023-11-19T03:16:12.777 helix_lsp::transport [ERROR] omnisharp err: <- StreamClosed

cat OmniSharp.runtimeconfig.json

{                                        
  "sdk": {                                     
    "path": "/root/.dotnet",      
    "version": "8.0.100"              
  },                                   
  "formattingOptions": {                
    "tabSize": 2               
  },
  "runtimeOptions": {           
    "tfm": "net8.0",
    "rollForward": "LatestMajor",          
    "framework": {                  
      "name": "Microsoft.NETCore.App",       
      "version": "8.0.0"             
     },                        
  "configProperties": {            
            
    "System.Reflection.Metadata.MetadataUpdater.IsSupported": false           
    }
  }                                           
}

I'm using AArch64 Android Termux proot-distro Debian...

If instead of listing both SDK.path and SDK.version in your config. If you just set the SDK.path to /root/.dotnet/sdk, do thinks work better for you?

If instead of listing both SDK.path and SDK.version in your config. If you just set the SDK.path to /root/.dotnet/sdk, do thinks work better for you?

Hi, thanks for reply! I tried to remove sdk.version and set sdk.path to /root/.dotnet/sdk, but still got no luck. I'll take a closer look someday and open another issue with better description. Thanks a lot ;)