LanguageServer.jl icon indicating copy to clipboard operation
LanguageServer.jl copied to clipboard

MethodNotFound: Unhandled method workspace/configuration

Open davidanthoff opened this issue 5 years ago • 9 comments

From crash reporting.

Stack trace:

LanguageServer.JSONRPCEndpoints.JSONRPCError:
   at send_request(::LanguageServer.JSONRPCEndpoints.JSONRPCEndpoint, ::String, ::LanguageServer.ConfigurationParams) (.\scripts\languageserver\packages\LanguageServer\src\jsonrpcendpoint.jl161)
   at request_julia_config(::LanguageServerInstance) (.\scripts\languageserver\packages\LanguageServer\src\requests\workspace.jl77)
   at process(::LanguageServer.JSONRPC.Request{Val{:initialized},Dict{String,Any}}, ::LanguageServerInstance) (.\scripts\languageserver\packages\LanguageServer\src\requests\init.jl159)
   at run(::LanguageServerInstance) (.\scripts\languageserver\packages\LanguageServer\src\languageserverinstance.jl233)
   at top-level scope (.\scripts\languageserver\main.jl28)
   at include (boot.jl328)
   at include_relative(::Module, ::String) (loading.jl1105)
   at include(::Module, ::String) (Base.jl31)
   at exec_options(::Base.JLOptions) (client.jl287)
   at _start() (client.jl460)

I think we need to rework how we load configuration in general and follow the examples from the docs.

davidanthoff avatar Mar 19 '20 17:03 davidanthoff

Do you not get an event log in crash reports showing client and server requests leading up to the crash? Very difficult to debug otherwise. Looking at the code, this looks like a client-side problem rather than server-side since the response has an error key with empty code and message.

non-Jedi avatar Apr 27 '20 12:04 non-Jedi

Unfortunately we don't... I'll look into sending more log info in crash reports, but not sure we can easily do that...

davidanthoff avatar Apr 27 '20 12:04 davidanthoff

Is this likely to have been fixed by the change to how we handle configurations?

ZacLN avatar May 04 '20 12:05 ZacLN

I had hoped so, but we are still getting crash reports from this... So, no.

davidanthoff avatar May 04 '20 13:05 davidanthoff

Erg. I'm still feeling really lost on this. Do we need to check and store this before sending requests to the client?

ZacLN avatar May 04 '20 14:05 ZacLN

The only thing I see in the workspace/configuration request that's out of spec is that it sends "scopeUri": nil when scopeUri is required to be a DocumentUri which is an alias for string. Instead, scopeUri can simply be omitted.

Could be worth fixing that just in case its the problem?

non-Jedi avatar May 05 '20 16:05 non-Jedi

So maybe we wait and see whether #665 fixes this, and whether #662 gives us more info, right?

davidanthoff avatar May 06 '20 11:05 davidanthoff

We're STILL seeing this in the latest version of the extension that I published today :( This is honestly driving me nuts, I have no more ideas what might be going wrong here...

davidanthoff avatar May 11 '20 16:05 davidanthoff

As per my comment above: https://github.com/julia-vscode/LanguageServer.jl/pull/693 seems worth a try

ZacLN avatar May 11 '20 20:05 ZacLN