Language server does not start on Mac OS due to permission error

Hi,

lately the language server is not starting at all for me. Julia itself works fine, and the error does not seem to depend on the environment. The output of the LS is as follows:

[ Info: Starting the Julia Language Server
[ Info: Symbol server store is at '/Users/danr6/Library/Application Support/Code/User/globalStorage/julialang.language-julia/symbolstorev5'.
[ Info: Starting LS at 1639139770
[ Info: Downloading caches...
β”Œ Info: Couldn't retrieve cache file for ImageCore.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches...
β”Œ Info: Couldn't retrieve cache file for FFMPEG.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches...
β”Œ Info: Couldn't retrieve cache file for ColorTypes.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches...
β”Œ Info: Couldn't retrieve cache file for IrrationalConstants.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches...
β”Œ Info: Couldn't retrieve cache file for Mmap.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches...
β”Œ Info: Couldn't retrieve cache file for Adapt.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches...
β”Œ Info: Couldn't retrieve cache file for OffsetArrays.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (10%)
β”Œ Info: Couldn't retrieve cache file for LibGit2.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (12%)
β”Œ Info: Couldn't retrieve cache file for Base64.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (13%)
β”Œ Info: Couldn't retrieve cache file for Artifacts.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (15%)
β”Œ Info: Couldn't retrieve cache file for Rsvg.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (16%)
β”Œ Info: Couldn't retrieve cache file for InteractiveUtils.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (18%)
β”Œ Info: Couldn't retrieve cache file for Preferences.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (19%)
β”Œ Info: Couldn't retrieve cache file for TensorCore.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (21%)
β”Œ Info: Couldn't retrieve cache file for Cairo.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (22%)
β”Œ Info: Couldn't retrieve cache file for ImageMagick.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (24%)
β”Œ Info: Couldn't retrieve cache file for QuartzImageIO.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (25%)
β”Œ Info: Couldn't retrieve cache file for LinearAlgebra.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (27%)
β”Œ Info: Couldn't retrieve cache file for Dates.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (28%)
β”Œ Info: Couldn't retrieve cache file for SpecialFunctions.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (30%)
β”Œ Info: Couldn't retrieve cache file for Profile.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (31%)
β”Œ Info: Couldn't retrieve cache file for REPL.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (33%)
β”Œ Info: Couldn't retrieve cache file for ArgTools.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (34%)
β”Œ Info: Couldn't retrieve cache file for FixedPointNumbers.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (36%)
β”Œ Info: Couldn't retrieve cache file for SparseArrays.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (37%)
β”Œ Info: Couldn't retrieve cache file for Sockets.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (39%)
β”Œ Info: Couldn't retrieve cache file for NetworkOptions.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (40%)
β”Œ Info: Couldn't retrieve cache file for AbstractFFTs.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (42%)
β”Œ Info: Couldn't retrieve cache file for JLLWrappers.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (43%)
β”Œ Info: Couldn't retrieve cache file for NaNMath.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (45%)
β”Œ Info: Couldn't retrieve cache file for ColorVectorSpace.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (46%)
β”Œ Info: Couldn't retrieve cache file for Luxor.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (48%)
β”Œ Info: Couldn't retrieve cache file for Markdown.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (49%)
β”Œ Info: Couldn't retrieve cache file for ChainRulesCore.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (51%)
β”Œ Info: Couldn't retrieve cache file for Downloads.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (52%)
β”Œ Info: Couldn't retrieve cache file for FileIO.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (54%)
β”Œ Info: Couldn't retrieve cache file for Random.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (55%)
β”Œ Info: Couldn't retrieve cache file for DelimitedFiles.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (57%)
β”Œ Info: Couldn't retrieve cache file for Serialization.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (58%)
β”Œ Info: Couldn't retrieve cache file for Test.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (60%)
β”Œ Info: Couldn't retrieve cache file for Reexport.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (61%)
β”Œ Info: Couldn't retrieve cache file for Graphics.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (63%)
β”Œ Info: Couldn't retrieve cache file for Media.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (64%)
β”Œ Info: Couldn't retrieve cache file for Statistics.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (66%)
β”Œ Info: Couldn't retrieve cache file for Colors.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (67%)
β”Œ Info: Couldn't retrieve cache file for LogExpFunctions.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (69%)
β”Œ Info: Couldn't retrieve cache file for Requires.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (70%)
β”Œ Info: Couldn't retrieve cache file for MappedArrays.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (72%)
β”Œ Info: Couldn't retrieve cache file for TOML.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (73%)
β”Œ Info: Couldn't retrieve cache file for StackViews.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (75%)
β”Œ Info: Couldn't retrieve cache file for PaddedViews.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (76%)
β”Œ Info: Couldn't retrieve cache file for Juno.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (78%)
β”Œ Info: Couldn't retrieve cache file for LibCURL.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (79%)
β”Œ Info: Couldn't retrieve cache file for MacroTools.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (81%)
β”Œ Info: Couldn't retrieve cache file for Distributed.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (82%)
β”Œ Info: Couldn't retrieve cache file for Compat.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (84%)
β”Œ Info: Couldn't retrieve cache file for Logging.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (85%)
β”Œ Info: Couldn't retrieve cache file for SharedArrays.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (87%)
β”Œ Info: Couldn't retrieve cache file for UUIDs.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (88%)
β”Œ Info: Couldn't retrieve cache file for Unicode.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (90%)
β”Œ Info: Couldn't retrieve cache file for Pkg.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (91%)
β”Œ Info: Couldn't retrieve cache file for Tar.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (93%)
β”Œ Info: Couldn't retrieve cache file for Printf.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (94%)
β”Œ Info: Couldn't retrieve cache file for SHA.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (96%)
β”Œ Info: Couldn't retrieve cache file for MosaicViews.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (97%)
β”Œ Info: Couldn't retrieve cache file for Libdl.
β””   exception = SystemError: mktemp: Permission denied
[ Info: Downloading caches... (99%)
β”Œ Info: Couldn't retrieve cache file for DocStringExtensions.
β””   exception = SystemError: mktemp: Permission denied
[ Info: All cache files downloaded. (100%)
β”Œ Error: Some Julia code in the VS Code extension crashed
β”” @ Main ~/.vscode/extensions/julialang.language-julia-1.5.5/scripts/error_handler.jl:15
ERROR: ArgumentError: could not listen on path /tmp/vscjlsymserv-cd19bb5c-933f-4c1f-a34f-4be915b947b4
Stacktrace:
 [1] listen(path::String)
   @ Sockets /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Sockets/src/PipeServer.jl:76
 [2] macro expansion
   @ ~/.vscode/extensions/julialang.language-julia-1.5.5/scripts/packages/SymbolServer/src/SymbolServer.jl:94 [inlined]
 [3] (::SymbolServer.var"#59#61"{LanguageServer.var"#94#96"{LanguageServerInstance}, var"#3#4", Channel{Any}, String})()
   @ SymbolServer ./task.jl:423
[Info  - 1:37:09 PM] Connection to server got closed. Server will restart.

I’m on Mac OS 11.6.1, Julia 1.7: the log says that it uses the language extension version 1.5.5 because I tried downgrading, but the same thing happens on 1.5.6. Uninstalling and reinstalling the language extension. Any tips on what I could try next? It used to work a few days ago, I don’t know what happened.

sounds like an issue with your system.

I agree, everything points to a problem in my system. Reinstalling Julia, VS Code and restarting didn’t fix the problem.

Check the permissions of the directories document at Filesystem Β· The Julia Language

1 Like

Thank you, I was able to fix it by correcting the permissions of this folder.

(In case someone else gets this problem, you may need to do something like this )