Git Product home page Git Product logo

Comments (5)

timkpaine avatar timkpaine commented on July 20, 2024

did you install and enable the serverextension?
jupyter serverextension list

from jupyterlab_iframe.

shepner avatar shepner commented on July 20, 2024

Here is what I used to install:

sudo -H pip3 install jupyterlab_iframe
sudo jupyter labextension install jupyterlab_iframe
sudo jupyter serverextension enable --py jupyterlab_iframe

and here is the listing of what is installed

$ pip3 list --format=columns | grep iframe
jupyterlab-iframe    0.2.1 

$ jupyter serverextension list
config dir: /home/shepner/.jupyter
    jupyterlab_iframe.extension  enabled 
    - Validating...
      jupyterlab_iframe.extension  OK
config dir: /usr/local/etc/jupyter
    ipyparallel.nbextension  enabled 
    - Validating...
      ipyparallel.nbextension  OK
    jupyterlab  enabled 
    - Validating...
      jupyterlab 1.2.0 OK
    nbdime  enabled 
    - Validating...
      nbdime 1.1.0 OK
    nbresuse  enabled 
    - Validating...
      nbresuse  OK

from jupyterlab_iframe.

DraTeots avatar DraTeots commented on July 20, 2024

The same. Wanted to add noVNC tab running at localhost:6080

In javascript console there is CORS

ross-Origin Read Blocking (CORB) blocked cross-origin response http://127.0.0.1:6080/ with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

I set the next jupyterlab setting:

c.NotebookApp.allow_origin = '*'
c.Spawner.args = ["--NotebookApp.allow_origin=*"]
c.JupyterHub.tornado_settings = {
    'headers': {
        'Access-Control-Allow-Origin': '*',
    },
}

It still not working, but my JSconsole shows:

request.js:76 GET http://localhost:8888/iframes 404 (Not Found)
(anonymous) @ request.js:76
request @ request.js:52
activate @ index.js:157
(anonymous) @ index.js:147
Promise.then (async)
push.2R+v.Application.activatePlugin @ index.js:146
(anonymous) @ index.js:266
push.2R+v.Application.start @ index.js:265
main @ index.out.js:1658
load (async)
ANye @ index.out.js:1704
__webpack_require__ @ bootstrap:84
0 @ bootstrap:221
__webpack_require__ @ bootstrap:84
checkDeferredModules @ bootstrap:45
webpackJsonpCallback @ bootstrap:32
(anonymous) @ vendors~main.b8c7a8f5afdebae5f5a3.js:1
index.js:55 site failed with code 0
index.js:67 setting proxy for iframes/proxy?path=https://127.0.0.1:6080
request.js:76 GET https://127.0.0.1:6080/ net::ERR_CONNECTION_CLOSED
(anonymous) @ request.js:76
request @ request.js:52
IFrameWidget @ index.js:47
(anonymous) @ index.js:140
Promise.then (async)
execute @ index.js:132
push.5TpB.CommandRegistry.execute @ index.js:351
push.eIPM.CommandPalette._execute @ commandpalette.js:417
push.eIPM.CommandPalette._evtClick @ commandpalette.js:330
push.eIPM.CommandPalette.handleEvent @ commandpalette.js:211
index.js:65 GET http://localhost:8888/iframes/proxy?path=https://127.0.0.1:6080 404 (Not Found)
(anonymous) @ index.js:65
Promise.then (async)
IFrameWidget @ index.js:47
(anonymous) @ index.js:140
proxy?path=https://127.0.0.1:6080:179 Uncaught TypeError: Cannot read property 'scrollHeight' of undefined
    at proxy?path=https://127.0.0.1:6080:179
    at Object.execCb (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:1693)
    at Module.check (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:881)
    at Module.<anonymous> (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:1136)
    at require.js?v=951f856e81496aaeec2e71a1c2c0d51f:134
    at require.js?v=951f856e81496aaeec2e71a1c2c0d51f:1186
    at each (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:59)
    at Module.emit (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:1185)
    at Module.check (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:936)
    at Module.enable (require.js?v=951f856e81496aaeec2e71a1c2c0d51f:1173)

from jupyterlab_iframe.

timkpaine avatar timkpaine commented on July 20, 2024

the first line of the js error messages indicates that the serverextension is not installed:
Here is where it is fetched in JS: https://github.com/timkpaine/jupyterlab_iframe/blob/master/src/index.ts#L174
and here is where the serverextension adds the route:
https://github.com/timkpaine/jupyterlab_iframe/blob/master/jupyterlab_iframe/extension.py#L33

Are you sure both your python package and your js extension are running version 0.2.1? These commands will show the versions:

jupyter labextension list
pip show jupyterlab_iframe

from jupyterlab_iframe.

tom-butler avatar tom-butler commented on July 20, 2024

I was also caught out by this issue, we were using multi-stage docker builds, and installed and enabled the extension from the root user, changing the serverextension command to include the --system flag meant the extension was enabled for all users, not just root (which we weren't running jupyterlab from)

jupyter serverextension enable --py --system jupyterlab_iframe

from jupyterlab_iframe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.