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

Bug in interaction with Mux.jl #513

Open
torfjelde opened this issue Jun 21, 2023 · 3 comments · May be fixed by #515
Open

Bug in interaction with Mux.jl #513

torfjelde opened this issue Jun 21, 2023 · 3 comments · May be fixed by #515

Comments

@torfjelde
Copy link

torfjelde commented Jun 21, 2023

The bug

It seems we're using an outdated interface for WebSocket in the bridging code for Mux.jl:

function create_socket(req)
sock = req[:socket]
conn = WebSockConnection(sock)
t = @async while isopen(sock)
data = read(sock)
msg = JSON.parse(String(data))
WebIO.dispatch(conn, msg)
end
wait(t)
end

In particular, it doesn't seem like isopen is defined anymore, and it was removed in JuliaWeb/HTTP.jl#843.

If I revert to [email protected] or [email protected] (release prior to the forementioned PR), the issue disappears.

Currently the Project.toml claim compat with [email protected], which then doesn't seem quite true 😕

Context

I came across this issue when trying the following simple Interact.jl-example:

using Mux, WebIO, Interact
ui = button()
WebIO.webio_serve(page("/", req -> ui), 8000) # serve on a random port
(server) pkg> st --manifest
Status `~/Projects/consulting/alcemy/prism_thomas/julia/server/Manifest.toml`
  [bf4720bc] AssetRegistry v0.1.0
  [d1d4a3ce] BitFlags v0.1.7
  [70588ee8] CSSUtil v0.1.1
  [944b1d66] CodecZlib v0.7.1
  [3da002f7] ColorTypes v0.11.4
  [5ae59095] Colors v0.12.10
  [f0e56b4a] ConcurrentUtilities v2.2.0
  [53c48c17] FixedPointNumbers v0.8.4
  [de31a74c] FunctionalCollections v0.5.0
  [cd3eb016] HTTP v1.9.6
  [9fb69e20] Hiccup v0.2.2
  [c601a237] Interact v0.10.5
  [d3863d7c] InteractBase v0.10.9
  [692b3bcd] JLLWrappers v1.4.1
  [97c1335a] JSExpr v0.5.4
  [682c06a0] JSON v0.21.4
  [bcebb21b] Knockout v0.2.6
  [e6f89c97] LoggingExtras v1.0.0
  [1914dd2f] MacroTools v0.5.10
  [739be429] MbedTLS v1.1.7
  [442fdcdd] Measures v0.3.2
  [a975b10e] Mux v1.0.1
  [510215fc] Observables v0.5.4
  [4d8831e6] OpenSSL v1.4.1
  [bac558e1] OrderedCollections v1.6.0
  [69de0a69] Parsers v2.7.0
  [fa939f87] Pidfile v1.3.0
  [aea7be01] PrecompileTools v1.1.2
  [21216c6a] Preferences v1.4.0
  [189a3867] Reexport v1.2.2
  [ae029012] Requires v1.3.0
  [777ac1f9] SimpleBufferStream v1.1.0
  [3bb67fe8] TranscodingStreams v0.9.13
  [5c2747f8] URIs v1.4.2
  [0f1e0344] WebIO v0.8.21
  [104b5d7c] WebSockets v1.6.0
  [cc8bc4a8] Widgets v0.6.6
  [458c3c95] OpenSSL_jll v3.0.9+0
  [0dad84c5] ArgTools v1.1.1
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching
  [b77e0a4c] InteractiveUtils
  [b27032c2] LibCURL v0.6.3
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions v1.2.0
  [44cfe95a] Pkg v1.9.0
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics v1.9.0
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll v1.0.2+0
  [deac9b47] LibCURL_jll v7.84.0+0
  [29816b5a] LibSSH2_jll v1.10.2+0
  [c8ffd9c3] MbedTLS_jll v2.28.2+0
  [14a3606d] MozillaCACerts_jll v2022.10.11
  [4536629a] OpenBLAS_jll v0.3.21+4
  [bea87d4a] SuiteSparse_jll v5.10.1+6
  [83775a58] Zlib_jll v1.2.13+0
  [8e850b90] libblastrampoline_jll v5.7.0+0
  [8e850ede] nghttp2_jll v1.48.0+0
  [3f19e933] p7zip_jll v17.4.0+0

and

julia> versioninfo()
Julia Version 1.9.0
Commit 8e630552924 (2023-05-07 11:25 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 1700X Eight-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, znver1)
  Threads: 1 on 16 virtual cores
Environment:
  JULIA_IMAGE_THREADS = 1
@hsseung
Copy link

hsseung commented Jul 15, 2023

I also encountered this issue, which has broken many examples.
I fixed by reverting to [email protected], as suggested above.

@Benoit9
Copy link

Benoit9 commented Jan 7, 2024

It seems that there is a PR that would fix this issue?

#500

@mkitti
Copy link

mkitti commented Aug 19, 2024

#515 is my attempt to fix this. #500 does not fix this, although it is related.

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

Successfully merging a pull request may close this issue.

4 participants