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

Uncaught TypeError results in empty launcher #45

Open
jans-code opened this issue Apr 2, 2023 · 7 comments
Open

Uncaught TypeError results in empty launcher #45

jans-code opened this issue Apr 2, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@jans-code
Copy link

Description

I am having some trouble getting the enhanced launcher to work.
After installation via pip my launcher is just empty and I get error messages on browser console.

I got a lot of kernels, maybe that is the problem?

default

I'd really like to use this promising enhancement, but I am having trouble getting my grip around this problem.

enhanced

Reproduce

Permanently when opening/viewing a launcher tab.

Expected behavior

The enhanced launcher should be visible.

Context

  • Python package version: jlab-enhanced-launcher-3.2.0
  • Extension version:
        jupyterlab-ihaskell v0.0.14 enabled OK
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        nbdime-jupyterlab v2.1.1 enabled OK
        jupyterlab-rise v0.2.0 enabled OK (python, jupyterlab_rise)
        jupyterlab-night v0.4.6 enabled OK (python, jupyterlab_night)
        jupyterlab_apod v3.5.0 enabled OK (python, jupyterlab_apod)
        gpt_jupyterlab v0.1.4 enabled OK (python, gpt_jupyterlab)
        jupyterlab-jupytext v1.3.8+dev enabled OK (python, jupytext)
        @jlab-enhanced/favorites v3.1.1 enabled OK (python, jupyterlab-favorites)
        @jlab-enhanced/launcher v3.2.0 enabled OK (python, jlab-enhanced-launcher)
        @jupyter-widgets/jupyterlab-manager v5.0.7 enabled OK (python, jupyterlab_widgets)
        @deathbeds/ipydrawio-mathjax v1.2.2 enabled OK (python, ipydrawio-mathjax)
        @deathbeds/ipydrawio v1.2.2 enabled OK (python, ipydrawio)
        @deathbeds/ipydrawio-jupyter-templates v1.2.2 enabled OK (python, ipydrawio)
        @deathbeds/ipydrawio-webpack v20.5.300 enabled OK (python, ipydrawio)
        @deathbeds/ipydrawio-notebook v1.2.2 enabled OK (python, ipydrawio)
        @telamonian/theme-darcula v4.0.0 enabled OK (python, theme-darcula)
        @mohirio/jupyterlab-horizon-theme v3.1.1-b0 enabled OK (python, jupyterlab-horizon-theme)
        @hadim/jupyter-archive v3.3.4 enabled OK (python, jupyter-archive)
        @jupyterlab/latex v3.1.0 enabled OK (python, jupyterlab-latex)
        @jupyterlab/git v0.41.0 enabled OK (python, jupyterlab-git)
  • Operating System and its version: Archlinux
  • Browser and its version: current chromium, edge and vivaldi versions
Command Line Output
Nothing.
Web Browser Output
41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach')
    at L.render (41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1:3493)
    at vdom.js:53:32
    at new Promise ()
    at L.renderDOM (vdom.js:52:16)
    at L.onUpdateRequest (vdom.js:30:35)
    at e.processMessage (index.es6.js:1421:22)
    at b (index.es6.js:444:21)
    at Object.t [as sendMessage] (index.es6.js:180:13)
    at L.onAfterAttach (vdom.js:37:9)
    at e.processMessage (index.es6.js:1455:22)
render @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
(anonymous) @ vdom.js:53
renderDOM @ vdom.js:52
onUpdateRequest @ vdom.js:30
e.processMessage @ index.es6.js:1421
b @ index.es6.js:444
t @ index.es6.js:180
onAfterAttach @ vdom.js:37
e.processMessage @ index.es6.js:1455
b @ index.es6.js:444
t @ index.es6.js:180
(anonymous) @ index.es6.js:2200
c @ index.es6.js:1563
e.onAfterAttach @ index.es6.js:2199
e.processParentMessage @ index.es6.js:2099
e.notifyLayout @ index.es6.js:1500
e.processMessage @ index.es6.js:1454
b @ index.es6.js:444
t @ index.es6.js:180
t.attachWidget @ index.es6.js:10352
t.addWidget @ index.es6.js:10243
t.addWidget @ index.es6.js:11900
_addToMainArea @ shell.js:853
add @ shell.js:514
execute @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
e.execute @ index.es6.js:406
t @ index.js:931
execute @ index.js:859
e.execute @ index.es6.js:406
(anonymous) @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._onTabAddRequested @ index.es6.js:12420
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._evtMouseUp @ index.es6.js:9222
t.handleEvent @ index.es6.js:8931
41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach')
    at L.render (41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1:3493)
    at vdom.js:53:32
    at new Promise ()
    at L.renderDOM (vdom.js:52:16)
    at L.onUpdateRequest (vdom.js:30:35)
    at e.processMessage (index.es6.js:1421:22)
    at b (index.es6.js:444:21)
    at t (index.es6.js:180:13)
    at y (index.es6.js:495:17)
render @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
(anonymous) @ vdom.js:53
renderDOM @ vdom.js:52
onUpdateRequest @ vdom.js:30
e.processMessage @ index.es6.js:1421
b @ index.es6.js:444
t @ index.es6.js:180
y @ index.es6.js:495
requestAnimationFrame (async)
_ @ index.es6.js:463
n @ index.es6.js:231
e.update @ index.es6.js:1281
set model @ vdom.js:97
w @ vdom.js:75
L @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
execute @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
e.execute @ index.es6.js:406
t @ index.js:931
execute @ index.js:859
e.execute @ index.es6.js:406
(anonymous) @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._onTabAddRequested @ index.es6.js:12420
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._evtMouseUp @ index.es6.js:9222
t.handleEvent @ index.es6.js:8931
41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach')
    at L.render (41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1:3493)
    at vdom.js:53:32
    at new Promise ()
    at L.renderDOM (vdom.js:52:16)
    at L.onUpdateRequest (vdom.js:30:35)
    at e.processMessage (index.es6.js:1421:22)
    at b (index.es6.js:444:21)
    at Object.t [as sendMessage] (index.es6.js:180:13)
    at je.onUpdateRequest (mainareawidget.js:199:13)
    at e.processMessage (index.es6.js:1421:22)
render @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
(anonymous) @ vdom.js:53
renderDOM @ vdom.js:52
onUpdateRequest @ vdom.js:30
e.processMessage @ index.es6.js:1421
b @ index.es6.js:444
t @ index.es6.js:180
onUpdateRequest @ mainareawidget.js:199
e.processMessage @ index.es6.js:1421
b @ index.es6.js:444
t @ index.es6.js:180
t._fit @ index.es6.js:5084
t.onFitRequest @ index.es6.js:5018
e.processParentMessage @ index.es6.js:2081
e.notifyLayout @ index.es6.js:1500
e.processMessage @ index.es6.js:1424
b @ index.es6.js:444
t @ index.es6.js:180
y @ index.es6.js:495
requestAnimationFrame (async)
_ @ index.es6.js:463
n @ index.es6.js:231
e.update @ index.es6.js:1281
set model @ vdom.js:97
w @ vdom.js:75
L @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
execute @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
e.execute @ index.es6.js:406
t @ index.js:931
execute @ index.js:859
e.execute @ index.es6.js:406
(anonymous) @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._onTabAddRequested @ index.es6.js:12420
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._evtMouseUp @ index.es6.js:9222
t.handleEvent @ index.es6.js:8931
41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach')
    at L.render (41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1:3493)
    at vdom.js:53:32
    at new Promise ()
    at L.renderDOM (vdom.js:52:16)
    at L.onUpdateRequest (vdom.js:30:35)
    at e.processMessage (index.es6.js:1421:22)
    at b (index.es6.js:444:21)
    at Object.t [as sendMessage] (index.es6.js:180:13)
    at je.onUpdateRequest (mainareawidget.js:199:13)
    at e.processMessage (index.es6.js:1421:22)
render @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
(anonymous) @ vdom.js:53
renderDOM @ vdom.js:52
onUpdateRequest @ vdom.js:30
e.processMessage @ index.es6.js:1421
b @ index.es6.js:444
t @ index.es6.js:180
onUpdateRequest @ mainareawidget.js:199
e.processMessage @ index.es6.js:1421
b @ index.es6.js:444
t @ index.es6.js:180
t._fit @ index.es6.js:5084
t.onFitRequest @ index.es6.js:5018
e.processParentMessage @ index.es6.js:2081
e.notifyLayout @ index.es6.js:1500
e.processMessage @ index.es6.js:1424
b @ index.es6.js:444
t @ index.es6.js:180
t._fit @ index.es6.js:5079
t.onFitRequest @ index.es6.js:5018
e.processParentMessage @ index.es6.js:2081
e.notifyLayout @ index.es6.js:1500
e.processMessage @ index.es6.js:1424
b @ index.es6.js:444
t @ index.es6.js:180
y @ index.es6.js:495
requestAnimationFrame (async)
_ @ index.es6.js:463
n @ index.es6.js:231
e.update @ index.es6.js:1281
set model @ vdom.js:97
w @ vdom.js:75
L @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
execute @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
e.execute @ index.es6.js:406
t @ index.js:931
execute @ index.js:859
e.execute @ index.es6.js:406
(anonymous) @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._onTabAddRequested @ index.es6.js:12420
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._evtMouseUp @ index.es6.js:9222
t.handleEvent @ index.es6.js:8931
41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'forEach')
    at L.render (41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1:3493)
    at vdom.js:53:32
    at new Promise ()
    at L.renderDOM (vdom.js:52:16)
    at L.onUpdateRequest (vdom.js:30:35)
    at e.processMessage (index.es6.js:1421:22)
    at b (index.es6.js:444:21)
    at Object.t [as sendMessage] (index.es6.js:180:13)
    at je.onUpdateRequest (mainareawidget.js:199:13)
    at e.processMessage (index.es6.js:1421:22)
render @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
(anonymous) @ vdom.js:53
renderDOM @ vdom.js:52
onUpdateRequest @ vdom.js:30
e.processMessage @ index.es6.js:1421
b @ index.es6.js:444
t @ index.es6.js:180
onUpdateRequest @ mainareawidget.js:199
e.processMessage @ index.es6.js:1421
b @ index.es6.js:444
t @ index.es6.js:180
y @ index.es6.js:495
requestAnimationFrame (async)
_ @ index.es6.js:463
n @ index.es6.js:231
e.update @ index.es6.js:1281
set model @ vdom.js:97
w @ vdom.js:75
L @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
execute @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
e.execute @ index.es6.js:406
t @ index.js:931
execute @ index.js:859
e.execute @ index.es6.js:406
(anonymous) @ 41.537ed9d24b3489875a6e.js?v=537ed9d24b3489875a6e:1
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._onTabAddRequested @ index.es6.js:12420
g @ index.es6.js:510
c @ index.es6.js:465
e.emit @ index.es6.js:121
t._evtMouseUp @ index.es6.js:9222
t.handleEvent @ index.es6.js:8931

Thank you for your time!

@jans-code jans-code added the bug Something isn't working label Apr 2, 2023
@fcollonval
Copy link
Member

Thanks @jans-code for reaching out. I think we are hit by German localization. Could you try quickly if using JupyterLab without the german translation solves the bug?

@jans-code
Copy link
Author

oh indeed @fcollonval the extension works fine with defaulting back to english.

@fcollonval
Copy link
Member

Would you be willing to open a PR to fix the bug? I can provide pointers.

@jans-code
Copy link
Author

i would be willing, those have to be good pointers though :)

@fcollonval
Copy link
Member

To fix this, we need to translate all constant categories in the code.

  1. The translator object is obtained in the view widget there:

this._trans = this.translator.load('jupyterlab');

  1. You need to wrap the following category names in this._trans.__(...) (e.g. this._trans.__('Notebook')):
    1. 'Other' line 286
    2. 'Notebook' line 294 and 296
    3. 'Console' line 298 and 300
    4. 'Other' line 386
    5. 'Kernels' line 410

@jans-code
Copy link
Author

Okay, I'll take a look at it later today and if any trouble comes up I will post here.

@jans-code
Copy link
Author

jans-code commented Apr 3, 2023

So I've played around with this, made the suggested changes and at least I did not break the extension, but when using german I still get the same error.

The trouble comes from the 'Console' category alone (for german local at least) and when I hardcode the german 'Konsole' in there it works.

So i guess there is something wrong with that translator object and it just falls back to that NullTranslator permanently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants