Streamlit 1.21.0 Gobal AssertionErrors issues? (impact on apps performance)


Hi there, I have noticed that The Dungeon recently slowed quite a bit. As I did not change code recently I had a feeling that something must have changed in streamlit itself. In the app managment I found strange Assertion Errors. The problem vanished after playing around with requirements regarding streamlit version.

The same thing happend to the StreamlitLand Adventure - the problem vanished after rebooting the app.

At the moment I can see that assertion errors are visible on my other apps like (I do not reboot it for sake of investigation).

Please let me know if you are noticing assertion errors as well on your apps!

The Dungeon Github

AssertionError: session with id '50a2b59a-1914-474d-bef5-e464d927bbf3' is already connected!

2023-04-12 21:32:21.019 Uncaught exception GET /_stcore/stream (

HTTPServerRequest(protocol='http', host='', method='GET', uri='/_stcore/stream', version='HTTP/1.1', remote_ip='')

Traceback (most recent call last):

  File "/home/appuser/venv/lib/python3.9/site-packages/tornado/", line 942, in _accept_connection

    open_result =*handler.open_args, **handler.open_kwargs)

  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/web/server/", line 123, in open

    self._session_id = self._runtime.connect_session(

  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/", line 361, in connect_session

    session_id = self._session_mgr.connect_session(

  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/", line 65, in connect_session

    assert (

@TomJohn Did you get to the bottom of this?

I don’t think it’s Streamlit 1.21.0 related. I have been seeing similar things with GPT Lab (and I have not upgraded to 1.21.0 yet).

1 Like

Hi @dclin unfortunatelly no. As far as i can see assertion issues still persist in . Reboot would probably help, however I am keeping it like that for Streamlit’s team. Please try to reboot your app and let me know if issue persits.

It’s still there (tho, much better) after I rebooted the app.

I am closing down the tread. Info for anyone impacted: in my case apps reboot made them working without issues.