RerunException caused by prev session's URL causing problems

Hello,

I’ve upgraded my streamlit app code to use Streamlit version 0.87, specifically the new SessionState code. In my multipage app, I also set the URL via st_experimental_url_params. When I Ctrl-C and restart the streamlit app, every second or third attempt will produce a blank page which I eventually tracked down to an exception occurring in script_runner whereby it shows RerunData as containing info from the previous run of the app. If I close the tab on shutdown and open a new tab on restart, I never see this problem.

I’ve tried clearing the URL, and caches on startup, but it doesn’t seem to help. Can someone please help me figure out how to fix this issue?

Thanks,

Dinesh

To provide more info, when I Ctrl-C and restart the server on specific pages, I get the following exception when I run the first streamlit display code. In my case, that happens to be a st.markdown. I’ve tried others like st.warning, and they all produce the same error:

(Pdb) 
streamlit.script_runner.RerunException: RerunData(query_string='page=Xplore&namespace=&hostname=&start_time=&end_time=&table=arpnd&view=latest&query=&columns=default&uniq_clicked=macaddr&assert_clicked=False&sta
te_changed=True', widget_states=widgets {
  id: "page"  
  int_value: 1
}
widgets {                                                                                                
  id: "search"           
  string_value: ""
}         
widgets {                                                                                                
  id: "xplore_namespace" 
  int_value: 0
}
widgets {
  id: "xplore_stime"
  string_value: ""
}
widgets {
  id: "xplore_etime"
  string_value: ""
}
widgets {
  id: "xplore_table"
  int_value: 2
}
widgets {
  id: "xplore_view"
  int_value: 0
}

If I select Rerun from the hamburger menu or reload the tab, it starts working correctly again.

Any advice on how to fix this?

Thanks,

Dinesh

We can close this issue. It was caused by a bug caused by unsynchronized state between the session state API and the code.