Skip to content

fix: load the sample dataset via arrayBuffer under storage pressure - #32

Merged
arminpasalic merged 2 commits into
mainfrom
fix/sample-load-storage-pressure
Oct 24, 2026
Merged

arminpasalic merged 2 commits into
mainfrom
fix/sample-load-storage-pressure

Conversation

@arminpasalic

Copy link
Copy Markdown
Owner

Bug: with large models cached, Load sample fails with TypeError: Failed to fetch. The fetch itself succeeds (HTTP 200, and the existing retry loop never triggers), but response.blob() throws, presumably because Chromium backs a large fetched blob with disk and the storage quota is already used up.

Repro (Brave): cache Gemma 4 E2B + Llama 3.2 3B + embeddings (5.12 GB used, 2.1 GB reported quota), then click Load sample. It failed six times in a row. On the same response, response.arrayBuffer() succeeds and new File([buffer]) parses all 506 documents.

Fix: read the body with arrayBuffer() and build the File from it. This was the only fetched-blob read in the app.

Verification

  • npm run check passes
  • In the same Brave profile, the fixed build loads the sample through the real button, and a question then gets a correct answer

This will come up more now that the default model is 2.84 GB.

response.blob() fails with "TypeError: Failed to fetch" once cached
models have filled the origin's storage quota, because Chromium may back
a large fetched blob with disk. Reading the body into an ArrayBuffer
works in the same state. Reproduced in Brave with Gemma 4 E2B,
Llama 3.2 3B and the embeddings model cached (5.12 GB used).
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
vectoria Ready Ready Preview Oct 24, 2026 2:47pm UTC

…ge-pressure

# Conflicts:
#	web_interface/index.html
#	web_interface/sw.js
@arminpasalic
arminpasalic merged commit 44e6f57 into main Oct 24, 2026
7 checks passed
@arminpasalic
arminpasalic deleted the fix/sample-load-storage-pressure branch October 24, 2026 14:48

This branch was successfully deployed

1 active deployment
Preview — d1cf6961 Deployed Oct 24, 2026 by vercel[bot]
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.

1 participant