Mintplex-Labs/anything-llm · warning · Error

There was no content to be collected or read.

Error message

There was no content to be collected or read.

What it means

Thrown when the scrape reported success:true but the returned content is null, undefined, or an empty string. The page loaded and the collector returned a result, but there was no extractable text. This is a softer failure than 385: the fetch worked, the content did not.

Source

Thrown at server/utils/agentFlows/executors/web-scraping.js:40

  const captureMode = captureAs === "querySelector" ? "html" : captureAs;
  introspect(`Scraping the content of ${url} as ${captureAs}`);
  const { success, content } = await new CollectorApi()
    .getLinkContent(url, captureMode)
    .then((res) => {
      if (captureAs !== "querySelector") return res;
      return parseHTMLwithSelector(res.content, config.querySelector, context);
    });

  if (!success) {
    introspect(`Could not scrape ${url}. Cannot use this page's content.`);
    throw new Error("URL could not be scraped and no content was found.");
  }

  introspect(`Successfully scraped content from ${url}`);
  if (!content || content?.length === 0) {
    introspect("There was no content to be collected or read.");
    throw new Error("There was no content to be collected or read.");
  }

  if (!enableSummarization) {
    logger(`Returning raw content as summarization is disabled`);
    return content;
  }

  const tokenCount = new TokenManager(
    aibitat.defaultProvider.model
  ).countFromString(content);
  const contextLimit = Provider.contextLimit(
    aibitat.defaultProvider.provider,
    aibitat.defaultProvider.model
  );

  if (tokenCount < contextLimit) {
    logger(
      `Content within token limit (${tokenCount}/${contextLimit}). Returning raw content.`

View on GitHub (pinned to 526360e320)

Solutions

  1. Change captureAs to a different mode (e.g., html instead of text) to capture raw markup.
  2. Confirm the page actually contains text content in its static HTML.
  3. If summarization is disabled and content is empty, the page genuinely had no text - choose a different source.
  4. Verify the querySelector targets an element that contains text.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  result = await executeWebScraping(config, context);
} catch (error) {
  if (error.message.includes("no content")) {
    // optionally retry with captureAs: "html" to capture raw markup
  } else throw error;
}

Prevention

When it happens

Trigger: The page is effectively empty of text (only images/media); the captureAs mode extracted nothing usable; a querySelector matched elements but their inner HTML was empty; the page's text is entirely behind rendering the collector cannot do.

Common situations: Scraping an image gallery, a PDF viewed via an embed, or a page whose visible text is injected client-side after load; captureAs set to a mode that does not match the page's structure.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13). Data as JSON: /api/errors/4603ef0c97ae849d. Report an issue: GitHub.