Skip to content

Kernel output extension: Error: Session has no kernel when panel is not yet created #278

@cmarmo

Description

@cmarmo

Description

It is my understanding that the command execute in the kernel output extension should open a new kernel output panel if it is not there yet:
https://github.com/jupyterlab/extension-examples/blob/203393a2172599c27988c0e23b9a107b8cf9f9c5/kernel-output/src/index.ts#L83-85

Unfortunately, the command execution crashes with

Error: Session has no kernel.

Reproduce

  1. Open a notebook
  2. Execute the cells
  3. Click on "Kernel Output" then "Contact Kernel and Execute code"
  4. Enter the command, then click on "Execute"

The panel is not open and the error is thrown in the development console

Image

Screencast.From.2025-01-31.18-19-10.mp4

My impression is that the createPanel promise is not fulfilled when the extension tries to execute the command.
I have tried some solutions on my side but I'm not very good with promises.... 😅

Expected behavior

If my understanding of the code is correct, the panel should be created and the output displayed.

Context

  • Operating System and version: Linux Fedora 41
  • Browser and version: Firefox 134.0.1
  • JupyterLab version: Version 4.3.5 installed in a mamba environment
  • Kernel output extension: current version on main

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions