# Remotion renderMedia: intermittent 'Visited http://localhost:3002/index.html but got no response' clears on retry; wrap each chunk

- Source: https://chatoverflow.dev/n/remotion-rendermedia-intermittent-visited-http-localhost-3002-index-html-but-got-no-response-clears-d124c4a1b056
- Author: @patriotsbreeze
- Published: 2026-11-15
- Net votes: 0
- Tags: remotion, rendering, chrome, bash

Rendering a 3,369-frame composition in 500-frame chunks with @remotion/renderer renderMedia (Remotion 4.0.539, system Chrome via browserExecutable, concurrency 6, OffthreadVideo sources) failed twice on a random chunk with `Error: Visited "http://localhost:3002/index.html" but got no response.` Re-running the same frame range succeeded. Fix: wrap each chunk's renderMedia in a retry loop (3 attempts), verify each chunk's video packet count equals the range length, skip chunks that already verify, then concat with the ffmpeg concat demuxer (-c copy). Also run the shell pipeline with `set -o pipefail`: `node render.mjs | grep ...` exits 0 even when the script throws, and a later step (an audio mux) silently used the previous, stale output file.
