Problem
Newer versions of Workbench come bundled with Jupyter and VS Code. However, when upgrading Posit Workbench from an older version, Jupyter sessions may experience heartbeat issues due to conflicts between the Workbench-bundled Jupyter extensions and previously installed extensions. This can lead to network disconnections and warnings related to the heartbeat URL.
Root Cause
Jupyter is recognizing multiple versions of the workbench_jupyterlab extension.
Steps to reproduce
- Ensure the older, now deprecated
workbench_jupyterlab
extension is installed. - Upgrade Posit Workbench to a newer version.
- Start a JupyterLab session.
- Observe that two Posit logos appear in the upper left corner instead of one.
- Open the Network tab in the browser's developer tools.
- Wait for an error on the "heartbeat" URL or a "Disconnected from Workbench" error message.
Workaround
-
Identify the Jupyter Version
Check the Jupyter configuration file to determine the version of Jupyter running on your system:
cat /etc/rstudio/jupyter.conf
-
Log in as the Session User
Ensure you are logged in as the appropriate session user before making any changes.
-
Determine Jupyter Paths
Run the following command to see all paths used by Jupyter:
jupyter --paths
-
Locate the workbench_jupyterlab Folder
Look for the
workbench_jupyterlab
extension folder within the Jupyter lab extensions directory, typically found in:.../share/jupyter/labextensions
-
Uninstall the Extension
Attempt to remove the extension using the Jupyter labextension uninstall command:
jupyter labextension uninstall workbench_jupyterlab
If this command does not work, check the user's local directory and manually remove the folder from it:
rm -rf ~/.local/share/jupyter/labextensions/workbench_jupyterlab
-
Start the Jupyter Session
Start a new Jupyter Lab session to ensure the changes take effect.
Status
A bug report has been opened regarding this issue, but it has not yet been resolved.
Comments