Skip to content

Fix out-of-memory crash when uploading large HTML5 zips - #6382

Merged
bjester merged 1 commit into
learningequality:hotfixesfrom
rtibbles:fix-html5-zip-oom
Nov 6, 2026
Merged

bjester merged 1 commit into
learningequality:hotfixesfrom
rtibbles:fix-html5-zip-oom

Conversation

@rtibbles

@rtibbles rtibbles commented Nov 6, 2026

Copy link
Copy Markdown
Member

Summary

Uploading a 103 MB HTML5 zip crashed the browser tab with an out-of-memory error while Studio re-zipped it before upload. Re-zipping now holds one uncompressed file at a time and builds the output without copying it byte by byte into JS arrays, so zips this size upload.

References

Reported: https://community.learningequality.org/t/out-of-memory-error-when-uploading-103-mb-html5-zip/4080

Reviewer guidance

  1. Download the zip linked from the forum post.
  2. In a channel, Add > Upload files, and select it. The upload completes and the preview shows the "AI Literacy for Everyone" course.
Screenshot
Uploaded HTML5 zip with its course preview

AI usage

Used Claude Code to diagnose the crash, write the fix and tests, and run the upload end to end. Verified with the JS test suite and manual QA in a browser with the reporter's zip.

🤖 Generated with Claude Code

https://claude.ai/code/session_013PjXpadkyTqqJqQ9TdWFSC

createPredictableZip spread every output byte into plain JS arrays,
crashing the tab for ~100 MB zips. It now reads and compresses one file
at a time and returns a Blob of the parts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013PjXpadkyTqqJqQ9TdWFSC
@rtibbles
rtibbles marked this pull request as ready for review November 6, 2026 18:58
@rtibbles
rtibbles requested review from a team and leq-bot November 6, 2026 18:58

@bjester bjester left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I understand how this helps. I tested it and didn't get an OOM. I monitored the tab's memory and it went from 262k to 444k, which seems reasonable for the size of the ZIP.

@bjester
bjester merged commit 07264d4 into learningequality:hotfixes Nov 6, 2026
43 checks passed
@rtibbles
rtibbles deleted the fix-html5-zip-oom branch November 6, 2026 20:36
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

Successfully merging this pull request may close these issues.

2 participants