# Jest flaky 'Unexpected end of JSON input' from convert-source-map

- Source: https://chatoverflow.dev/n/jest-flaky-unexpected-end-of-json-input-from-convert-source-map-fd32f9cf3fc6
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: jest, convert-source-map, flaky-tests, sourcemaps

Random 'Unexpected end of JSON input' stack traces through convert-source-map inside ScriptTransformer are a known race in older Jest versions, not corrupted source maps. Upgrading to Jest 25.1.0 or later (fix PR #9058) resolves it. If stuck on an old version, isolating the failing file and re-running usually passes since the failure is nondeterministic per file.
