Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omnisharp fails to load #3545

Closed
steveoh opened this issue Feb 3, 2020 · 22 comments · Fixed by OmniSharp/omnisharp-roslyn#1697
Closed

Omnisharp fails to load #3545

steveoh opened this issue Feb 3, 2020 · 22 comments · Fixed by OmniSharp/omnisharp-roslyn#1697

Comments

@steveoh
Copy link
Contributor

steveoh commented Feb 3, 2020

Issue Description

Omnisharp fails to load

Steps to Reproduce

Open dotnet project and look at log

Expected Behavior

omnisharp should start

Actual Behavior

image not found and the server times out when trying to load

Logs

OmniSharp log
Starting OmniSharp server at 2/3/2020, 3:56:00 PM
    Target: /Users/-/dev/app

OmniSharp server started.
    Path: /Users/-/.vscode/extensions/ms-vscode.csharp-1.21.10/.omnisharp/1.34.11-beta.9/run
    PID: 56441

dyld: Library not loaded: /Library/Frameworks/Mono.framework/Versions/6.6.0/lib/libintl.8.dylib
  Referenced from: /Users/-/.vscode/extensions/ms-vscode.csharp-1.21.10/.omnisharp/1.34.11-beta.9/bin/mono
  Reason: image not found
/Users/-/.vscode/extensions/ms-vscode.csharp-1.21.10/.omnisharp/1.34.11-beta.9/run: line 28: 56446 Abort trap: 6           "${mono_cmd}" "${omnisharp_cmd}" "$@"
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute)
C# log
Downloading package 'OmniSharp for OSX' (44823 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'OmniSharp for OSX'

Downloading package '.NET Core Debugger (macOS / x64)' (41849 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package '.NET Core Debugger (macOS / x64)'

Downloading package 'Razor Language Server (macOS / x64)' (50424 KB).................... Done!
Installing package 'Razor Language Server (macOS / x64)'

Finished

Getting latest OmniSharp version information
Downloading package 'Latest OmniSharp Version Information' (1 KB).................... Done!
Installing OmniSharp Version = 1.34.11-beta.9...
Platform: darwin, x86_64

Downloading package 'OmniSharp for OSX, Version = 1.34.11-beta.9' (44823 KB).................... Done!
Installing package 'OmniSharp for OSX, Version = 1.34.11-beta.9'

Finished

Environment information

VSCode version: 1.41.1
C# Extension: 1.21.10

Mono Information OmniSharp using built-in mono
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.100 Commit: cd82f021f4

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.100/

Host (useful for support):
Version: 3.1.0
Commit: 65f04fb6db

.NET Core SDKs installed:
2.2.207 [/usr/local/share/dotnet/sdk]
2.2.300 [/usr/local/share/dotnet/sdk]
3.0.100 [/usr/local/share/dotnet/sdk]
3.1.100 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
alexa-skills-kit-toolkit ask-toolkit 1.0.2
amvim auiworks 1.30.0
ariake-dark wart 0.2.2
bracket-pair-colorizer-2 CoenraadS 0.0.29
code-settings-sync Shan 3.4.3
code-spell-checker streetsidesoftware 1.7.22
colonize vmsynkov 2.2.2
csharp ms-vscode 1.21.10
debugger-for-chrome msjsdiag 4.12.6
dotenv mikestead 1.0.1
dotnet-test-explorer formulahendry 0.7.1
EditorConfig EditorConfig 0.14.4
folderize ee92 0.0.5
gc-excelviewer GrapeCity 2.1.32
ginfuru-vscode-jekyll-syntax ginfuru 0.1.0
git-project-manager felipecaputo 1.7.1
gitlens eamodio 10.2.0
language-stylus sysoev 1.11.0
mssql ms-mssql 1.8.0
npm-intellisense christian-kohler 1.3.0
output-colorizer IBM 0.1.2
partial-diff ryu1kn 1.4.1
pdf tomoki1207 0.5.1
poor-mans-t-sql-formatter-vscode TaoKlerks 1.6.10
powershell ms-vscode 2020.1.0
python ms-python 2020.1.58038
regex chrmarti 0.2.0
slack-theme felipe-mendes 1.9.11
terraform mauve 1.4.0
turndown-vscode kurre 1.0.2
vsc-community-material-theme Equinusocio 1.4.0
vsc-material-theme Equinusocio 32.4.0
vsc-material-theme-icons equinusocio 1.1.3
vscode-coverage-gutters ryanluker 2.4.3
vscode-css-formatter aeschli 1.0.1
vscode-docker ms-azuretools 0.10.0
vscode-eslint dbaeumer 2.0.15
vscode-fileutils sleistner 3.0.1
vscode-github-notifications-bell fabiospampinato 2.3.1
vscode-icons vscode-icons-team 9.7.0
vscode-jekyll-snippets ginfuru 0.9.1
vscode-markdownlint DavidAnson 0.34.0
vscode-npm-script eg2 0.3.11
vscode-pull-request-github GitHub 0.14.0
vscode-sort-json richie5um2 1.18.0
vscode-stylint HaaLeo 0.1.3
vscode-zipexplorer slevesque 0.3.1
vsliveshare ms-vsliveshare 1.0.1510
vsliveshare-audio ms-vsliveshare 0.1.80
wordcount ms-vscode 0.1.0
xml DotJoshJohnson 2.5.0
@andrew-myob
Copy link

I'm getting this same issue. I've worked around it by setting "omnisharp.useGlobalMono": "always" and installing Mono via homebrew.

@andrew-myob
Copy link

I'm getting this same issue. I've worked around it by setting "omnisharp.useGlobalMono": "always" and installing Mono via homebrew.

i only update mono the problem have sloved,but "omnisharp.useGlobalMono" still is default!

brew update && brew install mono

Mono JIT compiler version 6.8.0.96 (tarball Thu Jan 16 04:16:52 GMT 2020)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	Interpreter:   yes
	LLVM:          supported, not enabled.
	Suspend:       hybrid
	GC:            sgen (concurrent by default)

True, I just removed my setting and it's still working.

@jeremysu0131
Copy link

Downgrade to ver 1.21.9 can prevent the problem temporary...

@filipw
Copy link
Contributor

filipw commented Feb 4, 2020

@JoeRobich would you mind looking into this? looks like it's related to OmniSharp/omnisharp-roslyn#1679 - thanks!

@JoeRobich
Copy link
Member

Looks like it was caused by this Mono issue - mono/mono#18531.

6.6.0.161 which is what we packaged seems to be the last 6.6.0 build. We need to revert back to 6.4.0 or bump to 6.8.0.

@filipw
Copy link
Contributor

filipw commented Feb 4, 2020

ouch. I reckon we could bump the bundled runtime to 6.8.0 that's also stable already.

@filipw
Copy link
Contributor

filipw commented Feb 4, 2020

The current workaround - if you are affected - would be to one of the following:

  • downgrade back to 1.21.9
  • install Mono 6.6.0

I would personally recommend the latter since the MSBuild behavior with global Mono install on your machine would be better.

@steveoh
Copy link
Contributor Author

steveoh commented Feb 4, 2020

Looks like i need a mono upgrade...

$ mono --version
Mono JIT compiler version 5.12.0.301 (2018-02/4fe3280bba1 Fri Jul 20 08:25:42 EDT 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	Interpreter:   yes
	LLVM:          yes(3.6.0svn-mono-master/8b1520c8aae)
	GC:            sgen (concurrent by default)

update

6.6.0 has omnisharp loaded and working. Thanks for the details and work around.

Would you like me to close the issue or do you want to close it when 6.8.0 is functioning?

@filipw
Copy link
Contributor

filipw commented Feb 4, 2020

I think it should stay open until we patch this

@tverboon
Copy link

tverboon commented Feb 5, 2020

What is the reason mono is being used and not .Net Core?

@filipw
Copy link
Contributor

filipw commented Feb 5, 2020

not all MSBuild tasks would work on .NET Core which would impact non-.NET Core projects.

@steveoh
Copy link
Contributor Author

steveoh commented Feb 10, 2020

@filipw am I safe to install mono from homebrew and have it stay current now?

@Bio-Tvorogok
Copy link

I'm getting this same issue. I've worked around it by setting "omnisharp.useGlobalMono": "always" and installing Mono via homebrew.

God, man, you're my savior, I almost got to the point of removing the system))

@brnhensley
Copy link

I was having the same issue for a few months now and my problem was solved by changing "omnisharp.waitForDebugger": true to false. I'm not sure what the original cause was but finally the omnisharp server stopped timing out.

@MrDave1999
Copy link

I'm getting this same issue. I've worked around it by setting "omnisharp.useGlobalMono": "always" and installing Mono via homebrew.

This solved my problem, thank you!

@steveoh
Copy link
Contributor Author

steveoh commented Apr 12, 2022

isn't there a dotnet core implementation now that does not need mono at all?

@JoeRobich
Copy link
Member

Mono and MSBuild are no longer included with nightly builds of O#. See the announcement at #5120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants