Tried to use SessionInfo before it was initialized

I have a sample piece of code. The code runs fine in localhost. Running the same code in a server behind a VPN creates an issue. When I access the URL in the browser http://<remote_ip>:8555, the browser dialog box displays the error message

Tried to use SessionInfo before it was initialized

Below is the screenshot of the error.

Below is the config.toml file in the ~/.streamlit/.

[browser]
gatherUsageStats = false
serverAddress = β€˜0.0.0.0’

[server]
enableCORS = false
[global]
logLevel = β€œdebug”

While accessing the URL, these are the messages server prints

Creating new context for ws <streamlit.server.Server._BrowserWebSocketHandler object at 0x2aab265ab890>
Watcher created for /home/kramaraju/snippets/streamlit_demo_v1.py
ReportSession initialized (id=5)
Server state: State.NO_BROWSERS_CONNECTED -> State.ONE_OR_MORE_BROWSERS_CONNECTED
Received the following back message:
update_widgets {
}

Beginning script thread
Running script RerunData(widget_state=)
OnScriptRunnerEvent: ScriptRunnerEvent.SCRIPT_STARTED
New browser connection: gather_usage_stats=False, sharing_enabled=False, max_cached_message_age=2
OnScriptRunnerEvent: ScriptRunnerEvent.SCRIPT_STOPPED_WITH_SUCCESS
OnScriptRunnerEvent: ScriptRunnerEvent.SHUTDOWN
Report finished successfully; removing expired entries from MessageCache (max_age=2)

Any idea, what am I missing here? I can’t access the URL without a VPN.

1 Like

update to 0.52.1 it should work (or downgrade to 0.51)

1 Like

Streamlit 0.52.2 (the latest as of today) should have this completely fixed.

Thank you both. Upgrading the streamlit from 0.52.0 to 0.52.2 fixed the issue.

1 Like

I’m still having the same issue even though we’ve upgraded to 0.59.0 and 0.60.0 - we are accessing behind a VPN, but localhost running works fine.