jackwener/OpenCLI · error · CommandExecutionError
No downloadable media found
Error message
No downloadable media found
What it means
After a successful metadata fetch, the CLI maps fetchResult.items into downloadable items via buildInstagramDownloadItems; if the resulting list is empty it throws this CommandExecutionError. It means Instagram returned metadata for the shortcode but no media (image/video URLs) could be extracted — the post contains no downloadable media or the extraction didn't recognize the media shape.
Source
Thrown at clis/instagram/download.js:362
domain: 'www.instagram.com',
strategy: Strategy.COOKIE,
navigateBefore: false,
args: [
{ name: 'url', positional: true, required: true, help: 'Instagram post / reel / tv URL' },
{ name: 'path', default: '~/Downloads/Instagram', help: 'Download directory' },
],
func: async (page, kwargs) => {
const browserPage = ensurePage(page);
const target = parseInstagramMediaTarget(String(kwargs.url ?? ''));
const outputRoot = resolveOutputDir(kwargs.path);
await browserPage.goto(target.canonicalUrl);
const fetchResult = normalizeFetchResult(await browserPage.evaluate(buildInstagramFetchScript(target.shortcode)));
if (!fetchResult.ok)
handleFetchFailure(fetchResult);
const shortcode = fetchResult.shortcode || target.shortcode;
const mediaItems = buildInstagramDownloadItems(shortcode, fetchResult.items || []);
if (mediaItems.length === 0) {
throw new CommandExecutionError('No downloadable media found');
}
const savedDir = path.join(outputRoot, shortcode);
await downloadInstagramMedia(mediaItems, savedDir);
console.log(`📁 saved: ${displayPath(savedDir)}`);
return null;
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Confirm the URL is a public post, reel, or TV URL (contains /p/, /reel/, or /tv/)
- Upgrade the CLI to get support for newer Instagram post types
- Try another post to determine whether it's URL-specific
- Inspect fetchResult.items — if Instagram's shape changed, patch buildInstagramDownloadItems
Defensive patterns
Strategy: validation
Validate before calling
// only pass post/reel/tv URLs
const isPostUrl = /instagram\.com\/(p|reel|tv)\/[A-Za-z0-9_-]+/.test(url);
if (!isPostUrl) throw new Error('Provide a post, reel, or TV URL (contains /p/, /reel/ or /tv/)'); Try / catch
try {
await run(['instagram', 'download', url]);
} catch (e) {
if (String(e.message) === 'No downloadable media found') {
// verify URL type; skip or try the latest CLI with broader media support
} else throw e;
} Prevention
- Validate the URL shape before invoking the command
- Don't pass profile, story, or highlight URLs to the download command
- Keep the CLI updated for new Instagram post types
- Test with a known-good public post when debugging
When it happens
Trigger: fetchResult.ok === true but items is empty or unrecognizable — e.g. a post type the mapper doesn't support (shared/IGTV edge cases), an unsupported media_type, or the metadata returned an empty carousel.
Common situations: Passing a profile URL, story URL, or non-post URL instead of a post/reel URL; Instagram introduced a new post type the CLI doesn't yet map; a post containing only unsupported content.
Related errors
- No visible posts for ${username}; check the username and whe
- No catalog rows extracted — the URL may not be a course page
- No prices returned for train_no=${trainNo} ${fromStation.nam
- No 12306 stations match "${keyword}"
- No trains found from ${fromStation.name} to ${toStation.name
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/e741baaa2decd0ad.
Report an issue: GitHub.