Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login/Logout Button sometimes Reloads uncontrollably with opening App running in Kubernetes #14

Open
leoschmi opened this issue Sep 20, 2023 · 4 comments

Comments

@leoschmi
Copy link

Hey There!

First of all thanks for your work! It made it so much easier for me to implement the AAD authentication process into my App!
Now the problem i am facing is, that the Login/Logout button is sometimes bugging when opening the App. It appears and disappears a few times before it is displayed correctly and stable. I also ran the app without the Login and I am not facing the issue there so it is definitely a result of the Login. Do you have any idea why this could be ? I already increased the memory resources of the pod but that didn't help.

Thanks in advance !

@leoschmi
Copy link
Author

leoschmi commented Sep 21, 2023

For anybody facing the same issue, I found a solution/workaround.
For some reason, the custom component behaves as expected if placed inside a form.
I don't know why it behaves like this, but this fixed the issue.

Hope this helps !

@mstaal
Copy link
Owner

mstaal commented Sep 28, 2023

Hi @leoschmi : Thanks for your comment! Can you elaborate more on your issue and possible solution? I hope to be able to put in some more effort to improve it,

@leoschmi
Copy link
Author

Hey @mstaal,
Unfortunately I am clueless on why it behaves like that outside a form.
If the custom component is outside a form, the whole app refreshes multiple times in some situations like opening the app the first time or clicking buttons even when working with st.session_state. if it is placed inside a form everything behaves as expected. Unfortunately i can't share any Code as its confidential. Nonetheless i hope this helps.

@ameen7626
Copy link

Hey @mstaal, Unfortunately I am clueless on why it behaves like that outside a form. If the custom component is outside a form, the whole app refreshes multiple times in some situations like opening the app the first time or clicking buttons even when working with st.session_state. if it is placed inside a form everything behaves as expected. Unfortunately i can't share any Code as its confidential. Nonetheless i hope this helps.

Regarding the placement of the form, did you put the form within that custom component that is inside Authentication.tsx, can you please tell where exactly did you put the form is it inside the streamlit application where you use the custom component, using st.form or is it inside the custom component where the button is returned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants