remotion-dev/remotion · error · Error
#EXT-X-ALLOW-CACHE directive must have a value
Error message
#EXT-X-ALLOW-CACHE directive must have a value
What it means
Thrown by parseM3uDirective() at parse-directive.ts:120 when a line matches #EXT-X-ALLOW-CACHE but has no value. This directive was deprecated in HLS protocol version 7 (RFC 8216 appendix D) but the parser still handles it for backward compatibility. The value must be YES or NO.
Source
Thrown at packages/media-parser/src/containers/m3u/parse-directive.ts:120
if (directive === '#EXT-X-STREAM-INF') {
if (!value) {
throw new Error('EXT-X-STREAM-INF directive must have a value');
}
const res = parseStreamInf(value);
return res;
}
if (directive === '#EXT-X-I-FRAME-STREAM-INF') {
return {
type: 'm3u-i-frame-stream-info',
};
}
if (directive === '#EXT-X-ALLOW-CACHE') {
if (!value) {
throw new Error('#EXT-X-ALLOW-CACHE directive must have a value');
}
return {
type: 'm3u-allow-cache',
allowsCache: value === 'YES',
};
}
if (directive === '#EXT-X-MAP') {
if (!value) {
throw new Error('#EXT-X-MAP directive must have a value');
}
const p = parseM3uKeyValue(value);
if (!p.URI) {
throw new Error('EXT-X-MAP directive must have a URI');
}
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Remove the deprecated #EXT-X-ALLOW-CACHE directive entirely (it was removed in protocol version 7)
- If keeping it for legacy compat, provide a value: #EXT-X-ALLOW-CACHE:YES
- Regenerate with a modern packager that omits this directive
Example fix
// before #EXT-X-ALLOW-CACHE // after (option 1: remove the line entirely) // after (option 2: provide a value) #EXT-X-ALLOW-CACHE:YES
Defensive patterns
Strategy: validation
Validate before calling
// Pre-fetch and strip the deprecated EXT-X-ALLOW-CACHE directive
const text = await (await fetch(url)).text();
const cleaned = text
.split('\n')
.filter((line) => !line.trim().startsWith('#EXT-X-ALLOW-CACHE'))
.join('\n');
// pass cleaned text as a Blob to parseMedia Try / catch
try {
await parseMedia({src: url});
} catch (e) {
if (e instanceof Error && e.message.includes('EXT-X-ALLOW-CACHE')) {
// strip the deprecated directive from the playlist
}
throw e;
} Prevention
- Remove the deprecated #EXT-X-ALLOW-CACHE directive from playlists (removed in protocol version 7)
- Use a modern packager that does not emit this directive
When it happens
Trigger: A legacy playlist line '#EXT-X-ALLOW-CACHE' with no colon, or '#EXT-X-ALLOW-CACHE:' with an empty value.
Common situations: Old playlists generated by legacy encoders that still emit this deprecated directive; hand-edited legacy files; packagers targeting very old HLS clients.
Related errors
- EXT-X-VERSION directive must have a value
- EXT-X-MEDIA directive must have a value
- EXT-X-TARGETDURATION directive must have a value
- EXTINF has no value
- #EXT-X-PLAYLIST-TYPE. directive must have a value
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/676b5534675fa9b7.
Report an issue: GitHub.