This repository reproduces both the original "FormData missing final boundary" error AND the framework integration issues reported in GitHub issue #2644.
GitHub Issue: oven-sh/bun#2644
✅ REPRODUCED - The exact error from the GitHub issue:
FormData parse error missing final boundary
Triggers: Malformed FormData with:
- Missing final
--boundary--
marker - Truncated boundary strings
- Empty body with boundary header
- Mismatched boundaries (header vs body)
When using Hono v4.9.4, a different but related error occurs:
TypeError: undefined is not a function (near '...entry of iterable...')
at fromEntries (native:7:20)
Based on GitHub issue comments:
- Hono ✅ (confirmed in this reproduction)
- Astro
- SvelteKit
- SolidStart
- Qwik
bun create-malformed-boundary.js
Expected: Multiple "FormData parse error missing final boundary" errors
- Install dependencies:
bun install
- Start Hono server:
bun run server
- Run test:
bun run test
Expected: 100% failure rate with iterator errors
The issue appears to be that FormData.entries()
returns an invalid iterator when accessed through framework request wrappers, while working correctly in vanilla Bun servers.
create-malformed-boundary.js
- ✅ Reproduces original "missing final boundary" errorreproduce-2644-hono.js
- Hono framework integration issues
test-aggressive-2644.js
- Concurrent FormData test clientreproduce-2644-original.js
- Original issue reproduction attemptreproduce-2644-cloning.js
- Request cloning/wrapping testsreproduce-2644-boundary.js
- Boundary-focused teststest-client-2644.js
- Basic FormData tests
This reproduction confirms that FormData parsing is completely broken when using popular JavaScript frameworks with Bun, making it unusable for real-world applications that rely on form submissions.