Error when trying to connect to kernel

I am running jupyter lab on a remote server (Ubuntu 20.04.5 LTS) and connecting to the server with a local computer. I have two local computers that I use to connect to the server.

  • iMac 2019 i7 running Sonoma 14.3
  • MacBook Air M1 running Sonoma 14.2.1
    (both using Google Chrome)

When I try to connect to the server with the iMac, jupyter lab tries to connect to a kernel and gets stuck in a loop, repeatedly printing this to the command line:

[I 2024-02-14 19:26:10.485 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:10.487 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:10.551 ServerApp] Starting buffering for bb6dafc7-0ad2-4b25-802b-34965fb7b01e:d360313f-0139-4611-ac1b-73ed5742b6ed
[I 2024-02-14 19:26:10.679 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:10.744 ServerApp] Starting buffering for bb6dafc7-0ad2-4b25-802b-34965fb7b01e:4bc39511-6dba-451d-b99c-f0c428c671a2
[I 2024-02-14 19:26:10.817 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:10.881 ServerApp] Starting buffering for bb6dafc7-0ad2-4b25-802b-34965fb7b01e:d360313f-0139-4611-ac1b-73ed5742b6ed
[I 2024-02-14 19:26:10.956 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:11.021 ServerApp] Starting buffering for bb6dafc7-0ad2-4b25-802b-34965fb7b01e:4bc39511-6dba-451d-b99c-f0c428c671a2
[I 2024-02-14 19:26:11.095 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:11.159 ServerApp] Starting buffering for bb6dafc7-0ad2-4b25-802b-34965fb7b01e:d360313f-0139-4611-ac1b-73ed5742b6ed
[I 2024-02-14 19:26:11.233 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:11.297 ServerApp] Starting buffering for bb6dafc7-0ad2-4b25-802b-34965fb7b01e:4bc39511-6dba-451d-b99c-f0c428c671a2
[I 2024-02-14 19:26:11.371 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:11.435 ServerApp] Starting buffering for bb6dafc7-0ad2-4b25-802b-34965fb7b01e:d360313f-0139-4611-ac1b-73ed5742b6ed
[I 2024-02-14 19:26:11.509 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
[I 2024-02-14 19:26:11.574 ServerApp] Starting buffering for bb6dafc7-0ad2-4b25-802b-34965fb7b01e:4bc39511-6dba-451d-b99c-f0c428c671a2
[I 2024-02-14 19:26:11.649 ServerApp] Connecting to kernel bb6dafc7-0ad2-4b25-802b-34965fb7b01e.
...

On the web page, I get an error pop up that says Error Starting Kernel: missing id.
When I try to connect with the MacBook air, it works correctly.

I have tried a fresh install of python/jupyter/etc, deleting the .jupyter/lab/workspaces directory, clearing browser cache, using different browsers, with no luck.

Package Versions:

  • python : 3.12.1
  • jupyterlab 4.1.1
  • ipykernel 6.29.2
  • ipython 8.21.0

Any ideas what might be causing this?