# PlotlyJS fails on WSL2 - Ubuntu

**URL:** <https://discourse.julialang.org/t/plotlyjs-fails-on-wsl2-ubuntu/101992>\
**Category:** General Usage\
**Tags:** question\
**Created:** [July 23, 2023, 11:34pm UTC](https://discourse.julialang.org/t/plotlyjs-fails-on-wsl2-ubuntu/101992 "2023-07-23T23:34:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![C1Ron](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/c1ron/32/51758_2.png) [@C1Ron](https://discourse.julialang.org/u/C1Ron)\
**Post date:** [July 23, 2023, 11:34pm UTC](https://discourse.julialang.org/t/plotlyjs-fails-on-wsl2-ubuntu/101992/1 "2023-07-23T23:34:20Z")

</div>

Running PlotlyJS on WSL2 gives this error:

```julia
juila> plotlyjs()
julia> plot(x,y)
Error showing value of type Plots.Plot{Plots.PlotlyJSBackend}:
ERROR: IOError: connect: connection refused (ECONNREFUSED)

```

I’ve tried installing `libnss3` and `libxss1` as mentioned by @PetrKryslUCSD in  
[PlotlyJS: Blink connection trouble on WSL2 - General Usage - Julia Programming Language (julialang.org)](https://discourse.julialang.org/t/plotlyjs-blink-connection-trouble-on-wsl2/46881)

---

<div class="post-metadata">

**Author:** ![C1Ron](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/c1ron/32/51758_2.png) [@C1Ron](https://discourse.julialang.org/u/C1Ron)\
**Post date:** [July 24, 2023, 7:14am UTC](https://discourse.julialang.org/t/plotlyjs-fails-on-wsl2-ubuntu/101992/2 "2023-07-24T07:14:50Z")

</div>

From the link below I installed

- libgtk-3-0
- libxss1
- libgconf-2-4
- libnss3
- libasound2
- libx11-xcb1

> <https://github.com/JuliaGizmos/Blink.jl/issues/128>
>
> I can't go around a problem of using PlotlyJS from my terminal (works fine in At…om). The issue is reported before https://github.com/sglyon/PlotlyJS.jl/issues/33, and similarly https://github.com/JunoLab/Blink.jl/issues/82 . The thing is that even locally, I am not able to open a window with \`Blink.Window()\`
> 
> \`\`\`
> julia\> Blink.Window()
> ERROR: connect: connection refused (ECONNREFUSED)
> Stacktrace:
> \[1\] try\_yieldto(::Base.##298#299{Task}, ::Task) at ./event.jl:189
> \[2\] wait() at ./event.jl:234
> \[3\] wait(::Condition) at ./event.jl:27
> \[4\] stream\_wait(::TCPSocket, ::Condition, ::Vararg{Condition,N} where N) at ./stream.jl:42
> \[5\] wait\_connected(::TCPSocket) at ./stream.jl:258
> \[6\] connect at ./stream.jl:983 \[inlined\]
> \[7\] connect(::IPv4, ::Int64) at ./socket.jl:742
> \[8\] #try\_connect#4(::Float64, ::Int64, ::Function, ::IPv4, ::Vararg{Any,N} where N) at /home/nic/.julia/v0.6/Blink/src/AtomShell/process.jl:62
> \[9\] #init#5(::Bool, ::Function) at /home/nic/.julia/v0.6/Blink/src/AtomShell/process.jl:76
> \[10\] (::Blink.AtomShell.#kw##init)(::Array{Any,1}, ::Blink.AtomShell.#init) at ./\<missing\>:0
> \[11\] #shell#8(::Bool, ::Function) at /home/nic/.julia/v0.6/Blink/src/AtomShell/process.jl:114
> \[12\] Blink.AtomShell.Window() at /home/nic/.julia/v0.6/Blink/src/AtomShell/window.jl:37
> \`\`\`
> 
> The machine is under Ubuntu 18.04, tried both with Julia 0.6.2 and 0.6.3. Using \`xvfb-run julia\` and \`Blink.Atom.install()\` brought no success. Also increasing the input parameter values in \`function try\_connect(args...; interval = 0.5, attempts = 300)\` didn't help. Any idea for a workaround is welcome.
