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

LSP initialization problem -- Unable to resolve service for type 'OmniSharp.Extensions.LanguageServer.Protocol.Server.ILanguageServerFacade' while attempting to activate 'OmniSharp.Extensions.LanguageServer.Server.LanguageServerLoggerProvider' #2024

Closed
yatli opened this issue Nov 23, 2020 · 3 comments
Labels

Comments

@yatli
Copy link

yatli commented Nov 23, 2020

It blows up right in the initializer...

Stacktrace:

[Error  - 6:16:43 PM] OmniSharp.Extensions.JsonRpc.InputHandler: Failed to handle request initialize 0 - System.InvalidOperationException: Unable to resolve service for type 'OmniSharp.Extensions.LanguageServer.Protocol.Server.ILanguageServerFacade' while attempting to activate 'OmniSharp.Extensions.LanguageServer.Server.LanguageServerLoggerProvider'.
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites (System.Type serviceType, System.Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain, System.Reflection.ParameterInfo[] parameters, System.Boolean throwIfCallSiteNotFound) [0x0004d] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite (System.Type serviceType, System.Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain) [0x00070] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact (Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor, System.Type serviceType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain) [0x00061] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateEnumerable (System.Type serviceType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain) [0x00065] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite (System.Type serviceType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain) [0x00046] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites (System.Type serviceType, System.Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain, System.Reflection.ParameterInfo[] parameters, System.Boolean throwIfCallSiteNotFound) [0x00018] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite (System.Type serviceType, System.Type implementationType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain) [0x000c3] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact (Microsoft.Extensions.DependencyInjection.ServiceDescriptor descriptor, System.Type serviceType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain) [0x00061] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact (System.Type serviceType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain) [0x00018] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite (System.Type serviceType, Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteChain callSiteChain) [0x0002e] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor (System.Type serviceType) [0x0000c] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at System.Collections.Concurrent.ConcurrentDictionary`2[TKey,TValue].GetOrAdd (TKey key, System.Func`2[T,TResult] valueFactory) [0x00034] in <9f0df102fe6e4cfea29d2e46f585d8a5>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService (System.Type serviceType, Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope serviceProviderEngineScope) [0x00013] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService (System.Type serviceType) [0x00008] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService (System.Type serviceType) [0x00000] in <824e19d8b53a48d8867d85feb58265d3>:0 
  at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T] (System.IServiceProvider provider) [0x0000e] in <4b47b422bc4c4615bbdebe1df9b21b0d>:0 
  at OmniSharp.LanguageServerProtocol.LanguageServerHost.CreateCompositionHost (OmniSharp.Extensions.LanguageServer.Protocol.Server.ILanguageServer server, OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeParams initializeParams, OmniSharp.CommandLineApplication application, Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Action`1[T] configureLogging) [0x000e0] in <4f2e7febc8d645b5a23b81ccb12b2731>:0 
  at OmniSharp.LanguageServerProtocol.LanguageServerHost.Initialize (OmniSharp.Extensions.LanguageServer.Protocol.Server.ILanguageServer server, OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeParams initializeParams, System.Threading.CancellationToken cancellationToken) [0x00000] in <4f2e7febc8d645b5a23b81ccb12b2731>:0 
  at OmniSharp.Extensions.LanguageServer.Server.LanguageServer+<>c__DisplayClass76_0.<MediatR.IRequestHandler<OmniSharp.Extensions.LanguageServer.Protocol.Models.InternalInitializeParams,OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeResult>.Handle>b__1 (OmniSharp.Extensions.LanguageServer.Protocol.Server.OnLanguageServerInitializeDelegate handler, System.Threading.CancellationToken ct) [0x00012] in <47fc753aa472461eb41f153454b0157f>:0 
  at OmniSharp.Extensions.LanguageServer.Protocol.LanguageProtocolEventingHelper+<>c__DisplayClass0_1`2[TDelegate,THandler].<Run>b__2 (System.Threading.CancellationToken ct) [0x00000] in <37a5ed3503964dbaa1e68c549a99798c>:0 
  at System.Reactive.Linq.QueryLanguage.StartAsyncImpl (System.Func`2[T,TResult] actionAsync, System.Reactive.Concurrency.IScheduler scheduler) [0x0000d] in <3a11ea46836344a282870ba916885e3d>:0 
--- End of stack trace from previous location where exception was thrown ---

  at OmniSharp.Extensions.LanguageServer.Server.LanguageServer.MediatR.IRequestHandler<OmniSharp.Extensions.LanguageServer.Protocol.Models.InternalInitializeParams,OmniSharp.Extensions.LanguageServer.Protocol.Models.InitializeResult>.Handle (OmniSharp.Extensions.LanguageServer.Protocol.Models.InternalInitializeParams request, System.Threading.CancellationToken token) [0x003c7] in <47fc753aa472461eb41f153454b0157f>:0 
  at OmniSharp.Extensions.LanguageServer.Server.Pipelines.SemanticTokensDeltaPipeline`2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate`1[TResponse] next) [0x002a6] in <47fc753aa472461eb41f153454b0157f>:0 
  at OmniSharp.Extensions.LanguageServer.Server.Pipelines.ResolveCommandPipeline`2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate`1[TResponse] next) [0x00077] in <47fc753aa472461eb41f153454b0157f>:0 
  at MediatR.Pipeline.RequestPreProcessorBehavior`2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate`1[TResponse] next) [0x0013e] in <856ae299ee314304bc3affd17d8d5868>:0 
  at MediatR.Pipeline.RequestPostProcessorBehavior`2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate`1[TResponse] next) [0x0007e] in <856ae299ee314304bc3affd17d8d5868>:0 
  at MediatR.Pipeline.RequestExceptionProcessorBehavior`2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate`1[TResponse] next) [0x00084] in <856ae299ee314304bc3affd17d8d5868>:0 
  at MediatR.Pipeline.RequestExceptionProcessorBehavior`2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate`1[TResponse] next) [0x00276] in <856ae299ee314304bc3affd17d8d5868>:0 
  at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate`1[TResponse] next) [0x00084] in <856ae299ee314304bc3affd17d8d5868>:0 
  at MediatR.Pipeline.RequestExceptionActionProcessorBehavior`2[TRequest,TResponse].Handle (TRequest request, System.Threading.CancellationToken cancellationToken, MediatR.RequestHandlerDelegate`1[TResponse] next) [0x001e7] in <856ae299ee314304bc3affd17d8d5868>:0 
  at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1[TDescriptor].<RouteRequest>g__InnerRoute|5_0 (Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory, OmniSharp.Extensions.JsonRpc.Server.Request request, TDescriptor descriptor, System.Object params, System.Threading.CancellationToken token, Microsoft.Extensions.Logging.ILogger logger) [0x000fc] in <a9a75ca012fb423492558dedf501f3a2>:0 
  at OmniSharp.Extensions.JsonRpc.RequestRouterBase`1[TDescriptor].RouteRequest (OmniSharp.Extensions.JsonRpc.IRequestDescriptor`1[TDescriptor] descriptors, OmniSharp.Extensions.JsonRpc.Server.Request request, System.Threading.CancellationToken token) [0x00622] in <a9a75ca012fb423492558dedf501f3a2>:0 
  at OmniSharp.Extensions.JsonRpc.InputHandler+<>c__DisplayClass38_0.<RouteRequest>b__5 (System.Threading.CancellationToken ct) [0x000f2] in <a9a75ca012fb423492558dedf501f3a2>:0  | Method='initialize' RequestId='0'
OmniSharp.Extensions.LanguageServer.Shared.LspRequestRouter: Finding descriptors for initialize | Method='initialize'
OmniSharp.Extensions.JsonRpc.ProcessScheduler: Queueing Serial:initialize:0 request for processing | Type='Serial' Name='initialize:0'
OmniSharp.Extensions.JsonRpc.InputHandler: Starting: Processing request initialize 0 | Method='initialize' ResponseId='0'
OmniSharp.Extensions.LanguageServer.Shared.LspRequestRouter: Starting: Routing Request (0) initialize | Id='0' Method='initialize'
OmniSharp.Extensions.LanguageServer.Shared.LspRequestRouter: Finished: Routing Request (0) initialize in 160ms | Id='0' Method='initialize' ElapsedMilliseconds='160'
@filipw filipw added the lsp label Nov 23, 2020
@filipw
Copy link
Member

filipw commented Nov 23, 2020

cc @david-driscoll

@dmbfm
Copy link

dmbfm commented Nov 23, 2020

Getting the exact same error here.

@filipw
Copy link
Member

filipw commented Nov 24, 2020

fixed by #2025

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

No branches or pull requests

3 participants