Comm_manager.register_target not always triggered

I am working on install jupyterlab-sparkmonitor for our jupyterhub. However, I found the behavior is not very consistent. Sometimes it works just fine, but sometimes it failed. After taking a deeper look, I found that when it failed, even though we did do

ipython.kernel.comm_manager.register_target('SparkMonitor', targetFunc)

but the targetFunc never actually being triggered!
The code is available here: jupyterlab-sparkmonitor/ at 25fc1338f10563b3fbd2598be84c2600cea479a7 · lydian/jupyterlab-sparkmonitor · GitHub

I’ve double checked that load_ipython_extension and register_comm is successfully called with the right parameter. But everything stopped there, the targetFunc never being triggered. I am wondering if there’s anything we can do to fix this issue? Thanks in advance if someone could point me any direction. Thanks!