# PlotlyJS: Blink connection trouble on WSL2

**URL:** <https://discourse.julialang.org/t/plotlyjs-blink-connection-trouble-on-wsl2/46881>\
**Category:** General Usage\
**Created:** [September 18, 2020, 9:42pm UTC](https://discourse.julialang.org/t/plotlyjs-blink-connection-trouble-on-wsl2/46881 "2020-09-18T21:42:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 18, 2020, 9:42pm UTC](https://discourse.julialang.org/t/plotlyjs-blink-connection-trouble-on-wsl2/46881/1 "2020-09-18T21:42:56Z")

</div>

Running this on WSL2. Graphics works (for instance, Firefox comes up no problem).  
Trying to use PlotlyJS I get this error message:

```julia
julia> include("klein_gordon_var.jl")                                                                  
WARNING: replacing module klein_gordon_var.                                                            
nu = nunknowns(Psih) = 149                                                                             
ERROR: LoadError: IOError: connect: connection refused (ECONNREFUSED)                                  
Stacktrace:                                                                                            
 [1] wait_connected(::Sockets.TCPSocket) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Sockets/src/Sockets.jl:525                                                                  
 [2] connect at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Sockets/src/Sockets.jl:560 [inlined]                                                                                    
 [3] connect(::Sockets.IPv4, ::Int64) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Sockets/src/Sockets.jl:546                                                                     
 [4] try_connect(::Sockets.IPv4, ::Vararg{Any,N} where N; interval::Float64, attempts::Int64) at /home/pkrysl/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:79                                         
 [5] try_connect at /home/pkrysl/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:77 [inlined]     
 [6] init(; debug::Bool) at /home/pkrysl/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:93       
 [7] shell(; debug::Bool) at /home/pkrysl/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:149     
 [8] shell at /home/pkrysl/.julia/packages/Blink/u1xcH/src/AtomShell/process.jl:144 [inlined]          
 [9] #Window#14 at /home/pkrysl/.julia/packages/Blink/u1xcH/src/AtomShell/window.jl:89 [inlined]       
 [10] Blink.AtomShell.Window(::Dict{String,Int64}) at /home/pkrysl/.julia/packages/Blink/u1xcH/src/AtomShell/window.jl:89                                                                                     
 [11] display_blink(::PlotlyJS.SyncPlot) at /home/pkrysl/.julia/packages/PlotlyJS/m2Lzd/src/display.jl:158                                                                                                    
 [12] display(::PlotlyJS.PlotlyJSDisplay, ::PlotlyJS.SyncPlot) at /home/pkrysl/.julia/packages/PlotlyJS/m2Lzd/src/display.jl:152                                                                              
 [13] display(::Any) at ./multimedia.jl:328                                                            
 [14] run() at /mnt/c/Users/PetrKrysl/Documents/work/Elfel.jl/examples/klein_gordon/klein_gordon_var.jl:223                                                                                                   
 [15] top-level scope at /mnt/c/Users/PetrKrysl/Documents/work/Elfel.jl/examples/klein_gordon/klein_gordon_var.jl:243                                                                                         
 [16] include(::String) at ./client.jl:457                                                             
 [17] top-level scope at REPL[3]:1                                                                     
in expression starting at /mnt/c/Users/PetrKrysl/Documents/work/Elfel.jl/examples/klein_gordon/klein_gordon_var.jl:243  

```

Any idea what to do?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 18, 2020, 9:52pm UTC](https://discourse.julialang.org/t/plotlyjs-blink-connection-trouble-on-wsl2/46881/2 "2020-09-18T21:52:04Z")

</div>

I have had an epiphany and read the documentation ;):

Trying to run `electron` I found that some libraries are missing in Ubuntu 20.4 when installed as WSL2.  
Doing

```julia
sudo apt install libnss3   
sudo apt-get install libxss1 

```

fixed the issue.
