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

Documentation page is blank #11693

Closed
1 of 2 tasks
agjohnson opened this issue Oct 16, 2024 · 12 comments · Fixed by readthedocs/common#227
Closed
1 of 2 tasks

Documentation page is blank #11693

agjohnson opened this issue Oct 16, 2024 · 12 comments · Fixed by readthedocs/common#227
Assignees
Labels
Accepted Accepted issue on our roadmap Bug A bug

Comments

@agjohnson
Copy link
Contributor

agjohnson commented Oct 16, 2024

This is an issue that we are tracking and working on a fix for. I wanted to give an issue that is publicly tracked, as so far most of our discussion on this bug has been on internal issues.

Problem

Some documentation pages appear blank, starting last week on Oct 8th. These pages are usually large pages or ipynb notebooks that output images inline, and so have a large page response.

The technical issue is that our response transformation that we use in our workers is not correctly handling the large response, emitting an exception, and then returning no content.

Fixes

There are two fixes, we're working to get at least something out shortly:

Update: We'll be rolling out the new worker with the first fix shortly, we're testing it at the moment.

@agjohnson agjohnson added Bug A bug Accepted Accepted issue on our roadmap labels Oct 16, 2024
@github-project-automation github-project-automation bot moved this to Planned in 📍Roadmap Oct 16, 2024
@sammlapp
Copy link

Temporarily, if you are hitting this error you can either disable Addons for your project or try to reduce the response size for the page. If you are using a notebook, you could try to output image as files instead of using inline data in the HTML for the images.

Thank you for providing a workaround. For those using nbsphinx to generate notebooks, is there a setting that would use image files rather than inline HTML for images in notebook cell outputs?

@sammlapp
Copy link

Disabling add-ons and rebuilding did not resolve the issue for me

@agjohnson
Copy link
Contributor Author

Hrm, this is a little confusing as disabling should avoid the injection logic, but I might be missing something here. Thanks for the update either way, it's good to know that works.

For those using nbsphinx to generate notebooks, is there a setting that would use image files rather than inline HTML for images in notebook cell outputs?

I would be surprised if there wasn't an option for this, but I don't frequently use notebooks or nbsphinx. Maybe someone with more experience has an easy answer here though.

@sammlapp
Copy link

sammlapp commented Oct 17, 2024

Hrm, this is a little confusing as disabling should avoid the injection logic, but I might be missing something here. Thanks for the update either way, it's good to know that works.

To be more specific, the option to totally disable all Addons is greyed out / unclickable for my project. I instead unchecked all of the individual checkboxes for each Addon, then re-built, and got the same blank page behavior.

@agjohnson
Copy link
Contributor Author

I am currently testing out some fixes to our injection, including a temporary fix for this bug. If you are hitting this and would like to test, note your project URL/name and I'll add it to the test worker.

@AhmetNSimsek
Copy link

I am currently testing out some fixes to our injection, including a temporary fix for this bug. If you are hitting this and would like to test, note your project URL/name and I'll add it to the test worker.

Thanks @agjohnson! Could you please add siibra-python?

@sammlapp
Copy link

I am currently testing out some fixes to our injection, including a temporary fix for this bug. If you are hitting this and would like to test, note your project URL/name and I'll add it to the test worker.

https://readthedocs.org/projects/opensoundscape/ in particular this particular page:
https://opensoundscape.org/en/latest/tutorials/audio.html

@agjohnson
Copy link
Contributor Author

agjohnson commented Oct 24, 2024

@AhmetNSimsek @sammlapp Added!

I have a little more background on what is actually happening here and I'm a bit surprised.

So, this is not just large responses that are triggering this. I can generate a 10MB file from /dev/random and it send through the worker fine.

But if I take one of the pages here at is triggering this and try to serve that even through a basic worker I do get a memory limit error, right on the line that a big inline data: URL is included on. I even get a segfault in vim on this line. If I send the same file as text/plain, the error goes away again.

I tried this on a basic in/out worker (no manipulation, just stream the response), and a streaming API worker.

So, it seems to me like the worker is implicitly processing the inline data URL during streaming of HTML files, which is news to me.

I've opened cloudflare/workerd#2998

@sammlapp
Copy link

Interesting, thanks for looking into this. From my perspective (I maintain a package and documentation, which includes notebook tutorials), figuring out how to have the notebooks build to HTML in a way that uses image files rather than in-line images seems like a reasonable approach. However, I haven't found any documentation of nbsphinx that suggests this is possible/currently supported.

@AhmetNSimsek
Copy link

AhmetNSimsek commented Oct 25, 2024

Thank you @agjohnson for investigating it.
@sammlapp , we use sphinx-gallery for creating tutorials and have the same issue. If I find a workaround, I'll share it here.

@github-project-automation github-project-automation bot moved this from Needs review to Done in 📍Roadmap Oct 29, 2024
@sammlapp
Copy link

Thanks for working on this. Would we expect a fresh build of documentation to work now, only once there is a new readthedocs release including the merged PR?

@agjohnson
Copy link
Contributor Author

So I just got done deploy the final changes and every project should at least now avoid an exception. There is still some debugging that needs to happen to determine what is happening with the data urls, and getting an actual fix there. But at least for now, without rebuilding or other intervention, all project pages should load -- albeit without any addons injected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Accepted issue on our roadmap Bug A bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants