Hello,
I have a code that was working well before updating Julia to 1.8.5, but now I got an error that I don’t uderstand at all…
The idea was to generate an interactive interface that can show a png/gif file depending on some sliders/buttons. I use Blink in order to get a window, and Interact with WebIO for the slider/button/observable parts.
It is very rudimental because I know nothing almost nothing about HTTP, websocket, thread or HTML, javascript and etc… I was using it as a nice blackbox.
This is what it looks like
Before the update I was getting only one or two lines of texr, today when I run my code I get:
[ Info: Listening on: 127.0.0.1:8283, thread id: 1
Page(1, HTTP.WebSockets.WebSocket(UUID("8891d0af-0290-4580-b435-5ef6b52fe313"), 🔁 10s 127.0.0.1:8283:8283 Base.Libc.WindowsRawSocket(0x0000000000001f34), HTTP.Messages.Request:
"""
GET /1?callback=1/1 HTTP/1.1
Host: 127.0.0.1:8283
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.167 Electron/19.0.9 Safari/537.36
Upgrade: websocket
Origin: http://127.0.0.1:8283
Sec-WebSocket-Version: 13
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US
Sec-WebSocket-Key: ULb8maJqg+glVJecTX3b/g==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
""", HTTP.Messages.Response:
"""
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: cq2PnbcYfGgws84cstKXGehGdlk=
""", 9223372036854775807, 1024, false, UInt8[0x7b, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x22, 0x63 … 0x72, 0x22, 0x3a, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x7d, 0x7d], UInt8[], false, false), Dict{String, Any}("webio" => Blink.AtomShell.var"#19#20"{Blink.AtomShell.WebIOBlinkComm}(Blink.AtomShell.WebIOBlinkComm(Window(1, Electron(Process(`'C:\Users\ludop\.julia\artifacts\77dde9ca99aacbbcdc9754e39062ed451ef26861\electron.exe' 'C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\main.js' port 5712`, ProcessRunning), Sockets.TCPSocket(Base.Libc.WindowsRawSocket(0x000000000000214c) active, 0 bytes waiting), Dict{String, Any}("callback" => Blink.var"#1#2"())), Page(#= circular reference @-5 =#), Task (done) @0x00000291ee411940))), "callback" => Blink.var"#1#2"()), Distributed.Future(1, 1, 1, ReentrantLock(nothing, 0x00000000, 0x00, Base.GenericCondition{Base.Threads.SpinLock}(Base.InvasiveLinkedList{Task}(nothing, nothing), Base.Threads.SpinLock(0)), (0, 140704510726416, 4294967297)), Some(true)))
But When I want to interact with the widgets I get this error:
┌ Error: An exception occurred while trying to send a WebIO message to a frontend:
│ exception =
│ IOError: stream is closed or unusable
│ Stacktrace:
│ [1] check_open
│ @ .\stream.jl:388 [inlined]
│ [2] uv_write_async(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1072
│ [3] uv_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1035
│ [4] unsafe_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1118
│ [5] unsafe_write
│ @ .\io.jl:683 [inlined]
│ [6] unsafe_write(s::Sockets.TCPSocket, p::Base.RefValue{UInt16}, n::Int64)
│ @ Base .\io.jl:681
│ [7] write
│ @ .\io.jl:684 [inlined]
│ [8] write
│ @ .\io.jl:687 [inlined]
│ [9] writeframe(io::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, x::HTTP.WebSockets.Frame)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:186
│ [10] send(ws::HTTP.WebSockets.WebSocket, x::String)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:519
│ [11] msg(p::Page, m::Dict{Symbol, Any})
│ @ Blink C:\Users\ludop\.julia\packages\Blink\SMxOp\src\content\content.jl:45
│ [12] msg(win::Window, m::Dict{Symbol, Any})
│ @ Blink.AtomShell C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\window.jl:261
│ [13] send
│ @ C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\webio.jl:38 [inlined]
│ [14] send_message(pool::WebIO.ConnectionPool, connection::Blink.AtomShell.WebIOBlinkComm, msg::Dict{String, Any})
│ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:115
│ [15] (::WebIO.var"#5#6"{WebIO.ConnectionPool, Dict{String, Any}, Blink.AtomShell.WebIOBlinkComm})()
│ @ WebIO .\task.jl:484
└ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:120
┌ Error: An exception occurred while trying to send a WebIO message to a frontend:
│ exception =
│ IOError: stream is closed or unusable
│ Stacktrace:
│ [1] check_open
│ @ .\stream.jl:388 [inlined]
│ [2] uv_write_async(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1072
│ [3] uv_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1035
│ [4] unsafe_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1118
│ [5] unsafe_write
│ @ .\io.jl:683 [inlined]
│ [6] unsafe_write(s::Sockets.TCPSocket, p::Base.RefValue{UInt16}, n::Int64)
│ @ Base .\io.jl:681
│ [7] write
│ @ .\io.jl:684 [inlined]
│ [8] write
│ @ .\io.jl:687 [inlined]
│ [9] writeframe(io::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, x::HTTP.WebSockets.Frame)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:186
│ [10] send(ws::HTTP.WebSockets.WebSocket, x::String)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:519
│ [11] msg(p::Page, m::Dict{Symbol, Any})
│ @ Blink C:\Users\ludop\.julia\packages\Blink\SMxOp\src\content\content.jl:45
│ [12] msg(win::Window, m::Dict{Symbol, Any})
│ @ Blink.AtomShell C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\window.jl:261
│ [13] send
│ @ C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\webio.jl:38 [inlined]
│ [14] send_message(pool::WebIO.ConnectionPool, connection::Blink.AtomShell.WebIOBlinkComm, msg::Dict{String, Any})
│ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:115
│ [15] (::WebIO.var"#5#6"{WebIO.ConnectionPool, Dict{String, Any}, Blink.AtomShell.WebIOBlinkComm})()
│ @ WebIO .\task.jl:484
└ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:120
┌ Error: An exception occurred while trying to send a WebIO message to a frontend:
│ exception =
│ IOError: stream is closed or unusable
│ Stacktrace:
│ [1] check_open
│ @ .\stream.jl:388 [inlined]
│ [2] uv_write_async(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1072
│ [3] uv_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1035
│ [4] unsafe_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1118
│ [5] unsafe_write
│ @ .\io.jl:683 [inlined]
│ [6] unsafe_write(s::Sockets.TCPSocket, p::Base.RefValue{UInt16}, n::Int64)
│ @ Base .\io.jl:681
│ [7] write
│ @ .\io.jl:684 [inlined]
│ [8] write
│ @ .\io.jl:687 [inlined]
│ [9] writeframe(io::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, x::HTTP.WebSockets.Frame)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:186
│ [10] send(ws::HTTP.WebSockets.WebSocket, x::String)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:519
│ [11] msg(p::Page, m::Dict{Symbol, Any})
│ @ Blink C:\Users\ludop\.julia\packages\Blink\SMxOp\src\content\content.jl:45
│ [12] msg(win::Window, m::Dict{Symbol, Any})
│ @ Blink.AtomShell C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\window.jl:261
│ [13] send
│ @ C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\webio.jl:38 [inlined]
│ [14] send_message(pool::WebIO.ConnectionPool, connection::Blink.AtomShell.WebIOBlinkComm, msg::Dict{String, Any})
│ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:115
│ [15] (::WebIO.var"#5#6"{WebIO.ConnectionPool, Dict{String, Any}, Blink.AtomShell.WebIOBlinkComm})()
│ @ WebIO .\task.jl:484
└ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:120
┌ Error: An exception occurred while trying to send a WebIO message to a frontend:
│ exception =
│ IOError: stream is closed or unusable
│ Stacktrace:
│ [1] check_open
│ @ .\stream.jl:388 [inlined]
│ [2] uv_write_async(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1072
│ [3] uv_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1035
│ [4] unsafe_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1118
│ [5] unsafe_write
│ @ .\io.jl:683 [inlined]
│ [6] unsafe_write(s::Sockets.TCPSocket, p::Base.RefValue{UInt16}, n::Int64)
│ @ Base .\io.jl:681
│ [7] write
│ @ .\io.jl:684 [inlined]
│ [8] write
│ @ .\io.jl:687 [inlined]
│ [9] writeframe(io::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, x::HTTP.WebSockets.Frame)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:186
│ [10] send(ws::HTTP.WebSockets.WebSocket, x::String)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:519
│ [11] msg(p::Page, m::Dict{Symbol, Any})
│ @ Blink C:\Users\ludop\.julia\packages\Blink\SMxOp\src\content\content.jl:45
│ [12] msg(win::Window, m::Dict{Symbol, Any})
│ @ Blink.AtomShell C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\window.jl:261
│ [13] send
│ @ C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\webio.jl:38 [inlined]
│ [14] send_message(pool::WebIO.ConnectionPool, connection::Blink.AtomShell.WebIOBlinkComm, msg::Dict{String, Any})
│ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:115
│ [15] (::WebIO.var"#5#6"{WebIO.ConnectionPool, Dict{String, Any}, Blink.AtomShell.WebIOBlinkComm})()
│ @ WebIO .\task.jl:484
└ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:120
┌ Error: An exception occurred while trying to send a WebIO message to a frontend:
│ exception =
│ IOError: write: operation canceled (ECANCELED)
│ Stacktrace:
│ [1] uv_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1064
│ [2] unsafe_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1118
│ [3] unsafe_write
│ @ .\io.jl:683 [inlined]
│ [4] unsafe_write(s::Sockets.TCPSocket, p::Base.RefValue{UInt16}, n::Int64)
│ @ Base .\io.jl:681
│ [5] write
│ @ .\io.jl:684 [inlined]
│ [6] write
│ @ .\io.jl:687 [inlined]
│ [7] writeframe(io::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, x::HTTP.WebSockets.Frame)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:184
│ [8] send(ws::HTTP.WebSockets.WebSocket, x::String)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:519
│ [9] msg(p::Page, m::Dict{Symbol, Any})
│ @ Blink C:\Users\ludop\.julia\packages\Blink\SMxOp\src\content\content.jl:45
│ [10] msg(win::Window, m::Dict{Symbol, Any})
│ @ Blink.AtomShell C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\window.jl:261
│ [11] send
│ @ C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\webio.jl:38 [inlined]
│ [12] send_message(pool::WebIO.ConnectionPool, connection::Blink.AtomShell.WebIOBlinkComm, msg::Dict{String, String})
│ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:115
│ [13] (::WebIO.var"#5#6"{WebIO.ConnectionPool, Dict{String, String}, Blink.AtomShell.WebIOBlinkComm})()
│ @ WebIO .\task.jl:484
└ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:120
┌ Error: An exception occurred while trying to send a WebIO message to a frontend:
│ exception =
│ IOError: write: operation canceled (ECANCELED)
│ Stacktrace:
│ [1] uv_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1064
│ [2] unsafe_write(s::Sockets.TCPSocket, p::Ptr{UInt8}, n::UInt64)
│ @ Base .\stream.jl:1118
│ [3] unsafe_write
│ @ .\io.jl:683 [inlined]
│ [4] unsafe_write(s::Sockets.TCPSocket, p::Base.RefValue{UInt16}, n::Int64)
│ @ Base .\io.jl:681
│ [5] write
│ @ .\io.jl:684 [inlined]
│ [6] write
│ @ .\io.jl:687 [inlined]
│ [7] writeframe(io::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, x::HTTP.WebSockets.Frame)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:184
│ [8] send(ws::HTTP.WebSockets.WebSocket, x::String)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:519
│ [9] msg(p::Page, m::Dict{Symbol, Any})
│ @ Blink C:\Users\ludop\.julia\packages\Blink\SMxOp\src\content\content.jl:45
│ [10] msg(win::Window, m::Dict{Symbol, Any})
│ @ Blink.AtomShell C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\window.jl:261
│ [11] send
│ @ C:\Users\ludop\.julia\packages\Blink\SMxOp\src\AtomShell\webio.jl:38 [inlined]
│ [12] send_message(pool::WebIO.ConnectionPool, connection::Blink.AtomShell.WebIOBlinkComm, msg::Dict{String, Any})
│ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:115
│ [13] (::WebIO.var"#5#6"{WebIO.ConnectionPool, Dict{String, Any}, Blink.AtomShell.WebIOBlinkComm})()
│ @ WebIO .\task.jl:484
└ @ WebIO C:\Users\ludop\.julia\packages\WebIO\rv35l\src\connection.jl:120
┌ Error: 8891d0af-0290-4580-b435-5ef6b52fe313: Unexpected websocket server error
│ (e, catch_backtrace()) =
│ EOFError: read end of file
│ Stacktrace:
│ [1] unsafe_read(c::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, p::Ptr{UInt8}, n::UInt64)
│ @ HTTP.ConnectionPool C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\ConnectionPool.jl:181
│ [2] unsafe_read
│ @ .\io.jl:759 [inlined]
│ [3] unsafe_read(s::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, p::Base.RefValue{UInt16}, n::Int64)
│ @ Base .\io.jl:758
│ [4] read!
│ @ .\io.jl:760 [inlined]
│ [5] read
│ @ .\io.jl:764 [inlined]
│ [6] readframe(io::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, ::Type{HTTP.WebSockets.Frame}, buffer::Vector{UInt8}, first_fragment_opcode::HTTP.WebSockets.OpCode)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:128
│ [7] readframe(io::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, ::Type{HTTP.WebSockets.Frame}, buffer::Vector{UInt8})
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:127
│ [8] receive(ws::HTTP.WebSockets.WebSocket)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:658
│ [9] iterate(ws::HTTP.WebSockets.WebSocket, st::Nothing)
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:697
│ [10] ws_handler(ws::HTTP.WebSockets.WebSocket)
│ @ Blink C:\Users\ludop\.julia\packages\Blink\SMxOp\src\content\server.jl:47
│ [11] (::Mux.var"#9#10"{Mux.App})(sock::HTTP.WebSockets.WebSocket)
│ @ Mux C:\Users\ludop\.julia\packages\Mux\PipQ9\src\server.jl:48
│ [12] upgrade(f::Mux.var"#9#10"{Mux.App}, http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Connection{Sockets.TCPSocket}}; suppress_close_error::Bool, maxframesize::Int64, maxfragmentation::Int64, kw::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
│ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:439
│ [13] upgrade
│ @ C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:419 [inlined]
│ [14] (::Mux.var"#14#15"{Mux.App, Mux.App})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Connection{Sockets.TCPSocket}})
│ @ Mux C:\Users\ludop\.julia\packages\Mux\PipQ9\src\server.jl:81
│ [15] #invokelatest#2
│ @ .\essentials.jl:729 [inlined]
│ [16] invokelatest
│ @ .\essentials.jl:726 [inlined]
│ [17] handle_connection(f::Function, c::HTTP.ConnectionPool.Connection{Sockets.TCPSocket}, listener::HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, readtimeout::Int64, access_log::Nothing)
│ @ HTTP.Servers C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\Servers.jl:447
│ [18] (::HTTP.Servers.var"#16#17"{Mux.var"#14#15"{Mux.App, Mux.App}, HTTP.Servers.Listener{Nothing, Sockets.TCPServer}, Set{HTTP.ConnectionPool.Connection}, Int64, Nothing, Base.Semaphore, HTTP.ConnectionPool.Connection{Sockets.TCPSocket}})()
│ @ HTTP.Servers .\task.jl:484
└ @ HTTP.WebSockets C:\Users\ludop\.julia\packages\HTTP\z8l0i\src\WebSockets.jl:442
I use Windows 10, jupyter lab with jupyter server, addtionnal infos:
Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 8 on 8 virtual cores
Environment:
JULIA_NUM_THREADS = 8
Status `C:\Users\ludop\.julia\environments\v1.8\Project.toml`
[ad839575] Blink v0.12.6
[336ed68f] CSV v0.10.9
[052768ef] CUDA v4.1.0
[5ae59095] Colors v0.12.10
[a93c6f00] DataFrames v1.5.0
[5789e2e9] FileIO v1.16.0
[53c48c17] FixedPointNumbers v0.8.4
[7073ff75] IJulia v1.24.0
[916415d5] Images v0.25.2
[c601a237] Interact v0.10.5
[4138dd39] JLD v0.13.3
[682c06a0] JSON v0.21.3
[ee78f7c6] Makie v0.19.3
[cbe49d4c] RemoteFiles v0.5.0
[0f1e0344] WebIO v0.8.20
[9bd350c2] OpenSSH_jll v9.1.0+0
Thank you in advance for your help,
Best regards,
Ludovic