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

Widgets do not appear due to js and css missing #270

Open
aplavin opened this issue Oct 13, 2018 · 6 comments
Open

Widgets do not appear due to js and css missing #270

aplavin opened this issue Oct 13, 2018 · 6 comments

Comments

@aplavin
Copy link

aplavin commented Oct 13, 2018

I'm trying to get working the first example from tutorial but nothing shows up, neither in old jupyter notebook nor in jupyterlab. Plain WebIO work and display correctly.
When executing the cell with Interact, I see errors in browser console:

<server>:8888/assetserver/cb96c37f35818306cb266016c7f78bbe39dec7cd-style.css net::ERR_ABORTED 404

and the same for main.css, knockout.js, knockout-punches.js and all.js. However I cannot find any existing issue or discussion related to this.
Jupyter is started simply by jupyter lab from command line.

@piever
Copy link
Collaborator

piever commented Oct 13, 2018

Can you check whether the files are there? For example by typing:

julia> using Knockout

julia> k = pathof(Knockout)
"/home/pietro/.julia/packages/Knockout/JIqpG/src/Knockout.jl"

julia> isfile(joinpath(dirname(k), "..", "assets", "knockout.js"))
true

It may be that something went wrong in the build and you don't have the javascript libraries locally.

@aplavin
Copy link
Author

aplavin commented Oct 13, 2018

using Knockout
# ArgumentError: Package Knockout not found in current path:

;ls /home/aplavin/.julia/packages/Knockout/JIqpG/assets/
# knockout.js
# knockout_punches.js

;ls /home/aplavin/.julia/packages/InteractBase/Q4IkI/assets/
# all.js
# highlight.css
# katex.min.css
# katex.min.js
# nouislider.min.css
# nouislider.min.js
# prism.css
# prism.js
# style.css

@piever
Copy link
Collaborator

piever commented Oct 13, 2018

That's a bit puzzling. Another thing to try is deploying in Electron and seeing whether the error message is more insightful. What does the developer console give after:

using Blink, Interact
w = Window()
body!(w, button())
opentools(w)

(you may need to install Blink)

@aplavin
Copy link
Author

aplavin commented Oct 13, 2018

This installation is on a remote server without X and display, so I guess I cannot run Electron there.

@piever
Copy link
Collaborator

piever commented Oct 13, 2018

I guess the issue is that this has not been tested for usage from Jupyter on a remote server. To see that Interact is actually working, you can try serving the app from your server

using Mux, Interact, WebIO, Sockets
app = page("/", req -> button())
WebIO.webio_serve(app, ip"0.0.0.0", 8000)

Which should display a widget if you go with your browser to the IP of your server on port 8000.

If this works then I guess the installation of Interact is fine but AssetRegistry (the package responsible for loading the assets) doesn't work on a remote Jupyter setup and it's probably worth opening an issue there.

@AshtonSBradley
Copy link

AshtonSBradley commented Feb 20, 2019

@manipulate works fine in jupyter, but not working on jupyterlab for me.

I just point out that the docs for interact are currently incorrect as they claim it works in jupyterlab: https://juliagizmos.github.io/Interact.jl/latest/

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

No branches or pull requests

3 participants