Pyviz jupyterlab extension prevents panels to show when served inside a notebook via `app()`

The pyviz jupyterlab extension seem to prevent displaying panels via .app() inside both JupyterLab and the classic notebook. To reproduce, create a new conda environment and install the following:

conda install -c pyviz panel
conda install -c conda-forge jupyterlab
jupyter labextension install @pyviz/jupyterlab_pyviz

Then I tried running:

import panel as pn
pn.extension()
im1 = 'https://upload.wikimedia.org/wikipedia/commons/3/39/PNG_demo_heatmap_Banana.png'
pn.panel(im1)

which shows up fine. However, trying to show the server inside the notebook via .app() does not work:

pn.panel(im1).app('localhost:8888')

The output is just <bokeh.server.server.Server at 0x7fcd45f3e0d0>, but the panel does not display.

When I create another conda environment and don’t install the pyviz jupyterlab extension, the bokeh server shows as expected inside the notebook. Is the pyviz extension not needed anymore and can I safely run jupyterlab without it, or might I run into unexpected problems?

I tried in Firefox and without extension in Chromium. Package versions in both environments:

-----
bokeh       2.0.1
panel       0.9.5
-----
IPython             7.14.0
jupyter_client      6.1.2
jupyter_core        4.6.3
jupyterlab          2.1.3
notebook            6.0.3
-----
Python 3.8.2 | packaged by conda-forge | (default, Apr 24 2020, 08:20:52) [GCC 7.3.0]
Linux-5.6.13-arch1-1-x86_64-with-glibc2.10
4 logical CPU cores
-----
Session information updated at 2020-05-23 11:17

(I’m trying this as a workaround for How can I replace part of a panel via a selection change in a Bokeh figure? so any input there is appreciated as well)

I’ll have to look into this, at a first glance this seems like a regression in the JupyterLab extension.

Thanks @philippjfr, let me know if you want me to open a GH issue to track it or if this thread is enough.

A GitHub issue on the pyviz_comms repo would be good.

:+1: Opened https://github.com/holoviz/pyviz_comms/issues/58