-
Notifications
You must be signed in to change notification settings - Fork 418
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
Neovim LSP Error - Attempt to Index Local 'decoded' (a nil value) #2574
Comments
Edit: Using an older version like 1.39.8 Does not give such an error. Seems like this error started appearing from 1.39.9 onward. In v1.39.9, this error keeps being spammed. unlike v1.39.10 that goes away if ignored |
Also having the exact same issue. Any updates? I am on v1.39.10 as well |
In 1.39.9 we took an updated build of the csharp-language-server-protocol libraries. It is likely a regression there. Has anyone been able to determine which request is causing the error? If so, we could open an issue at https://github.com/OmniSharp/csharp-language-server-protocol/issues |
Still has the same issue in 1.39.10 |
Exact problem here. Except I only get it on a huge and old net3.1 project and, well, could be unrelated but the LSP spams errors, starting with the using statements:
|
Same issue in omnisharp 1.39.10 and neovim 0.9.4 on windows |
I too am having this problems from time to time. I tried to do some debug printout in neovim and this is my finding (maybe someone here can make sense of them?) in rpc.lua there is an method "create_read_loop" that has following while loop: while true do
local headers, body = parse_chunk(chunk)
if headers then
if body == nil then
print("BODY IS NIL IN create_read_loop");
end
if body == "null" then
print("BODY is: \"null\", chunk: " .. dump(chunk));
end
handle_body(body)
chunk = ''
else
break
end
end As you can see I have added two if-cases for my debug print. The second one is hit when this error is generated. I think the error could be cause by parse_chunk(chunk) returning the string "null" to body. The chunk that caused "null" to be returned looked like this (note, I have redacted some part): {
"jsonrpc": "2.0",
"method": "o#/projectchanged",
"params": {
"MsBuildProject": {
"AssemblyName": "REDACTED",
"Configuration": "Debug",
"IntermediateOutputPath": "obj\\Debug\\net6.0\\",
"IsExe": true,
"IsUnityProject": false,
"OutputPath": "bin\\Debug\\net6.0\\",
"Path": "C:\\projects\\REDACTED\\tests\\REDACTED.csproj",
"Platform": "AnyCPU",
"ProjectGuid": "00000000-0000-0000-0000-000000000000",
"SourceFiles": [
" *** REDACTED *** "
],
"TargetFramework": ".NETCoreApp,Version=v6.0",
"TargetFrameworks": [
{
"FriendlyName": ".NETCoreApp",
"Name": ".NETCoreApp",
"ShortName": "net6.0"
}
],
"TargetPath": "C:\\projects\\REDACTED\\tests\\REDACTED\\bin\\Debug\\net6.0\\REDACTED.dll"
}
}
} |
Same issue in omnisharp |
Same here. |
Having the same issue. |
Error executing vim.schedule lua callback: /opt/neovim/share/nvim/runtime/lua/vim/lsp/util.lua:1157: Cursor position outside buffer
Same Problem, but i am fresh in omnisharp, perhaps bad config |
Same issue. OmniSharp: 1.39.11 |
Can confirm still happening on |
same issue occurs on |
Same issue occurs on v1.39.11 using MacOS, NeoVim 0.9.5. |
This issue seems related: #2594 |
can confirm still an issue |
Still an issue on omnisharp 1.39.10, neovim 0.9.5 on Windows 11. Rolling back to omnisharp 1.39.8 fixes the issue (if using Mason run :MasonInstall [email protected]). |
You need an extra
|
same issue. |
The simplest workaround is to edit |
Still an issue |
Rolling back becuase of this: OmniSharp/omnisharp-roslyn#2574
I have the same issue. I am also using |
Does anyone want to solve this problem? It seems that everyone has this problem. |
Yes of course I want, but for me, I don't really know neovim apis, I don't know lua, and I don't have much time to dig into it for now, so what I can do is to wait for a hero to save us hahahaha |
In my case going back to 1.39.8 didn't help, but going back to 1.38.2 did. This also fixed another issue I was having where code actions stopped working. |
Information about the bug can be found here: OmniSharp/omnisharp-roslyn#2574
I am having this issue in 1.39.9, 1.39.8, 1.38.2 only in large codebases. The error says "No code actions". I have temporarily switched to csharp-ls. |
I'm not able to reproduce this on the current nightly build of neovim. Here's the script I used
and that parses fine 🤔 but I still get this error when I open a project. I'll try to add some debugging code into my local neovim runtime and see what line is causing |
This issue seems to have occurred after this commit. |
If I change 51c5e00 back to b2e64c6 in CSharpDiagnosticWorkerWithAnalyzers.cs, nvim runs smoothly and the error goes away. Changing from AnalyzerWorkQueue to AsyncAnalyzerWorkQueue seems to cause an error in nvim. But even after changing ac7b9b8(latest) CSharpDiagnosticWorkerWithAnalyzers.cs to b2e64c6 omnisharp-roslyn still doesn't work. |
This was my build issue. Reverting to the latest CSharpDiagnosticWorkerWithAnalyzers.cs to b2e64c6 solved issue. |
I also have this issue in a new console project |
Same here, on neovim |
Having same issue when I install omnisharp |
@nagaohiroki man you are an absolute legend, this fixes it, thank you very much. If anybody needs a quick script to build OmniSharp with the fix here it is: git clone https://github.com/OmniSharp/omnisharp-roslyn
cd omnisharp-roslyn
git checkout b2e64c6 -- $(find . -name CSharpDiagnosticWorkerWithAnalyzers.cs)
dotnet build --configuration Release The built OmniSharp binary will be in |
Neovim Pull Request 29196 implements a nil-check for the LSP server response. Still does not fix the underlying problem (LSP returing nil), but at least |
It works |
neovim/neovim#29196 fixed the crash for me 🎉 thank you all for your persistence and help! |
I don't think an nvim version was released with this fix yet. We can find it in |
Issue Description
I am encountering an error when using the OmniSharp Language Server Protocol (LSP) integration in Neovim. The error message I receive is as follows:
Steps to Reproduce
Expected Behavior
I expect the OmniSharp LSP integration to work without errors and to correctly handle symbol detection and LSP-related requests.
Actual Behavior
The error mentioned above is encountered but normal usage of language server is achievable if the error is ignored. it appears to be related to the decoding of JSON data within the LSP integration.
System Information
NVIM v0.10.0-dev-1325+gc4f8be464
Build type: RelWithDebInfo
LuaJIT 2.1.1696795921
Log Files
LspLog:
[WARN][2023-10-11 02:21:40] ...lsp/handlers.lua:557 "OmniSharp.Extensions.LanguageServer.Server.LspServerOutputFilter: Tried to send request or notification before initialization was completed and will be sent later OutgoingNotification { Method = o#/projectdiagnosticstatus, Params = {\n \"Type\": \"background\",\n \"Status\": 0,\n \"ProjectFilePath\": \"(100%)\"\n}, TraceParent = , TraceState = } | @request='OutgoingNotification { Method = o#/projectdiagnosticstatus, Params = {\n \"Type\": \"background\",\n \"Status\": 0,\n \"ProjectFilePath\": \"(100%)\"\n}, TraceParent = , TraceState = }'" [WARN][2023-10-11 02:21:40] ...lsp/handlers.lua:557 "OmniSharp.Extensions.LanguageServer.Server.LspServerOutputFilter: Tried to send request or notification before initialization was completed and will be sent later OutgoingNotification { Method = o#/projectconfiguration, Params = {\n \"ProjectId\": \"f86d6df5-e245-49aa-9e6a-140d54063466\",\n \"SessionId\": \"1909222218\",\n \"OutputKind\": 0,\n \"ProjectCapabilities\": [\n \"GenerateDocumentationFile\",\n \"CSharp\",\n \"Managed\",\n \"ReferencesFolder\",\n \"LanguageService\",\n \"RelativePathDerivedDefaultNamespace\",\n \"AssemblyReferences\",\n \"COMReferences\",\n \"ProjectReferences\",\n \"SharedProjectReferences\",\n \"OutputGroups\",\n \"AllTargetOutputGroups\",\n \"VisualStudioWellKnownOutputGroups\",\n \"SingleFileGenerators\",\n \"DeclaredSourceItems\",\n \"UserSourceItems\",\n \"CrossPlatformExecutable\",\n \"SupportsHotReload\",\n \"Pack\"\n ],\n \"TargetFrameworks\": [\n \"net7.0\"\n ],\n \"SdkVersion\": \"58988350\",\n \"References\": [\n \"f9b57385e04dcef1\",\n \"b04d1a92c03aa393\",\n \"740a41f35e38e687\",\n \"a650b002a55ee732\",\n \"8bb25cdfa9f58d95\",\n \"ca01f9c6c9519128\",\n \"a7db6d4c13eb109a\",\n \"4787ec450370cdc\",\n \"faae3cd2329a5f23\",\n \"b136c9057d0eac41\",\n \"a4be57a67913d9f2\",\n \"c2f7e51423366080\",\n \"9221249557edf7da\",\n \"ac08b9147e6c6cc1\",\n \"fc8f31a851b2f1e\",\n \"3d1fab7a1546aa70\",\n \"75c42701c310d265\",\n \"6eac5906d797823f\",\n \"51b6b65db45d8317\",\n \"977562ede61122d1\",\n \"6f06be6c7dad3d57\",\n \"782a823a2d8cd40\",\n \"13bbf2cbcdb96469\",\n \"a8b1d9f359d7b4f\",\n \"8db448e27f0bad1b\",\n \"5faa84ffcc646d16\",\n \"3dd9e1e713ce28c1\",\n \"bc70a3688f03b546\",\n \"3e025539204a5d59\",\n \"12bec27505c61c10\",\n \"65e9cc7358ddee2e\",\n \"7df5bfe00323a6a8\",\n \"ce3f444652eead51\",\n \"feebdde9a00fe94b\",\n \"22d24df113118e04\",\n \"6a8ada60e30e6abf\",\n \"6001a9b860f7e43\",\n \"e94e5ff7b2eb39a9\",\n \"46b5412910b12f1a\",\n \"eac4975c939bd705\",\n \"a777367473e5f95c\",\n \"f67433e0978efe89\",\n \"d574426ce261f3cd\",\n \"2620772be337bacb\",\n \"ce4b86769789bfd2\",\n \"afe098e2b8eb2364\",\n \"4bca77302b767821\",\n \"b42e3bf9c2caf9d\",\n \"11d6a5981dd09f1d\",\n \"2528657f041a0f71\",\n \"1a4910e7928d2be4\",\n \"385f6cb9a1a92341\",\n \"8a6a053fd546c4b9\",\n \"4bd5d70d9487a7\",\n \"546da94a433dd46b\",\n \"c8cd67501180cdb3\",\n \"99380cc3f9cb0f62\",\n \"2b71ac54faa4d900\",\n \"6d26f5b6d581bb7a\",\n \"e99748daf45287f7\",\n \"88a79e3fbc9be5a5\",\n \"baed534980001b3e\",\n \"a094f278ebd28638\",\n \"f02b6f1120327ed5\",\n \"1fdb3be137e7c8ab\",\n \"d8d06e6254ff9a8\",\n \"7a37191fa2429c0\",\n \"db2085d40be0c6b\",\n \"732e2f41e1ec328f\",\n \"cc0b8a0dc4b5cc17\",\n \"b3ec78066692ce40\",\n \"b633596fb5206911\",\n \"b1c086ddba588d7f\",\n \"3935c25fc587591d\",\n \"5db9cd2d6d302594\",\n \"1fe2caf02ff5116\",\n \"d1e401c8e175f133\",\n \"d795c4b069f42de2\",\n \"28889d355be716fb\",\n \"987004758afb653e\",\n \"a93a13f245d3dbf5\",\n \"c2c7e5dd6bcf2f46\",\n \"f40e391e11837c28\",\n \"1f1effdb4f95fef\",\n \"4b3556ed143bb1a1\",\n \"990c07b3a694f061\",\n \"16f3b3c6aa66dbea\",\n \"bbc2c7fb9307d0f8\",\n \"cae96c695fa0a849\",\n \"23af2e185bf7f884\",\n \"10682f5180926917\",\n \"531413e8ae8921e9\",\n \"cbb2e2956b8bc5a1\",\n \"693159958e045249\",\n \"abb76040f918f212\",\n \"2978ebe3fa017619\",\n \"d753dc831058d377\",\n \"5d5ab2fae13c7cd7\",\n \"6f36e9e201c8abbc\",\n \"2c2215284100c1bc\",\n \"abef39459b5f8089\",\n \"58b2ccb5d5268768\",\n \"f4c238ed95a4c9e0\",\n \"463559064b820a89\",\n \"f46a5248555641f3\",\n \"31a917d25f0111b0\",\n \"d9a0d90fcf36b125\",\n \"f707ec8ff0716b6a\",\n \"d31ae060adc0cf68\",\n \"b740561cbe999190\",\n \"6f6cd086b29443f\",\n \"3e2b84419c2678fe\",\n \"16aa5cd16608904e\",\n \"88efed4970ce8fb\",\n \"525af1cb4f8c1ef\",\n \"82365a1d92723ea2\",\n \"f9081118726c671d\",\n \"1dc6ba4b51a92fe2\",\n \"480fcc9a46d59829\",\n \"96ae799a9cd65a64\",\n \"1f0a5acc2009b69e\",\n \"53da3fcaf9d4a664\",\n \"762862983c40286f\",\n \"7143cd55e6267a10\",\n \"9c4f1e8060c475b4\",\n \"5641b1bfbef8f076\",\n \"c074fd9cba688aec\",\n \"6b8a7cd56172fed1\",\n \"5d25704a6a0be6ed\",\n \"7de0d61ed8a595ec\",\n \"85c2a8db5105888\",\n \"ec2dac2bf194d54a\",\n \"baae63d2bc6dd501\",\n \"6e18d5f5513ced07\",\n \"ecc917c3c9b5c475\",\n \"3e60a289d38463fa\",\n \"3297b865f846bd0a\",\n \"34cfcce7d574a410\",\n \"762c57508db7a1c2\",\n \"81016cf6be9235ed\",\n \"96f5a81e8df6f19c\",\n \"bc2ea691e56496f8\",\n \"5d957776a3bc8463\",\n \"4fcdd50549f35f69\",\n \"1613d6b76156e26a\",\n \"609f5396c0534146\",\n \"31be6951d8a1de6e\",\n \"d373f3c4566c70c6\",\n \"b42e1bda5a17dc0e\",\n \"3017ef0c38e2d837\",\n \"92e480fdaacc79e0\",\n \"ffb314483a45fa40\",\n \"3159cfd5553fa1b8\",\n \"6a5eaa177b0b8d54\",\n \"add48a46678bd09d\",\n \"c70f2a1b237f229d\",\n \"3beb376886d63c97\",\n \"363b07840a344182\",\n \"f638dfb632c7bb3e\",\n \"4fc1e02f10ba6dcc\",\n \"7f7e058ceeba44c4\",\n \"76fdeb10eb04a251\",\n \"c229c6a3986d545b\"\n ],\n \"FileExtensions\": [\n \"-1257278712\"\n ],\n \"FileCounts\": [\n 4\n ],\n \"SdkStyleProject\": true\n}, TraceParent = , TraceState = } | @request='OutgoingNotification { Method = o#/projectconfiguration, Params = {\n \"ProjectId\": \"f86d6df5-e245-49aa-9e6a-140d54063466\",\n \"SessionId\": \"1909222218\",\n \"OutputKind\": 0,\n \"ProjectCapabilities\": [\n \"GenerateDocumentationFile\",\n \"CSharp\",\n \"Managed\",\n \"ReferencesFolder\",\n \"LanguageService\",\n \"RelativePathDerivedDefaultNamespace\",\n \"AssemblyReferences\",\n \"COMReferences\",\n \"ProjectReferences\",\n \"SharedProjectReferences\",\n \"OutputGroups\",\n \"AllTargetOutputGroups\",\n \"VisualStudioWellKnownOutputGroups\",\n \"SingleFileGenerators\",\n \"DeclaredSourceItems\",\n \"UserSourceItems\",\n \"CrossPlatformExecutable\",\n \"SupportsHotReload\",\n \"Pack\"\n ],\n \"TargetFrameworks\": [\n \"net7.0\"\n ],\n \"SdkVersion\": \"58988350\",\n \"References\": [\n \"f9b57385e04dcef1\",\n \"b04d1a92c03aa393\",\n \"740a41f35e38e687\",\n \"a650b002a55ee732\",\n \"8bb25cdfa9f58d95\",\n \"ca01f9c6c9519128\",\n \"a7db6d4c13eb109a\",\n \"4787ec450370cdc\",\n \"faae3cd2329a5f23\",\n \"b136c9057d0eac41\",\n \"a4be57a67913d9f2\",\n \"c2f7e51423366080\",\n \"9221249557edf7da\",\n \"ac08b9147e6c6cc1\",\n \"fc8f31a851b2f1e\",\n \"3d1fab7a1546aa70\",\n \"75c42701c310d265\",\n \"6eac5906d797823f\",\n \"51b6b65db45d8317\",\n \"977562ede61122d1\",\n \"6f06be6c7dad3d57\",\n \"782a823a2d8cd40\",\n \"13bbf2cbcdb96469\",\n \"a8b1d9f359d7b4f\",\n \"8db448e27f0bad1b\",\n \"5faa84ffcc646d16\",\n \"3dd9e1e713ce28c1\",\n \"bc70a3688f03b546\",\n \"3e025539204a5d59\",\n \"12bec27505c61c10\",\n \"65e9cc7358ddee2e\",\n \"7df5bfe00323a6a8\",\n \"ce3f444652eead51\",\n \"feebdde9a00fe94b\",\n \"22d24df113118e04\",\n \"6a8ada60e30e6abf\",\n \"6001a9b860f7e43\",\n \"e94e5ff7b2eb39a9\",\n \"46b5412910b12f1a\",\n \"eac4975c939bd705\",\n \"a777367473e5f95c\",\n \"f67433e0978efe89\",\n \"d574426ce261f3cd\",\n \"2620772be337bacb\",\n \"ce4b86769789bfd2\",\n \"afe098e2b8eb2364\",\n \"4bca77302b767821\",\n \"b42e3bf9c2caf9d\",\n \"11d6a5981dd09f1d\",\n \"2528657f041a0f71\",\n \"1a4910e7928d2be4\",\n \"385f6cb9a1a92341\",\n \"8a6a053fd546c4b9\",\n \"4bd5d70d9487a7\",\n \"546da94a433dd46b\",\n \"c8cd67501180cdb3\",\n \"99380cc3f9cb0f62\",\n \"2b71ac54faa4d900\",\n \"6d26f5b6d581bb7a\",\n \"e99748daf45287f7\",\n \"88a79e3fbc9be5a5\",\n \"baed534980001b3e\",\n \"a094f278ebd28638\",\n \"f02b6f1120327ed5\",\n \"1fdb3be137e7c8ab\",\n \"d8d06e6254ff9a8\",\n \"7a37191fa2429c0\",\n \"db2085d40be0c6b\",\n \"732e2f41e1ec328f\",\n \"cc0b8a0dc4b5cc17\",\n \"b3ec78066692ce40\",\n \"b633596fb5206911\",\n \"b1c086ddba588d7f\",\n \"3935c25fc587591d\",\n \"5db9cd2d6d302594\",\n \"1fe2caf02ff5116\",\n \"d1e401c8e175f133\",\n \"d795c4b069f42de2\",\n \"28889d355be716fb\",\n \"987004758afb653e\",\n \"a93a13f245d3dbf5\",\n \"c2c7e5dd6bcf2f46\",\n \"f40e391e11837c28\",\n \"1f1effdb4f95fef\",\n \"4b3556ed143bb1a1\",\n \"990c07b3a694f061\",\n \"16f3b3c6aa66dbea\",\n \"bbc2c7fb9307d0f8\",\n \"cae96c695fa0a849\",\n \"23af2e185bf7f884\",\n \"10682f5180926917\",\n \"531413e8ae8921e9\",\n \"cbb2e2956b8bc5a1\",\n \"693159958e045249\",\n \"abb76040f918f212\",\n \"2978ebe3fa017619\",\n \"d753dc831058d377\",\n \"5d5ab2fae13c7cd7\",\n \"6f36e9e201c8abbc\",\n \"2c2215284100c1bc\",\n \"abef39459b5f8089\",\n \"58b2ccb5d5268768\",\n \"f4c238ed95a4c9e0\",\n \"463559064b820a89\",\n \"f46a5248555641f3\",\n \"31a917d25f0111b0\",\n \"d9a0d90fcf36b125\",\n \"f707ec8ff0716b6a\",\n \"d31ae060adc0cf68\",\n \"b740561cbe999190\",\n \"6f6cd086b29443f\",\n \"3e2b84419c2678fe\",\n \"16aa5cd16608904e\",\n \"88efed4970ce8fb\",\n \"525af1cb4f8c1ef\",\n \"82365a1d92723ea2\",\n \"f9081118726c671d\",\n \"1dc6ba4b51a92fe2\",\n \"480fcc9a46d59829\",\n \"96ae799a9cd65a64\",\n \"1f0a5acc2009b69e\",\n \"53da3fcaf9d4a664\",\n \"762862983c40286f\",\n \"7143cd55e6267a10\",\n \"9c4f1e8060c475b4\",\n \"5641b1bfbef8f076\",\n \"c074fd9cba688aec\",\n \"6b8a7cd56172fed1\",\n \"5d25704a6a0be6ed\",\n \"7de0d61ed8a595ec\",\n \"85c2a8db5105888\",\n \"ec2dac2bf194d54a\",\n \"baae63d2bc6dd501\",\n \"6e18d5f5513ced07\",\n \"ecc917c3c9b5c475\",\n \"3e60a289d38463fa\",\n \"3297b865f846bd0a\",\n \"34cfcce7d574a410\",\n \"762c57508db7a1c2\",\n \"81016cf6be9235ed\",\n \"96f5a81e8df6f19c\",\n \"bc2ea691e56496f8\",\n \"5d957776a3bc8463\",\n \"4fcdd50549f35f69\",\n \"1613d6b76156e26a\",\n \"609f5396c0534146\",\n \"31be6951d8a1de6e\",\n \"d373f3c4566c70c6\",\n \"b42e1bda5a17dc0e\",\n \"3017ef0c38e2d837\",\n \"92e480fdaacc79e0\",\n \"ffb314483a45fa40\",\n \"3159cfd5553fa1b8\",\n \"6a5eaa177b0b8d54\",\n \"add48a46678bd09d\",\n \"c70f2a1b237f229d\",\n \"3beb376886d63c97\",\n \"363b07840a344182\",\n \"f638dfb632c7bb3e\",\n \"4fc1e02f10ba6dcc\",\n \"7f7e058ceeba44c4\",\n \"76fdeb10eb04a251\",\n \"c229c6a3986d545b\"\n ],\n \"FileExtensions\": [\n \"-1257278712\"\n ],\n \"FileCounts\": [\n 4\n ],\n \"SdkStyleProject\": true\n}, TraceParent = , TraceState = }'"Thank you for your help in addressing this problem.
The text was updated successfully, but these errors were encountered: