Open wyzdic opened 7 months ago
Additional note: I use edge and have tried multiple versions with the same issue
I am facing the same issue. I have noticed that when I save the file with runOnSave=true, the page will dynamically rerun and then the menu will appear. I am guessing there is something with fragment rerun, but the way the authenticator uses the sidebar generates an error with st.sidebar.
Indeed, I just added this code after the menu creation and now the menu shows. I haven't fully tested everything yet but the menu is there.
menuSelection = sac.menu(menuMain, open_all=True)
if ("shouldRerun" not in st.session_state):
st.session_state["shouldRerun"] = False
st.rerun()
After testing, it was found that the problem was caused by extra_streamlit_components component. If you are also using Streamlit-Authenticator and streamlit==1.37, you can use the following code to fix it Modify Streamlit_Authenticator/models/cookie_model.py Comment: # self.token = self.cookie_manager.get(self.cookie_name) Modified to (streamlit==1.37) if st.context.cookies.get("stauth_cookie"): self.token = st.context.cookies["stauth_cookie"]
I'm using Streamlit-Authenticator at the same time, sac.menu doesn't show up after logging in, it's the same effect when I refresh the browser, if I click R to refresh the page to show up, I downgrade streamlit to 1.32 everything works fine, I've tried 1.32.1/1.32.2/1.33 all the same problem