Error using TestItems in VSCode

I get this error when I try to run tests using the TestItems framework in VSCode:

An error occurred attempting to run tests: Error: Pending response rejected since connection got disposed

The test runs fine from the VSCode REPL in package mode.

Another person got the same error but the issue wasn’t resolved in that thread.

Does anybody know what causes this error and how to fix it?

1 Like

What version of the extension are you on? I think I fixed something related to that recently…

I’m using language extension v.1.124.2

I’m finding the same error now

vs-code system

Version: 1.94.2 (Universal)
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z
Electron: 30.5.1
ElectronBuildId: 10262041
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0

Julia ext: v1.124.2 as @brianguenter

Any progress on this? The test extension is so useful I’d hate to have to stop using it.

I’ve just pushed a new build out to the insider channel that has some more diagnostics to get to the bottom of this.

Could you switch over to the insider channel, and then just run the extension? I think in theory if it crashes it should then automatically send a crash report, or you could copy/paste the log here. Thanks!

Thank you for following up. Can you clarify what the insider channel is? Is it the pre-release option for the Julia extension?

I switched to the pre-release version, I assume that is what you mean by the insider channel, and ran the tests again. Got the same error message and the extension crashed and sent a log report.

If you don’t get the log I’ll be happy to cut and paste it but I don’t know where it is saved on my local machine.

After switching to the pre-release version, I also encountered the same error, but I am not sure whether an error log was sent. I included in below in case it was not sent.

Summary

┌ Error: Some Julia code in the VS Code extension crashed
└ @ Main ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/error_handler.jl:15
ERROR: SalsaWrappedException: Error encountered while executing Salsa derived function:
Invalid uri untitled:Untitled-2

------ Salsa Trace -----------------
[1] @derived derived_testenv(::Runtime, JuliaWorkspaces.URIs2.URI(“file”, “”, “/home/dfish/.julia/dev/TestItemPackage/test/test_file.jl”, nothing, nothing)::JuliaWorkspaces.URIs2.URI)
[2] @derived derived_project_folders(::Runtime)
[3] @derived derived_potential_project_folders(::Runtime)
[4] @derived derived_project_files(::Runtime)

Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] var"%%__user_derived_project_files"(rt::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage})
@ JuliaWorkspaces ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/JuliaWorkspaces/src/layer_projects.jl:7
[3] _memoized_lookup_internal(runtime::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, key::Salsa.DerivedKey{typeof(JuliaWorkspaces.derived_project_files), Tuple{}})
@ Salsa._DefaultSalsaStorage ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/default_storage.jl:257
[4] memoized_lookup(rt::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, dependency_key::Salsa.DerivedKey{typeof(JuliaWorkspaces.derived_project_files), Tuple{}})
@ Salsa ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:694
[5] memoized_lookup_unwrapped
@ ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:721 [inlined]
[6] derived_project_files
@ ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:641 [inlined]
[7] var"%%__user_derived_potential_project_folders"(rt::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage})
@ JuliaWorkspaces ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/JuliaWorkspaces/src/layer_projects.jl:15
[8] _memoized_lookup_internal(runtime::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, key::Salsa.DerivedKey{typeof(JuliaWorkspaces.derived_potential_project_folders), Tuple{}})
@ Salsa._DefaultSalsaStorage ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/default_storage.jl:257
[9] memoized_lookup(rt::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, dependency_key::Salsa.DerivedKey{typeof(JuliaWorkspaces.derived_potential_project_folders), Tuple{}})
@ Salsa ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:694
[10] memoized_lookup_unwrapped
@ ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:721 [inlined]
[11] derived_potential_project_folders
@ ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:641 [inlined]
[12] var"%%__user_derived_project_folders"(rt::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage})
@ JuliaWorkspaces ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/JuliaWorkspaces/src/layer_projects.jl:120
[13] _memoized_lookup_internal(runtime::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, key::Salsa.DerivedKey{typeof(JuliaWorkspaces.derived_project_folders), Tuple{}})
@ Salsa._DefaultSalsaStorage ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/default_storage.jl:257
[14] memoized_lookup(rt::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, dependency_key::Salsa.DerivedKey{typeof(JuliaWorkspaces.derived_project_folders), Tuple{}})
@ Salsa ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:694
[15] memoized_lookup_unwrapped
@ ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:721 [inlined]
[16] derived_project_folders
@ ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:641 [inlined]
[17] var"%%__user_derived_testenv"(rt::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, uri::JuliaWorkspaces.URIs2.URI)
@ JuliaWorkspaces ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/JuliaWorkspaces/src/layer_testitems.jl:106
[18] _memoized_lookup_internal(runtime::Salsa._TracingRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, key::Salsa.DerivedKey{typeof(JuliaWorkspaces.derived_testenv), Tuple{JuliaWorkspaces.URIs2.URI}})
@ Salsa._DefaultSalsaStorage ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/default_storage.jl:257
[19] memoized_lookup(rt::Salsa._TopLevelRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, dependency_key::Salsa.DerivedKey{typeof(JuliaWorkspaces.derived_testenv), Tuple{JuliaWorkspaces.URIs2.URI}})
@ Salsa ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:694
[20] memoized_lookup_unwrapped
@ ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:721 [inlined]
[21] derived_testenv(rt::Salsa._TopLevelRuntime{Salsa.EmptyContext, Salsa._DefaultSalsaStorage.DefaultStorage}, uri::JuliaWorkspaces.URIs2.URI)
@ JuliaWorkspaces ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/Salsa/src/Salsa.jl:641
[22] get_test_env(jw::JuliaWorkspaces.JuliaWorkspace, uri::JuliaWorkspaces.URIs2.URI)
@ JuliaWorkspaces ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/JuliaWorkspaces/src/public.jl:153
[23] julia_get_test_env_request(params::LanguageServer.GetTestEnvRequestParams, server::LanguageServerInstance, conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint})
@ LanguageServer ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/LanguageServer/src/requests/testing.jl:2
[24] (::LanguageServer.var"#108#109"{typeof(LanguageServer.julia_get_test_env_request), LanguageServerInstance})(conn::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, params::LanguageServer.GetTestEnvRequestParams)
@ LanguageServer ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/LanguageServer/src/languageserverinstance.jl:307
[25] dispatch_msg(x::JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint, Base.PipeEndpoint}, dispatcher::JSONRPC.MsgDispatcher, msg::Dict{String, Any})
@ JSONRPC ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/JSONRPC/src/typed.jl:67
[26] run(server::LanguageServerInstance; timings::Vector{Any})
@ LanguageServer ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/LanguageServer/src/languageserverinstance.jl:444
[27] run(server::LanguageServerInstance)
@ LanguageServer ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/packages/LanguageServer/src/languageserverinstance.jl:317
[28] top-level scope
@ ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/languageserver/main.jl:189
[29] include(mod::Module, _path::String)
@ Base ./Base.jl:557
[30] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:323
[31] _start()
@ Base ./client.jl:531
[Info - 2:29:18 PM] Connection to server got closed. Server will restart.
true
[Error - 2:29:18 PM] Server process exited with code 1.
[ Info: Starting LS with Julia 1.11.1
Activating project at ~/.vscode/extensions/julialang.language-julia-1.125.1/scripts/environments/languageserver/v1.11
[ Info: Starting the Julia Language Server
[ Info: Symbol server store is at ‘/home/dfish/.config/Code/User/globalStorage/julialang.language-julia/symbolstorev5’.
[ Info: Starting LS at 1729708162
[ Info: Downloading cache files…