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

  1. Confirm the URL is a public post, reel, or TV URL (contains /p/, /reel/, or /tv/)
  2. Upgrade the CLI to get support for newer Instagram post types
  3. Try another post to determine whether it's URL-specific
  4. 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

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


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/e741baaa2decd0ad. Report an issue: GitHub.