tareqimbasher / NetPad

A cross-platform C# editor and playground.
MIT License
1.25k stars 66 forks source link

Omnisharp server fails to start #92

Closed P-de-Jong closed 10 months ago

P-de-Jong commented 11 months ago

Just installed NetPad on Pop!_OS, getting an error: "OmniSharp Server failed to start".

image

Message from log file:

2023-09-21T14:23:00.7769721+02:00 [ERR] (PID: 101725|NetPad.Plugins.OmniSharp.Services.OmniSharpServerCatalog) Error occurred starting OmniSharp server
System.PlatformNotSupportedException: OS Architecture 'X64' is not supported. OS: (Linux 6.4.6-76060406-generic #202307241739~1694621917~22.04~ac5e1a8 SMP PREEMPT_DYNAMIC Wed S)
   at NetPad.Utilities.PlatformUtil.IsOsArchitectureSupported(Boolean throwIfNotSupported) in /home/tips/Source/TIPS/NetPad/src/Core/NetPad.Domain/Utilities/PlatformUtil.cs:line 38
   at NetPad.Plugins.OmniSharp.Services.OmniSharpServerDownloader.DownloadAsync(OSPlatform platform) in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerDownloader.cs:line 50
   at NetPad.Plugins.OmniSharp.Services.OmniSharpServerDownloader.DownloadAsync(OSPlatform platform) in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerDownloader.cs:line 93
   at NetPad.Plugins.OmniSharp.Services.OmniSharpServerLocator.GetServerLocationAsync() in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerLocator.cs:line 41
   at NetPad.Plugins.OmniSharp.Services.AppOmniSharpServer.StartOmniSharpServerAsync() in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/AppOmniSharpServer.cs:line 132
   at NetPad.Plugins.OmniSharp.Services.AppOmniSharpServer.StartAsync() in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/AppOmniSharpServer.cs:line 87
   at NetPad.Plugins.OmniSharp.Services.OmniSharpServerCatalog.<>c__DisplayClass7_1.<<StartOmniSharpServerAsync>b__1>d.MoveNext() in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerCatalog.cs:line 108
P-de-Jong commented 11 months ago

Went through the code a bit, opened a PR for a fix (:

tareqimbasher commented 11 months ago

Didn't mean to close. An update will be released asap with this fix.

bennich commented 11 months ago

I see the same behavior on OSX as well for both the Arm64 and X64 binaries.

System.PlatformNotSupportedException: OS Architecture 'Arm64' is not supported. OS: (Darwin 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:53 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020) at NetPad.Utilities.PlatformUtil.IsOsArchitectureSupported(Boolean throwIfNotSupported) in /Users/user245337/Downloads/NetPad/src/Core/NetPad.Domain/Utilities/PlatformUtil.cs:line 38 at NetPad.Plugins.OmniSharp.Services.OmniSharpServerDownloader.DownloadAsync(OSPlatform platform) in /Users/user245337/Downloads/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerDownloader.cs:line 50 at NetPad.Plugins.OmniSharp.Services.OmniSharpServerDownloader.DownloadAsync(OSPlatform platform) in /Users/user245337/Downloads/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerDownloader.cs:line 93 at NetPad.Plugins.OmniSharp.Services.OmniSharpServerLocator.GetServerLocationAsync() in /Users/user245337/Downloads/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerLocator.cs:line 41 at NetPad.Plugins.OmniSharp.Services.AppOmniSharpServer.StartOmniSharpServerAsync() in /Users/user245337/Downloads/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/AppOmniSharpServer.cs:line 132 at NetPad.Plugins.OmniSharp.Services.AppOmniSharpServer.StartAsync() in /Users/user245337/Downloads/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/AppOmniSharpServer.cs:line 87 at NetPad.Plugins.OmniSharp.Services.OmniSharpServerCatalog.<>c__DisplayClass7_1.<<StartOmniSharpServerAsync>b__1>d.MoveNext() in /Users/user245337/Downloads/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerCatalog.cs:line 108

and

2023-09-25T16:13:33.7746560+02:00 [ERR] (PID: 26879|NetPad.Plugins.OmniSharp.Services.OmniSharpServerCatalog) Error occurred starting OmniSharp server System.PlatformNotSupportedException: OS Architecture 'X64' is not supported. OS: (Darwin 22.6.0 Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:53 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020) at NetPad.Utilities.PlatformUtil.IsOsArchitectureSupported(Boolean throwIfNotSupported) in /home/tips/Source/TIPS/NetPad/src/Core/NetPad.Domain/Utilities/PlatformUtil.cs:line 38 at NetPad.Plugins.OmniSharp.Services.OmniSharpServerDownloader.DownloadAsync(OSPlatform platform) in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerDownloader.cs:line 50 at NetPad.Plugins.OmniSharp.Services.OmniSharpServerDownloader.DownloadAsync(OSPlatform platform) in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerDownloader.cs:line 93 at NetPad.Plugins.OmniSharp.Services.OmniSharpServerLocator.GetServerLocationAsync() in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerLocator.cs:line 41 at NetPad.Plugins.OmniSharp.Services.AppOmniSharpServer.StartOmniSharpServerAsync() in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/AppOmniSharpServer.cs:line 132 at NetPad.Plugins.OmniSharp.Services.AppOmniSharpServer.StartAsync() in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/AppOmniSharpServer.cs:line 87 at NetPad.Plugins.OmniSharp.Services.OmniSharpServerCatalog.<>c__DisplayClass7_1.<<StartOmniSharpServerAsync>b__1>d.MoveNext() in /home/tips/Source/TIPS/NetPad/src/Plugins/NetPad.Plugins.OmniSharp/Services/OmniSharpServerCatalog.cs:line 108

tareqimbasher commented 11 months ago

This issue is going to affect all new installs on all operating systems. It stops downloading OmniSharp if it hasn't already been downloaded, but for existing installs this issue won't manifest.

A quick fix until the new update is released (which I'm trying to get out asap) is to download and run v0.4.2 and wait for it to finish downloading OmniSharp. That should fix it, you can then run v0.5.0 without an issue.

bennich commented 11 months ago

This issue is going to affect all new installs on all operating systems. It stops downloading OmniSharp if it hasn't already been downloaded, but for existing installs this issue won't manifest.

A quick fix until the new update is released (which I'm trying to get out asap) is to download and run v0.4.2 and wait for it to finish downloading OmniSharp. That should fix it, you can then run v0.5.0 without an issue.

Awesome - fix confirmed working 👍

hbarkine commented 11 months ago

Hey! Just came here to check this issue, downloading 0.4.2 made it work. Since I am here thanks for the great work guys. I am a Unity Developer and it is sometimes really hard to test things on Unity side when the App gets too big. Kudos!

tareqimbasher commented 10 months ago

v0.5.1 is out and fixes this issue. Sorry for the delay everyone!

@hbarkine Thank you for the support! Really glad you're enjoying it.