#9919 Wrangler local dev crashes when processing logged errors
Bug reproduces with wrangler 4.60.0. Sourcemap processing crashes on truncated stack traces in stderr. Maintainer acknowledged with potential fixes discussed.
Keep open for fix - maintainer engaged with clear solution paths.
Analysis Report
Issue Review: cloudflare/workers-sdk#9919
Summary
Wrangler crashes when processing truncated/incomplete stack traces in worker stderr due to sourcemap processing expecting complete line:column format.
Findings
- Created: 2025-07-10
- Updated: 2025-07-14
- Version: 4.20.0 → 4.60.0 (current)
- Component: wrangler (sourcemap support in dev mode)
- Labels: bug
- Comments: 4 (includes maintainer acknowledgment)
Key Evidence
- Reproduction confirmed: Bug reproduces with latest wrangler 4.60.0 using reporter's reproduction code
- Error:
columnmust be greater than or equal to 0 (columns start at column 0) - Root cause:
getSourceMappedStringfunction doesn't handle truncated stack traces where the line:column format is incomplete - Maintainer response: @petebacondarwin acknowledged the issue (2025-07-14) and discussed potential fixes:
- Debouncing chunk handling (problematic - may combine multiple exceptions)
- Catching the error and dumping raw chunk (simple fix)
- Reporter suggested: Buffering partial chunks until complete CALL_SITE_REGEXP match is found
- No fix merged: No PRs reference this issue, not mentioned in changelog
Recommendation
Status: KEEP OPEN
Reasoning: This is a confirmed, reproducible bug that affects wrangler's local development experience. The issue has recent maintainer engagement with discussion of potential solutions. The bug causes wrangler to crash completely when workers produce certain patterns of stderr output, which can happen randomly based on Node's internal chunking.
Action: Keep open for fix. The maintainer has acknowledged the issue and discussed approaches. A fix implementing one of the discussed solutions (catching the error or buffering chunks) would resolve this.
Notes & Feedback (0)
No notes yet.