Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOError: connect: connection refused (ECONNREFUSED) only on VS Code notebook #315

Open
jpmvferreira opened this issue Oct 18, 2023 · 1 comment
Labels

Comments

@jpmvferreira
Copy link

I'm facing an IOError: connect: connection refused (ECONNREFUSED) error on VS Code notebooks whenever I am trying to create a window using Blink.

This error doesn't take place when running exactly the same code from the Julia REPL in a terminal external to VS Code, nor when calling the Julia binary in a standard .jl file. I've also been able of successfully using Blink from the julia REPL inside of VS Code.
What is interesting is that the kernel that I am using in the VS Code notebook is not the one that ships with the Julia extension, but my local kernel.
This doesn't seem like an issue of missing libraries, given that I can execute the electron executable present in the ~/.julia/artifacts folder.

To replicate this issue setup an .ipynb notebook with a single cell and the following written in it:

using Blink: Window
w = Window()

Upon running this piece of code, I get the following stacktrace:

IOError: connect: connection refused (ECONNREFUSED)

Stacktrace:
  [1] wait_connected(x::Sockets.TCPSocket)
    @ Sockets [/usr/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:528](https://file+.vscode-resource.vscode-cdn.net/usr/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:528)
  [2] connect
    @ [/usr/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:563](https://file+.vscode-resource.vscode-cdn.net/usr/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:563) [inlined]
  [3] connect(addr::Sockets.IPv4, port::Int64)
    @ Sockets [/usr/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:549](https://file+.vscode-resource.vscode-cdn.net/usr/share/julia/stdlib/v1.9/Sockets/src/Sockets.jl:549)
  [4] try_connect(::Sockets.IPv4, ::Vararg{Any}; interval::Float64, attempts::Int64)
    @ Blink.AtomShell [~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:77](https://file+.vscode-resource.vscode-cdn.net/home/undercover/projects/etk/~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:77)
  [5] try_connect
    @ [~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:74](https://file+.vscode-resource.vscode-cdn.net/home/undercover/projects/etk/~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:74) [inlined]
  [6] init(; debug::Bool)
    @ Blink.AtomShell [~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:91](https://file+.vscode-resource.vscode-cdn.net/home/undercover/projects/etk/~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:91)
  [7] init
    @ [~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:85](https://file+.vscode-resource.vscode-cdn.net/home/undercover/projects/etk/~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:85) [inlined]
  [8] #shell#6
    @ [~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:147](https://file+.vscode-resource.vscode-cdn.net/home/undercover/projects/etk/~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:147) [inlined]
  [9] shell
    @ [~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:138](https://file+.vscode-resource.vscode-cdn.net/home/undercover/projects/etk/~/.julia/packages/Blink/LhpHk/src/AtomShell/process.jl:138) [inlined]
 [10] #Window#11
    @ [~/.julia/packages/Blink/LhpHk/src/AtomShell/window.jl:100](https://file+.vscode-resource.vscode-cdn.net/home/undercover/projects/etk/~/.julia/packages/Blink/LhpHk/src/AtomShell/window.jl:100) [inlined]
 [11] Window()
    @ Blink.AtomShell [~/.julia/packages/Blink/LhpHk/src/AtomShell/window.jl:100](https://file+.vscode-resource.vscode-cdn.net/home/undercover/projects/etk/~/.julia/packages/Blink/LhpHk/src/AtomShell/window.jl:100)
 [12] top-level scope
    @ In[1]:2
@pfitzseb pfitzseb added the bug label Oct 18, 2023
@b0wter
Copy link

b0wter commented Feb 12, 2024

I'm having the same problem. I am running Fedora 39 and VS Code version 1.87.0-insider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants