infiniflow/ragflow · error · Error

No files could be downloaded. Errors:\n${downloadErrors.slic

Error message

No files could be downloaded. Errors:\n${downloadErrors.slice(0, 3).join('\n')}

What it means

Raised when every attempted file download failed, so downloadedFiles is empty. The error aggregates up to three per-file failure messages (path + error) captured in the catch of the download loop, exposing the underlying causes — typically the 'Failed to download ...' or 'Download URL not available ...' errors from the download helper.

Source

Thrown at web/src/pages/skills/components/upload-modal.tsx:638

        try {
          const downloadedFile = await downloadGitFile(
            gitPlatform,
            file,
            owner,
            repo,
            ref,
          );
          downloadedFiles.push(downloadedFile);
        } catch (err) {
          const errorMsg = err instanceof Error ? err.message : String(err);
          console.warn(`Failed to download ${file.path}:`, err);
          downloadErrors.push(`${file.path}: ${errorMsg}`);
        }
      }

      if (downloadedFiles.length === 0) {
        throw new Error(
          `No files could be downloaded. Errors:\n${downloadErrors.slice(0, 3).join('\n')}`,
        );
      }

      // 3. Validate skill format
      setGitProgress('Validating skill format...');

      const validation = await validateSkillFormat(downloadedFiles);

      if (!validation.valid) {
        setGitValidationStatus('invalid');
        const errorKey = `skills.validation.${validation.error}`;
        const errorMessage = t(errorKey) || validation.error;
        const details = validation.details ? `: ${validation.details}` : '';
        setGitValidationMessage(`${errorMessage}${details}`);
        setGitImporting(false);
        setGitProgress('');
        return;

View on GitHub (pinned to 554fb1133a)

Solutions

  1. Read the embedded per-file errors — they name the file and the underlying cause (status code or missing URL)
  2. For 403/rate errors, add a token or wait and retry; reduce the number of files imported at once
  3. For 'Download URL not available', exclude non-file entries from the listing before download
  4. Verify raw.githubusercontent.com / gitee raw endpoints are reachable from the browser network
Defensive patterns

Strategy: fallback

Validate before calling

// pre-filter to entries known to be downloadable before starting
const targets = gitFiles.filter(
  (f) => f.type === 'file' && !isOversized(f) && (f.download_url || canBuildRawUrl(platform)),
);
if (targets.length === 0) {
  showWarning('No downloadable files in this repository path');
  return;
}

Type guard

function isDownloadFailure(e: unknown): e is Error {
  return e instanceof Error && /^Failed to download|Download URL not available/.test(e.message);
}

Try / catch

const downloadedFiles = [];
const downloadErrors: string[] = [];
for (const file of filteredGitFiles) {
  try {
    downloadedFiles.push(await downloadGitFile(platform, owner, repo, ref, file, gitToken || undefined));
  } catch (err) {
    if (isTransient(err)) await backoffRetry(file); // salvage what we can
    downloadErrors.push(`${file.path}: ${err instanceof Error ? err.message : String(err)}`);
  }
}
if (downloadedFiles.length === 0) {
  setGitValidationStatus('invalid');
  setGitValidationMessage(`No files could be downloaded. Errors:\n${downloadErrors.slice(0, 3).join('\n')}`);
}

Prevention

When it happens

Trigger: All listed files fail download: raw endpoint rate-limited/403, private repo without authenticated raw fetch, files removed since listing, or all entries lacking download_url (submodules). The slice(0,3) messages reveal which.

Common situations: Bulk import of a large repo hitting rate limits mid-run; private repository where API listing works with token but raw fetches do not; network with blocked raw.githubusercontent.com.

Related errors


AI-assisted analysis of infiniflow/ragflow@554fb1133a (2026-08-15). Data as JSON: /api/errors/1f692eb295055d0f. Report an issue: GitHub.