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
Streamlit App showing up blank in Safari #8362
Comments
Hi @Odrec , I couldn't quite reproduce this with Safari 17.3.1. Looking at the linked issue, is this on mobile IOS or safari desktop too? |
Hello, thanks for the answer. Personally, I have only tried it on Desktop (Safari 16.6). But already 4 people with different Safari versions tried it and had the same issue where only the radio buttons for the language selection show up, I think one of them tried it on cellphone too. I'm currently installing the latest Safari version on the Mac I have here to try it. The only error I see on the console says: "Error while parsing the 'sandbox' attribute: 'allow-downloads' is an invalid sandbox flag." |
Now I'm really puzzled, I tried with the latest Safari Desktop (17.4.1) and it's still the same result, only the language radio buttons appear. Only you have reported that it isn't happening with Safari. Can someone else try to access it with Safari and report? |
Hm actually, I retried and I am only seeing the radio buttons. What streamlit version is this using? Is this 1.32.2? |
It seems like you're embedding an app right? How does this streamlit app work? |
We are using the latest version from streamlit yes. The app is a chatbot app done completely in streamlit using some community components. The entry point is the start.py script which is the one that should load when you click on the link but that shows up mostly blank only in Safari. This is only the Welcoming page where the user enters the university credentials to access the chat app. In this script we initialize language because we use the gettext library for multilanguage support, then we use a cookie manager component for streamlit to manage very basic access cookies. We also have a component to manage the LDAP authentication with the University credentials and that's basically it. Thanks for the help! |
I suspect the problem is related to the cookies manager. Although I tried making the Safari settings for cookies as loose as possible (I deactivated all tracking restrictions) and it still didn't fix the issue but maybe there's something fundamentally different on how Safari is managing cookies? |
It seems like regular streamlit with safari works. Should a bug should be filed with the cookies manager widget repo? |
I'll report back if I'm sure it's the cookies thing. Problem is that the package has been 3 years with no dev but it's the most functional cookies package I've found for streamlit. |
same here. |
@Odrec , @willhuang1997 could be relevant to this: #8387 |
Oh ok, this could actually be it. While trying to figure this out, we noticed there was something going on that seemed related to the components API and there was some weird race condition with the cookies component that is causing this issue for us in Safari but we gave up because we couldn't pinpoint what it was. I'll try it next week and report back. Thanks! |
Hey @Odrec ! We've spent some more time looking this. You seem on the right track with the cookies race condition, but we do not see any special logs in Safari indicating a problem. Let us know if you get more information and perhaps a small repro example. |
Hello @kmcgrady, thanks for the help! Here is a minimal reproducible example:
It's currently running here If you want to test it yourself, install the patched version of the cookies manager to avoid the warning message:
|
Hey @Odrec I think I found the problem and created a PR. I've included a zip of a wheel file if you could test to verify this works for you. It seems to work in my tests. It seems like the race condition is tied to not knowing the component is ready by the time we receive the value. We end up dropping the message. streamlit-1.32.2-py2.py3-none-any.whl.zip GitHub does not support Wheel extension so this is a zip file of a wheel. You'll need to unzip then install manually. |
## Describe your changes From our issue, it seems that there's a race condition between our component being ready and our component sending us values. I believe this is a result of the fact that the event handler is not receiving the latest "ready state" by the time it receives the value. This change makes the ready state dynamic. ## GitHub Issue Link (if applicable) Closes #8362 ## Testing Plan I think this would be difficult to test outside of manual testing. We could perhaps construct some large-scale unit test that simulates the race condition reliably, but I imagine the effort is not worth the benefit here (especially since this seems to impact Safari). We can supply a wheel file to developers to try out and confirm. --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
Merged the change cause from our side it works. It will be in |
Unfortunately, it doesn't seem to work. We tried it with streamlit-nightly and it didn't work for us. Same result where the whole page doesn't load. |
@Odrec , did this not work with the wheel file in my previous comment? We spent time trying to reproduce with the fix and didn't notice any bad behavior. |
Ok, it didn't work with the nightly version but we finally tested with the wheel in the deployed version and it works! Thanks a lot! |
Awesome! Glad to hear! This will be in the next release! 😊 |
Using that provided whl also, im still not able to access my website either on iphone - chrome/safari or Mac - Safari in my website im using the (Option 2) i also cannot access on Safari or on iPhone (using any browser), https://ki.uos.de |
We are not using the wheel on our release version of the app so it won't work yet. We are waiting for the next release version of streamlit to include the changes. Our issue was with Safari but all other browsers worked fine |
but I hosted my app using that wheel provided in comment on github, still it is not loading in Safari and in Iphone on any browser. |
Maybe it's a different issue then because it solved ours. |
hi, I'm still experiencing this same issue on Streamlit 1.33.0, using the package streamlit-cookies-manager-hotpatched too for the cookies management. nothing shows up on Safari (mac) and all iOS browsers. is the fix only implemented on that wheel? |
Not yet, the fix will be in the next release version of streamlit. If you use the wheel it should work |
ok, thanks! right now I will use Streamlit 1.31.0 as I tried just now and it doesn't have the bug on Safari Mac and iOS browsers. the pages displayed without any issue with the cookies manager (though it seems cookies are not saved correctly in the browser, but this might be another different issue). will wait for the next release! |
Since the downgrade Streamlit 1.31.0, the issue has been resolved in version safari 15, but the issue persists in version 14. |
Checklist
Summary
This app shows up blank in Safari but works in other browsers: ki.uos.de
Here is the code
The Safari versions we have tested: 16.5.1, 17.2.1
with the latest version of streamlit
There was a similar issue previously but it's closed so I opened this new since it appears it's a persistent problem with some users. We tested some other apps in the same browsers and they worked so it's not for every Streamlit app apparently.
Reproducible Code Example
No response
Steps To Reproduce
No response
Expected Behavior
No response
Current Behavior
No response
Is this a regression?
Debug info
Additional Information
No response
The text was updated successfully, but these errors were encountered: