-
Notifications
You must be signed in to change notification settings - Fork 14
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
search results page occasionally dumps escaped HTML for part of the page #89
Comments
I just encountered this bug myself via organic use. My browser environment: Chromium on Debian Linux (x86_64), not incognito mode, language preference is English. The query I first encountered this on was https://scholar.archive.org/search?q=%22west+roxbury%22. I refreshed in a new tab once and got the same thing (escaped HTML). Refreshed again a minute later and got non-escaped text, so this seems to be an intermittent issue. I did a view source and see similar things to what Isa posted above. I tried a Three debugging thoughts so far:
To synthesize the later two, perhaps I did a git checkout on the server, but didn't update the FastAPI process, so some processes/threads have out of sync template or translation files? The uptime of the main The currently deployed git commit is:
That doesn't seem to be it. I'm going to restart the process, and possibly the entire VM (failover to replica for a couple minutes) and try to reproduce. |
I redeployed and no change. As of today this problem seems to be happening even more frequently. I was able to reproduce with |
After deploying some small translation updates this morning, I am no longer able to reproduce the problem. I suspect that the issue is related to our translation (i18n) infrastructure and jinja2 HTML template integration. We do some special hack to make this work with our async web framework (FastAPI) on a per-request basis, incorporating path prefixes and Without being able to reliably reproduce this right now (in any of dev, qa, or prod environments), and the issue being intermittent even when it can be reproduced, I think unfortunately this is going to have to sit on the back-burner until it crops up again. 😞 |
The above example reproduces quite reliable (seeing raw html in about 50% of the cases while reloading in firefox 97.0, linux). |
This issue has come and gone over the past couple months. Will prioritize getting a reproducible example of this bug and getting it fixed. |
I pushed some changes to production just now which I hope have resolved this issue. There is a small impact on latency, which is unfortunate. A few notes on the issue:
This debugging process took multiple entire days. I'm pretty inclined to ditch fastapi and refactor the web service to use Flask instead. |
Repro steps:
open safari incognito window, go to: scholar.archive.org
search "Beyonce"
search results appear as HTML string
on page refresh, elements are no longer strings, styles are properly applied.
Image of side-by-side results page w/ string HTML & its element via inspector:
side-by-side inspector/view diff of sidebar w/ html string:
The text was updated successfully, but these errors were encountered: