FYI: ad blocker blocking streamlit generated UI elements
See original GitHub issueSummary
At least one widely distributed ad blocker filtering list is stripping streamlit buttons out of web pages.
Note: I don’t think this is a bug in streamlit, but it does affect people who use streamlit, and maybe there’s something that you can do to prevent it from happening. Either way you should know. See: https://github.com/yourduskquibbles/webannoyances/issues/301
Steps to reproduce
Code snippet:
Using
st.button("Any button label")
in Safari with AdGuard with the “Web Annoyances Ultralist” filter. Possibly other ad blockers that use the same filtering will have the same effect.
This is testable on https://share.streamlit.io/arielcedola/kmeans/main/kmeans_app.py
Expected behavior:
Should always show a button. Compare this with actual.
Actual behavior:
Does not show a button because the button is blocked.
Debug info
- Streamlit version: 0.82.0
- Python version: Python 3.9.5
- Using Conda? PipEnv? PyEnv? Pex? No
- OS version: macOS 10.15.7
- Browser version: Safari 14.0.3 (15610.4.3.1.7, 15610)
Additional information
AdGuard for Safari with Web Annoyances Ultralist enabled
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top GitHub Comments
Hey, thanks for the additional feedback here.
After talking it over with the product team, we decided to not adjust the CSS naming. We believed that this is not a widespread issue, and the webannoyances filter has a challenge and responsibility of selecting elements correctly and cannot satisfy every website (Streamlit apps in this case). It is possible to fork the webannoyances list, remove the filter, and either create a PR or use the fork, as necessary.
I know it’s unfair to suggest that streamlit engage in cat-and-mouse with arbitrary filters on the web, but maybe streamlit might avoid using .stButton because of this?