Bonito.jl icon indicating copy to clipboard operation
Bonito.jl copied to clipboard

README example failes in JupyterLab

Open ricochet1k opened this issue 5 years ago • 1 comments

I'm trying to use JupyterLab over an SSH tunnel, forwarding ports 8888 and 8081 to the host where I have jupyter and Julia installed. When I copy and paste the example from your README.md, I get this:

┌ Error: error handling request
│   exception = (MethodError(var"#3#5"(), (Session(Base.RefValue{Bool}(false), WebSockets.WebSocket[], Dict{String,Tuple{Bool,Observable}}(), Dict{Symbol,Any}[], Set(JSServe.Asset[]), JSServe.JSCode[], "f71ccc17-116c-4c93-b9ba-42a7ca2bf735", JSServe.init_session), HTTP.Messages.Request:
"""
GET /show HTTP/1.1
Host: 127.0.0.1:8081
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:73.0) Gecko/20100101 Firefox/73.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://localhost:8888/lab?
Upgrade-Insecure-Requests: 1

"""), 0x00000000000068d9), Base.StackTraces.StackFrame[#invokelatest#1 at essentials.jl:709 [inlined], invokelatest at essentials.jl:708 [inlined], serve_dom(::NamedTuple{(:routes, :application, :request, :match),Tuple{JSServe.Routes,Application,HTTP.Messages.Request,String}}, ::Function) at types.jl:263, (::JSServe.var"#59#60"{JSServe.DisplayInline})(::NamedTuple{(:routes, :application, :request, :match),Tuple{JSServe.Routes,Application,HTTP.Messages.Request,String}}) at display.jl:44, apply_handler(::Function, ::NamedTuple{(:routes, :application, :request, :match),Tuple{JSServe.Routes,Application,HTTP.Messages.Request,String}}) at types.jl:105, delegate(::JSServe.Routes, ::Application, ::HTTP.Messages.Request) at types.jl:124, #8 at types.jl:247 [inlined], handle at Handlers.jl:253 [inlined], handle(::HTTP.Handlers.RequestHandlerFunction{JSServe.var"#8#10"{Application}}, ::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at Handlers.jl:276, stream_handler(::Application, ::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at types.jl:251, #invokelatest#1 at essentials.jl:709 [inlined], invokelatest at essentials.jl:708 [inlined], #21 at types.jl:344 [inlined], macro expansion at Servers.jl:360 [inlined], (::HTTP.Servers.var"#13#14"{JSServe.var"#21#23"{Application},HTTP.ConnectionPool.Transaction{Sockets.TCPSocket},HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})() at task.jl:333])
└ @ HTTP.Servers /home/matt/.julia/packages/HTTP/lZVI1/src/Servers.jl:364

I got to this by trying to display some very simple plots with Makie using the WGLMakie backend. When I try that, I get this:

┌ Error: Error in Javascript: Could not find heap object: 1517845540909878286
│  with exception:
└ @ JSServe /home/matt/.julia/packages/JSServe/4bedp/src/http.jl:154

My apologies if this isn't the right place to report the bug, I'm new to Julia. I'm using Firefox here, if that makes any difference.

ricochet1k avatar Dec 26 '19 19:12 ricochet1k

Maybe, this issue can be closed. JSServe runs on JupyterLab v3

$ jupyter lab --version
3.0.6

image

terasakisatoshi avatar Jan 31 '21 12:01 terasakisatoshi