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

[ERROR] Error: OmniSharp server load timed out. #1585

Closed
petrck opened this issue Jun 23, 2017 · 25 comments
Closed

[ERROR] Error: OmniSharp server load timed out. #1585

petrck opened this issue Jun 23, 2017 · 25 comments

Comments

@petrck
Copy link

petrck commented Jun 23, 2017

Environment data

.NET Command Line Tools (2.0.0-preview1-005977)

Product Information:
 Version:            2.0.0-preview1-005977
 Commit SHA-1 hash:  414cab8a0b

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0-preview1-005977/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0-preview1-002111-00
  Build    : 1ff021936263d492539399688f46fd3827169983

VS Code version: 1.13.1 (1.13.1)

C# Extension version: 1.11.0-beta4 (or 1.10.0 - tried both)

Steps to reproduce

Just start vscode in 6/21/2017 morning (maybe vscode automatically installed any updates. I'm not sure)

Expected behavior

Start omnisharp, working intellisence, "go to definiton", etc.

Actual behavior

[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

Starting OmniSharp server at 6/23/2017, 11:10:44 AM
    Target: /Users/petrtomasek/Projects/CestujnakoleNew

OmniSharp server started wth Mono
    Path: /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.11.0-beta4/bin/run
    PID: 5164

OmniSharp: -s /Users/petrtomasek/Projects/CestujnakoleNew --hostPID 5046 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/petrtomasek/Projects/CestujnakoleNew' on host 5046."},"Seq":1,"Type":"event"}
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Initializing in /Users/petrtomasek/Projects/CestujnakoleNew
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBUILD_EXE_PATH environment variable set to /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.11.0-beta4/bin/omnisharp/msbuild/MSBuild.dll
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBuildExtensionsPath environment variable set to /Users/petrtomasek/.vscode/extensions/ms-vscode.csharp-1.11.0-beta4/bin/omnisharp/msbuild
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        MSBuild will use local OmniSharp installation.
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        No solution files found in '/Users/petrtomasek/Projects/CestujnakoleNew'
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/petrtomasek/Projects/CestujnakoleNew/CestujnakoleNew.csproj
Discovered Mono file path: /Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
Resolved symbolic link for Mono file path: /Library/Frameworks/Mono.framework/Versions/5.0.1/bin/mono-sgen32
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

The same problem with release versions of CLI (1.0.4)
Can you help me, what is wrong? Thank you very much, for your time.

@pixelypants
Copy link

pixelypants commented Jun 25, 2017

I've also been getting this error and have been disabling OmniSharp > reload vscode > enable OmniSharp > reload vscode and it works again.

@petrck
Copy link
Author

petrck commented Jun 25, 2017

@pixelypants Thank you for answer. I tried: disable extension (always) -> restart -> enable (always), but doesn't work.

@DustinCampbell
Copy link
Member

I'll be working on improving the start up performance/experience of the OmniSharp server soon. In the meantime, you can set the 'omnisharp.projectLoadTimeout' setting in VS Code as the error says to do. By default, this is set to 60 and increasing it can help.

@petrck
Copy link
Author

petrck commented Jun 30, 2017

Perfect. It really helps. Thank you!

@petrck petrck closed this as completed Jun 30, 2017
@technicalganesh
Copy link

The Timeout setting, I set to 1200 then only it works. But I have to wait for so long to complete the OmniSharp server to load completely.
In some cases, the server fails to load and facing issues. Planing to go back to Visual Studio until this issue is resolved. I will keep watching this thread with my fingers crossed...

@DustinCampbell
Copy link
Member

@technicalganesh: How long does it take to load your project? Do you have details about the size of your project? What sorts of projects are they?

@technicalganesh
Copy link

technicalganesh commented Oct 13, 2017

@DustinCampbell: Thanks for considering my issue.

Mine is a .Net core 2 solution with 6 Projects in it. Among them 5 are .Net Standard Class Libraries. These are ofcourse loading faster and no issues I am facing with them. The one that takes me to the hell is the MVC Web Project It does have 6 controllers including the HomeController, a Startup.cs file, Program.cs and three to four simple static helper classes. But it has a bunch of client-side libraries like, Angular and other js stuffs.
Initially it was somehow good enough to load this project in 30 seconds. But, as I started developing more Angular, Javascript code files, and couple of more API methods in the existing controllers, the loading time of this particular project went upto level of requirement to have Project Timeout settings to have the value 900 in it.
Now I am having 1200 which is working. but more than 15 to 20 minutes!....

I uninstall the OmniSharp and reinstalled it. But, found no use of doing it.

I hope you understand the situation.
Is there any ways to exclude OmniSharp to exclude wwwroot folder while interpreting the project files?

The Output Window of OmniSharp was showing as below.... It took more than 15 minutes to contunue from this : /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Web/DiamondCut.Web.csproj.

Starting OmniSharp server at 2017-10-13 20:24:20
    Target: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.sln

OmniSharp server started wth Mono
    Path: /Users/ganesh/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/run
    PID: 8019

OmniSharp: -s /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.sln --hostPID 7998 --stdio DotNet:enablePackageRestore=false --encoding utf-8 --loglevel information formattingOptions:useTabs=false formattingOptions:tabSize=4 formattingOptions:indentationSize=4
{"Event":"log","Body":{"LogLevel":"INFORMATION","Name":"OmniSharp.Startup","Message":"Omnisharp server running using Stdio at location '/Users/ganesh/Projects/Diamond/DiamondCut' on host 7998."},"Seq":1,"Type":"event"}
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Initializing in /Users/ganesh/Projects/Diamond/DiamondCut
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Auto package restore: False
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Update workspace context
[info]: OmniSharp.DotNet.DotNetProjectSystem
        Resolving projects references
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        OmniSharp initialized with Mono MSBuild.
    MSBUILD_EXE_PATH: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/MSBuild.dll
    MSBuildExtensionsPath: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/xbuild
    TargetFrameworkRootPath: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/xbuild-frameworks
    RoslynTargetsPath: /Users/ganesh/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/Roslyn
    CscToolPath: /Users/ganesh/.vscode/extensions/ms-vscode.csharp-1.12.1/.omnisharp/omnisharp/msbuild/Roslyn

[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Detecting projects in '/Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.sln'.
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Standards/DiamondCut.Standards.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.EF/DiamondCut.EF.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Entities/DiamondCut.Entities.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Models/DiamondCut.Models.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Commands/DiamondCut.Commands.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Loading project: /Users/ganesh/Projects/Diamond/DiamondCut/DiamondCut.Web/DiamondCut.Web.csproj
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Standards
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.EF
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Entities
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Models
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Commands
[info]: OmniSharp.MSBuild.MSBuildProjectSystem
        Update project: DiamondCut.Web
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/Users/ganesh/Projects/Diamond/DiamondCut'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.Services.WorkspaceHelper
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.Startup
        Configuration finished.

@DustinCampbell
Copy link
Member

You mentioned adding Angular and lots of JavaScript files slows down project loading. Is it possible that you're encountering this issue? https://github.com/dotnet/cli/issues/7525

@technicalganesh
Copy link

technicalganesh commented Oct 13, 2017

@DustinCampbell , At this point you are a great man to save my life....! Thanks a lot!...

I just added these line given below as mentioned in the thread but with respect to my folder structure and this thing pushed the loading of OmniSharp in couple of seconds,
<PropertyGroup> <DefaultItemExcludes>wwwroot/global/**;$(DefaultItemExcludes)</DefaultItemExcludes> <DefaultItemExcludes>wwwroot/vendors/**;$(DefaultItemExcludes)</DefaultItemExcludes> </PropertyGroup>

But, Is it going to create any side effects in terms of building for deployment or so? Just wanted to confirm if you know.

Once again thanks to you!

@DustinCampbell
Copy link
Member

Excellent! Thanks for verifying!

@technicalganesh
Copy link

technicalganesh commented Oct 13, 2017

You might not have noticed my question just I updated in the above comment....

"But, Is it going to create any side effects in terms of building for deployment or so? Just wanted to confirm if you know."

@DustinCampbell
Copy link
Member

I did miss that --thanks!

I don't believe it will affect deployment, but I'm not an expert in ASP.NET projects. It would be best to try a dotnet publish and make sure everything is in the right place.

However, I expect it will affect your build by making it faster. Assuming there are no files in wwwroot/global/ or wwwroot/vendors/ required for compilation, dotnet build should run much faster.

@technicalganesh
Copy link

technicalganesh commented Oct 13, 2017

Yes! It builds faster....!

@ganeshr43
Copy link

This helps saving hell lot of time! Thank you @DustinCampbell & @technicalganesh

@shashibhanmaurya
Copy link

I had the same problem with Omnisharp, Where intelligence was not working even with a Console application. I had to install .Net Framework 4, 4.5 and 4.7.2.
Hope this will help in case of issue with Omnisharp.

Thanks,
Shashi Bhan

@jeriwice
Copy link

Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

Please how can I extend the default delay time? Are there any alternatives to resolve this?

@rchande
Copy link

rchande commented Sep 21, 2018

@jeriwice You can do as directed in this comment #1585 (comment)

@stbth01
Copy link

stbth01 commented Mar 27, 2019

Had to reinstalled the C# extension (v1.18.0 now) and this issue seems to have come up again. I have tried setting the default to 120 and 1200 and continue to get the output in the log seen below.

I tried uninstalling/reinstalling, restarting OmniSharp but just keep getting the time out error. I was able to get omnisharp started by downgrading to 1.17.1 (using these instruction https://tpodolak.com/blog/2017/04/09/downgrading-visual-studio-code-extension/)

##################################################
Starting OmniSharp server at 3/27/2019, 3:45:37 PM
Target: c:\Users[...]\Desktop\ProjectWork\Task2_DQ\MACBIS_DQ.sln

OmniSharp server started.
Path: C:\Users[...].vscode\extensions\ms-vscode.csharp-1.18.0.omnisharp\1.32.11\OmniSharp.exe
PID: 11404

[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

#####################################################

Extension Author (truncated) Version
ng-template Ang 0.1.11
npm-intellisense chr 1.3.0
path-intellisense chr 1.4.2
bracket-pair-colorizer Coe 1.0.61
githistory don 0.4.6
xml Dot 2.4.0
gitlens eam 9.5.1
tslint eg2 1.0.43
vscode-npm-script eg2 0.3.5
prettier-vscode esb 1.8.1
angular2-switcher inf 0.2.0
csharpextensions jch 1.3.0
vscode-nuget-package-manager jmr 1.1.6
Angular-BeastCode Mik 7.2.6
mssql ms- 1.5.0
python ms- 2019.3.6139
csharp ms- 1.18.0
debugger-for-chrome msj 4.11.3
material-icon-theme PKi 3.7.0
LiveServer rit 5.5.1
autoimport ste 1.5.3

@matheusicaro
Copy link

matheusicaro commented Feb 4, 2020

@TopGuo i have also this problem.

dyld: Library not loaded: /Library/Frameworks/Mono.framework/Versions/6.6.0/lib/libintl.8.dylib Referenced from: /Users/bi001971/.vscode/extensions/ms-vscode.csharp-1.21.10/.omnisharp/1.34.10/bin/mono Reason: image not found /Users/bi001971/.vscode/extensions/ms-vscode.csharp-1.21.10/.omnisharp/1.34.10/run: line 28: 1550 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).

@filipw
Copy link
Contributor

filipw commented Feb 4, 2020

@matheusicaro you have a different issue. see #3545 (comment)

@norbux
Copy link

norbux commented Mar 18, 2021

Hello, I am having the timeout issue too, Using v1.23.9 and omnisharp.projectLoadTimeout set to 1200, so after 20 mins it still drops the timeout error. My .sln includes 2 asp .net core 3.1 projects and it is not a big codebase

@VictorH-Malta
Copy link

VictorH-Malta commented Oct 7, 2021

I've also been getting this error and have been disabling OmniSharp > reload vscode > enable OmniSharp > reload vscode and it works again.

Omg, after hundreds of tries, this finaly worked for me! Thank you <3

@IsaacGutierrez
Copy link

IsaacGutierrez commented Dec 24, 2022

You should add the path where the .net6 is installed in the OmniSharp configuration.

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

No branches or pull requests

15 participants