# Repl immediately crashes in VSCode

**URL:** <https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078>\
**Category:** VS Code\
**Created:** [June 9, 2023, 12:57am UTC](https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078 "2023-06-09T00:57:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![slwu89](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/slwu89/32/217323_2.png) [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Post date:** [June 9, 2023, 12:57am UTC](https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078/1 "2023-06-09T00:57:24Z")

</div>

Hi, when opening Julia from the command palette (`Julia: start REPL`) it immediately crashes/closes too fast for me to see any errors. I followed the FAQ at [FAQ · Julia in VS Code](https://www.julia-vscode.org/docs/stable/faq/#FAQ) to use `Julia: Connect external repl` which gives the following:

```julia
slwu89@pop-os:~$ julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.9.1 (2023-06-07)
 _/ |\ __'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

julia> pushfirst!(LOAD_PATH, raw"/home/slwu89/.var/app/com.visualstudio.code/data/vscode/extensions/julialang.language-julia-1.47.2/scripts/packages");using VSCodeServer;popfirst!(LOAD_PATH);VSCodeServer.serve(raw"/tmp/vsc-jl-repl-c53b3d77-2a6b-4fc3-8a1c-bea3c10c67b4"; is_dev = "DEBUG_MODE=true" in Base.ARGS, crashreporting_pipename = raw"/tmp/vsc-jl-cr-613900b3-26d0-4067-8760-f50cb581d336");nothing # re-establishing connection with VSCode
[Info: Precompiling VSCodeServer [9f5989ce-84fe-42d4-91ec-6a7a8d53ed0f]
ERROR: IOError: connect: no such file or directory (ENOENT)
Stacktrace:
 [1] wait_connected(x::Base.PipeEndpoint)
   @ Sockets ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:528
 [2] connect
   @ ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:563 [inlined]
 [3] connect
   @ ~/.julia/juliaup/julia-1.9.1+0.x64.linux.gnu/share/julia/stdlib/v1.9/Sockets/src/PipeServer.jl:103 [inlined]
 [4] serve(args::String; is_dev::Bool, crashreporting_pipename::String)
   @ VSCodeServer ~/.var/app/com.visualstudio.code/data/vscode/extensions/julialang.language-julia-1.47.2/scripts/packages/VSCodeServer/src/VSCodeServer.jl:110
 [5] top-level scope
   @ REPL[1]:1

```

I’m using juliaup to manage my Julia installs (version 1.9.1), on VSCode version 1.78.2, Julia VSCode extension version v1.47.2, and am running Pop!\_os (installed VSCode as flatpak from the Pop!\_Shop app manager). Also in my settings.json file for the Julia VSCode extension, my `julia.executablePath` is set correctly to the one managed by juliaup. If anyone has any ideas how I can fix this problem, I would greatly appreciate it.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [June 9, 2023, 6:23am UTC](https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078/2 "2023-06-09T06:23:54Z")

</div>

I’m confused. Why are you using the external REPL?

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [June 9, 2023, 9:19am UTC](https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078/3 "2023-06-09T09:19:21Z")

</div>

Try running (VS) Code natively, without Flatpak.

---

<div class="post-metadata">

**Author:** ![slwu89](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/slwu89/32/217323_2.png) [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Post date:** [June 9, 2023, 2:02pm UTC](https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078/4 "2023-06-09T14:02:38Z")

</div>

Because that is the only way I can see any error messages. As I explained in my post, when I use the standard `Julia: start REPL` it crashes too fast to see any errors.

---

<div class="post-metadata">

**Author:** ![slwu89](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/slwu89/32/217323_2.png) [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Post date:** [June 9, 2023, 2:36pm UTC](https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078/5 "2023-06-09T14:36:26Z")

</div>

Thanks for the suggestion, that worked! Can you explain why that would work? The strange thing is that 2 days ago my previous setup (Flatpak) worked fine, and yesterday I suddenly experienced the problem I described, seemingly without any changes to my system.

---

<div class="post-metadata">

**Author:** ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Post date:** [June 9, 2023, 5:06pm UTC](https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078/6 "2023-06-09T17:06:25Z")

</div>

> [@slwu89](#):
>
> Can you explain why that would work?

Software packaged with Flatpak is subject to “sandboxing”, restricting it’s access to the host system (as configured by the packager).

A misconfiguration can cause the Flatpak-packaged software to have less capabilities than necessary, though.

Another possibility is disagreement between the security model assumed by the packagers and the one assumed by the software developers, also causing breakage for the user.

---

<div class="post-metadata">

**Author:** ![slwu89](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/slwu89/32/217323_2.png) [@slwu89](https://discourse.julialang.org/u/slwu89)\
**Post date:** [June 9, 2023, 11:39pm UTC](https://discourse.julialang.org/t/repl-immediately-crashes-in-vscode/100078/7 "2023-06-09T23:39:20Z")

</div>

Thanks for the explanation.
