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

Intellisense no longer working for Web API project #2997

Closed
dietermijle opened this issue Apr 17, 2019 · 13 comments · Fixed by OmniSharp/omnisharp-roslyn#1473
Closed

Intellisense no longer working for Web API project #2997

dietermijle opened this issue Apr 17, 2019 · 13 comments · Fixed by OmniSharp/omnisharp-roslyn#1473

Comments

@dietermijle
Copy link

Getting the following error recently when loading my solution in VS Code.

[2019-04-17 11:34:34.302] [exthost] [info] extension host started
[2019-04-17 11:34:34.338] [exthost] [info] ExtensionService#_doActivateExtension jchannon.csharpextensions {"startup":false,"activationEvent":"onLanguage:csharp"}
[2019-04-17 11:34:34.338] [exthost] [info] ExtensionService#loadCommonJSModule /home/dieter/.vscode/extensions/jchannon.csharpextensions-1.3.0/out/src/extension
[2019-04-17 11:34:34.368] [exthost] [info] ExtensionService#_doActivateExtension k--kato.docomment {"startup":false,"activationEvent":"onLanguage:csharp"}
[2019-04-17 11:34:34.368] [exthost] [info] ExtensionService#loadCommonJSModule /home/dieter/.vscode/extensions/k--kato.docomment-0.1.6/out/src/extension
[2019-04-17 11:34:34.373] [exthost] [info] ExtensionService#_doActivateExtension ms-vscode.csharp {"startup":false,"activationEvent":"onLanguage:csharp"}
[2019-04-17 11:34:34.373] [exthost] [info] ExtensionService#loadCommonJSModule /home/dieter/.vscode/extensions/ms-vscode.csharp-1.19.0/dist/extension
[2019-04-17 11:34:34.422] [exthost] [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch {"startup":true,"activationEvent":"*"}
[2019-04-17 11:34:34.422] [exthost] [info] ExtensionService#loadCommonJSModule /usr/share/code/resources/app/extensions/debug-auto-launch/dist/extension
[2019-04-17 11:34:34.427] [exthost] [info] ExtensionService#_doActivateExtension vscode.emmet {"startup":true,"activationEvent":"*"}
[2019-04-17 11:34:34.427] [exthost] [info] ExtensionService#loadCommonJSModule /usr/share/code/resources/app/extensions/emmet/dist/extension
[2019-04-17 11:34:34.431] [exthost] [info] ExtensionService#_doActivateExtension vscode.git {"startup":true,"activationEvent":"*"}
[2019-04-17 11:34:34.431] [exthost] [info] ExtensionService#loadCommonJSModule /usr/share/code/resources/app/extensions/git/dist/main
[2019-04-17 11:34:34.452] [exthost] [info] ExtensionService#_doActivateExtension vscode.merge-conflict {"startup":true,"activationEvent":"*"}
[2019-04-17 11:34:34.452] [exthost] [info] ExtensionService#loadCommonJSModule /usr/share/code/resources/app/extensions/merge-conflict/dist/extension
[2019-04-17 11:34:34.454] [exthost] [info] ExtensionService#_doActivateExtension eamodio.gitlens {"startup":true,"activationEvent":"*"}
[2019-04-17 11:34:34.454] [exthost] [info] ExtensionService#loadCommonJSModule /home/dieter/.vscode/extensions/eamodio.gitlens-9.6.1/dist/extension
[2019-04-17 11:34:34.482] [exthost] [info] ExtensionService#_doActivateExtension vscode-icons-team.vscode-icons {"startup":true,"activationEvent":"*"}
[2019-04-17 11:34:34.482] [exthost] [info] ExtensionService#loadCommonJSModule /home/dieter/.vscode/extensions/vscode-icons-team.vscode-icons-8.5.0/out/src/
[2019-04-17 11:34:34.872] [exthost] [info] eager extensions activated
[2019-04-17 11:35:34.349] [exthost] [error] [ms-vscode.csharp] provider FAILED
[2019-04-17 11:35:34.349] [exthost] [error] Problem invoking 'GetCodeActions' on OmniSharp server: Error: Pending request cancelled: /v2/getcodeactions
[2019-04-17 11:35:35.726] [exthost] [error] [ms-vscode.csharp] provider FAILED
[2019-04-17 11:35:35.726] [exthost] [error] Problem invoking 'GetCodeActions' on OmniSharp server: Error: Pending request cancelled: /v2/getcodeactions
[2019-04-17 11:35:37.526] [exthost] [error] [ms-vscode.csharp] provider FAILED
[2019-04-17 11:35:37.526] [exthost] [error] Problem invoking 'GetCodeActions' on OmniSharp server: Error: Pending request cancelled: /v2/getcodeactions

OmniSharp log stops at 'Adding project' for first project in the solution

Starting OmniSharp server at 4/17/2019, 11:34:34 AM
    Target: /project/service.sln

OmniSharp server started.
    Path: /home/dieter/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/run
    PID: 19561

[info]: OmniSharp.Stdio.Host
        Starting OmniSharp on linuxmint 18.3 (x64)
[info]: OmniSharp.Services.DotNetCliService
        DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Located 1 MSBuild instance(s)
            1: StandAlone 15.0 - "/home/dieter/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        MSBUILD_EXE_PATH environment variable set to '/home/dieter/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: StandAlone 15.0 - "/home/dieter/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/omnisharp/.msbuild/Current/Bin"
            MSBuildExtensionsPath = /home/dieter/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/omnisharp/.msbuild
            BypassFrameworkInstallChecks = true
            CscToolPath = /home/dieter/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/omnisharp/.msbuild/Current/Bin/Roslyn
            CscToolExe = csc.exe
            MSBuildToolsPath = /home/dieter/.vscode/extensions/ms-vscode.csharp-1.19.0/.omnisharp/1.32.18/omnisharp/.msbuild/Current/Bin
[info]: OmniSharp.Cake.CakeProjectSystem
        Detecting Cake files in '/project'.
[info]: OmniSharp.Cake.CakeProjectSystem
        Could not find any Cake files
[info]: OmniSharp.WorkspaceInitializer
        Project system 'OmniSharp.DotNet.DotNetProjectSystem' is disabled in the configuration.
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in '/project/service.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/project/src/Service.Api/Service.Api.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/project/src/Service.Domain/Service.Domain.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/project'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpWorkspaceOptionsProvider
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /project/src/Service.Api/Service.Api.csproj
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/project' on host 19435.
[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/project/src/Service.Api/Service.Api.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/project/src/Service.Api/Service.Api.csproj'

As a result, my Intellisense is no longer working.
Any idea how to resolve this?

I tried uninstalling & re-installing VS code completely, but without success.

@mario-d-s
Copy link

Can confirm this is an issue.

  • OS: Debian Stretch 9.8
  • .NET Core 2.2.202
  • VS Code 1.33.1
  • C# Extension 1.19.0

Output of "Log (Extension Host)":

[2019-04-17 13:19:27.989] [exthost] [error] [jchannon.csharpextensions] provider FAILED
[2019-04-17 13:19:27.991] [exthost] [error] Error: Illegal argument: line must be non-negative
at Object.t.illegalArgument (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:10:414)
at new p (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:327:888)
at new p (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:327:254)
at CodeActionProvider.getInitializeFromCtorCommand (/home/mario/.vscode/extensions/jchannon.csharpextensions-1.3.0/out/src/codeActionProvider.js:166:61)
at addInitalizeFromCtor (/home/mario/.vscode/extensions/jchannon.csharpextensions-1.3.0/out/src/codeActionProvider.js:15:28)
at CodeActionProvider.provideCodeActions (/home/mario/.vscode/extensions/jchannon.csharpextensions-1.3.0/out/src/codeActionProvider.js:19:9)
at define.provideCodeActions.a.asPromise (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:587:847)
at t.asPromise.Promise (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:49:430)
at new Promise (:null:null)
at Object.t.asPromise (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:49:402)
at D.provideCodeActions (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:587:818)
at define.$provideCodeActions._withAdapter.e (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:604:253)
at B._withAdapter (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:599:159)
at B.$provideCodeActions (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:604:231)
at d._doInvokeHandler (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:622:11)
at d._invokeHandler (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:621:716)
at d._receiveRequest (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:620:341)
at d._receiveOneMessage (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:619:141)
at define.constructor._protocol.onMessage.e (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:617:400)
at u.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:708)
at e (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:40:460)
at u.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:708)
at a (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:172:467)
at e (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:172:513)
at u.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:708)
at y._receiveMessage (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:181:276)
at define.constructor._socketDisposables.push._socketReader.onMessage.e (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:178:415)
at u.fire (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:44:708)
at f.acceptChunk (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:175:35)
at define.constructor._register._socket.onData.e (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:174:410)
at Socket.t (/usr/share/code/resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:182:689)
at Socket.emit (events.js:182:13)
at addChunk (_stream_readable.js:279:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onread (net.js:636:20)

[2019-04-17 13:19:27.992] [exthost] [error] [ms-vscode.csharp] provider FAILED
[2019-04-17 13:19:27.992] [exthost] [error] Problem invoking 'GetCodeActions' on OmniSharp server: Error: Pending request cancelled: /v2/getcodeactions
[2019-04-17 13:19:29.646] [exthost] [error] [ms-vscode.csharp] provider FAILED
[2019-04-17 13:19:29.646] [exthost] [error] Problem invoking 'GetCodeActions' on OmniSharp server: Error: Pending request cancelled: /v2/getcodeactions

@filipw
Copy link
Contributor

filipw commented Apr 17, 2019

in this case the error comes from an external extension, jchannon.csharpextensions-1.3.0 - could you please try disabling it and see if it helps?

@dietermijle
Copy link
Author

Seems like the error was due to the latest version of the C# extension.

When installing latest version (1.19.0), the above error occurs.
After rolling back to 1.18.0, everything seems to work fine again.

@AndrewTriesToCode
Copy link

I'm seeing this too on MacOS Mojave, VSCode 1.33.1, and omnisharp-vscode 1.19.

@thomazmoura
Copy link

thomazmoura commented Apr 18, 2019

Same behavior here - Windows 10, VS Code 1.33.1, and omnisharp-vscode 1.19.

Omnisharp Log stops at adding project, but on extension host, these logs keep appearing:

[2019-04-18 10:14:14.193] [exthost] [error] [ms-vscode.csharp] provider FAILED
[2019-04-18 10:14:14.193] [exthost] [error] Problem invoking 'GetCodeActions' on OmniSharp server: Error: Pending request cancelled: /v2/getcodeactions

Weirdly enough, this happens on a specific project but not on another. I've tried to make the one working break as the other one and fix the broken one based on the working one but I've failed on both attempts. Only rolling back to 1.18 makes the intellisense work again on the broken project (but VS Code keeps updating it back, so this workaround is quite a pain)

The same thing happened to another developer on another machine on the same broken project. Rolling back to 1.18 also solved the problem (so it seems to be a specific kind of project on the 1.19 version of the omnisharp-vscode that is consistently breaking). Unfortunately neither of the projects I have are open source.

@thomazmoura
Copy link

@dietermijle, does your .csproj file have any stars (*) for package versions? This problem might be the same as #3009 .

The project that I 've mentioned that has broken intellisense on 1.19 apparently works fine now after changing the stars to '0' and restarting VS Code. The project that was working fine all along didn't have any stars on the .csproj.

@AndrewTriesToCode
Copy link

AndrewTriesToCode commented Apr 18, 2019 via email

@thomazmoura
Copy link

@achandlerwhite can you remove the wildcards and restart VS Code to check if this is indeed the same issue?

@AndrewTriesToCode
Copy link

AndrewTriesToCode commented Apr 18, 2019 via email

@filipw
Copy link
Contributor

filipw commented Apr 20, 2019

This behavior was caused by wildcards in package/framework references that unfortunately caused OmniSharp to get stuck in an initialization infinite loop.

I will close this is a duplicate of #3009
If you have projects with wildcards, the recommended workaround (until the next official release) is mentioned here #3009 (comment)

Thanks everyone for helping on this.

@Venipa
Copy link

Venipa commented Jul 22, 2019

Im currently having the same problem tho i dont have any wildcard in my .csproj or packages.config.
It worked last week...

Update

I've tried to use the Beta version provided in #3009 which resulted in the same error

[exthost] [error] [ms-vscode.csharp] provider FAILED
[exthost] [error] Problem invoking 'GetCodeActions' on OmniSharp server: Error: Pending request cancelled: /v2/getcodeactions```

@caglardursun
Copy link

I can confirm this bug already exists.

[2020-03-17 21:13:15.646] [renderer1] [error] Problem invoking 'GetCodeActions' on OmniSharp server: Error: Pending request cancelled: /v2/getcodeactions [2020-03-17 21:13:23.499] [renderer1] [error] timeout after 500 ms: Error: timeout after 500 ms at t.RawDebugSession.handleErrorResponse (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2953:952) at file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2953:250 at async t.RawDebugSession.shutdown (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2951:336) [2020-03-17 21:16:20.153] [renderer1] [error] timeout after 500 ms: Error: timeout after 500 ms at t.RawDebugSession.handleErrorResponse (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2953:952) at file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2953:250 at async t.RawDebugSession.shutdown (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2951:336) [2020-03-17 21:17:30.286] [renderer1] [error] timeout after 500 ms: Error: timeout after 500 ms at t.RawDebugSession.handleErrorResponse (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2953:952) at file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2953:250 at async t.RawDebugSession.shutdown (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2951:336)

@rohanaceres
Copy link

This bug still exists. Is there any update fixing it coming?

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

Successfully merging a pull request may close this issue.

8 participants