AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

AI Search Crawlers And TelegramBot Miss Streaming Metadata In Edge SSR

Next.js App Router with Edge SSR streaming defers metadata into Suspense chunks. Bots like TelegramBot, ChatGPT-User, GPTBot, and ClaudeBot terminate the response after the initial HTML chunk, causing empty social cards and missing SEO metadata.

highConfidence 92%Next.jsAffected V16.4.0-Canary.32

Origin Analysis

Next.js's bot detection list in is-bot.ts does not include AI crawlers or TelegramBot, so these user agents are treated as regular browsers and receive streamed HTML where metadata appears only in later Suspense chunks. The underlying design flaw is a hardcoded, incomplete bot list without an extension mechanism.
1. Deploy an App Router page with asynchronous metadata streaming in Edge SSR runtime. 2. Send an HTTP request with User-Agent 'TelegramBot (like TwitterBot)', 'ChatGPT-User', 'GPTBot', or 'ClaudeBot'. 3. Observe that the initial HTML chunk lacks <title>, <meta name="description">, and OpenGraph tags.

Fixing Code Block

Edge Case Audit

This is a patch to internal Next.js files; it may be overwritten on upgrade. Use patch-package or wait for an official fix. The regex change could theoretically match legitimate browsers with custom user agents containing these substrings, but the risk is minimal. Rollback by removing the added user-agent tokens from the regex or restoring the original file.

Ecosystem Topology