AGENT SKILL

cometchat-react-v7-troubleshooting

Diagnose a broken CometChat React v7 integration — blank panes, a collapsed/0-height surface, empty lists, no messages, the kit's error state, events that never fire, or a version_conflict. Triggers: 'cometchat react not working', 'chat is blank', 'conversations empty', 'messages not showing react', 'something went wrong cometchat', 'cometchat react errors', 'why is my chat broken'.

使用场景前端开发
License 许可
MIT
最近更新
2026-11-14
Stars
★ 1.6k
Forks
490

01 前言 Front Matter

name
cometchat-react-v7-troubleshooting
license
MIT
metadata
{ "tags": "cometchat react v7 troubleshooting debug diagnostics blank-screen version-conflict", "author": "CometChat", "version": "1.0.0" }
description
Diagnose a broken CometChat React v7 integration — blank panes, a collapsed/0-height surface, empty lists, no messages, the kit's error state, events that never fire, or a version_conflict. Triggers: 'cometchat react not working', 'chat is blank', 'conversations empty', 'messages not showing react', 'something went wrong cometchat', 'cometchat react errors', 'why is my chat broken'.
compatibility
@cometchat/chat-uikit-react ^7 (7.1.x–7.2.x verified); React 18–19; Vite / Next.js / CRA / React Router / Astro

03 SKILL.md 正文

Ground truth: @cometchat/chat-uikit-react@7. Symbols/signatures are verified against cometchat-react-v7-core + its catalog and FETCHED via references/docs-map.md; the rules referenced (init order, layout sizing, credentials) are RULES.md. This diagnostics catalog is cross-checked against the live {DOCS_BASE}/ui-kit/react/troubleshooting.md page (base + paths in cometchat-react-v7-core/references/docs-map.md), and adds the host-side/runtime symptoms it doesn't cover.

Companion skills (read first)

  • cometchat-react-v7-core — the correct init→login→render order, credentials, and the reflow-free layout the fixes below restore.

Use this skill when

A React CometChat integration compiles but misbehaves at runtime: blank, empty, unresponsive, or throwing.

Start here — React fails on the ORDER and the BOX

Two causes explain most "it's blank":

  1. A kit component rendered before init() + login() resolved. The surface must be gated on the resolved logged-in user. Rendering it eagerly (or during SSR) yields an empty/erroring pane.
  2. The container has no height. The kit fills its parent; a parent at height:auto/0 collapses it to a sliver. This is a host CSS defect, not a kit bug (RULES.md → Layout / sizing).

Symptom → cause → fix

Symptom Likely cause Fix
Blank/white, no errors Surface rendered before init+login resolved Gate render on the resolved user; keep CometChatErrorBoundary for a visible fallback
Blank during SSR / window is not defined A kit component imported or rendered on the server (Next.js, Astro, Remix) Render the surface client-only — "use client" + dynamic(..., { ssr:false }) (Next), client:only (Astro); see core references/ssr.md
Surface ~0px / cramped top-left Ancestor chain has no height html,body,#root{height:100%} + a pinned surface (100dvh full-app) + panes min-height:0; see core references/layout.md
"OOPS! Looks like something went wrong" The kit's error state — a call threw (often a custom ConversationsRequestBuilder with no .setLimit(n), or a bad Region) Add .setLimit(30); confirm Region matches the dashboard app
Conversations empty New/seeded app has no conversations yet, or scope excludes them Send a first message; check conversationsRequestBuilder scope (user/group) matches intent
login() fails "user not found" UID does not exist in the app Use a real UID (Dashboard → Users; fresh apps seed cometchat-uid-1) — never a guessed superhero*
Nothing updates live Missing/duplicated listeners, or StrictMode double-mount Add listeners with a stable ID, remove on unmount; guard the init/login in-flight (cometchat-react-v7-patterns)
Roster rows appear TWICE + ~30 "duplicate key" errors (dev only) React StrictMode double-invokes effects; the roster drop-ins CometChatUsers/CometChatGroups/CometChatGroupMembers double-append (kit de-dupe gap; CometChatConversations is unaffected) A dev-only StrictMode artifact — gone in vite build/prod. Do NOT remove StrictMode to "fix" it; verify the roster in a production build. Kit issue — report upstream
Localized keys shown raw (e.g. group_info) Wrong/stale i18n key or provider missing Use the kit component / correct key; ensure CometChatProvider wraps the tree
Works in dev, blank in prod Wrong env prefix → Auth Key/App ID missing in the bundle Fix the bundler prefix; grep the build (cometchat-react-v7-production)
version_conflict on detect Project on UI Kit v6 while skills target v7 STOP and reconcile — migrate v6→v7 (cometchat-react-v7-migration), or stay on v6 by installing the older v4 skills pack (it targets the v6 UI Kit)

When the table does not cover it

Open the browser console + network tab: a 401 is auth (bad token/Auth Key/Region), a 402 is a plan-gated feature (e.g. Search — enable it in the dashboard), a 4xx "no conversation yet" is benign. Then fetch the feature's page via cometchat-react-v7-core/references/docs-map.md. Never diagnose from node_modules/.d.ts or memory.

Verify it works

Init+login resolve before the surface renders · the surface has real dimensions (not a sliver) · conversations render or show the kit's empty state (not the error state) · a message sends and arrives live · no raw localization keys · production build carries no Auth Key.

What NOT to do

Do not silence the error boundary to hide a thrown call; do not hard-code a UID to dodge "user not found"; do not read kit internals to work around a missing prop — fetch the documented prop instead.

04 同仓库更多 Skills

hashgraph-online
hashgraph-online/awesome-codex-plugins

migrate-to-e2e

Moves an existing Playwright, Cypress, Selenium, Appium, Detox, Maestro, or TesterArmy suite to e2e one slice at a time, with the old suite running beside the new one until each ported test is proven. Keeps a MIGRATION.md progress file so any later session resumes where the last stopped. Optionally plants a defect to show both suites catch it. Use for /migrate-to-e2e, "migrate our tests to e2e", "port these Maestro flows", "move our TesterArmy tests", or when a project has an e2e config and an older suite still running.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

e2e

Writes, runs, and debugs end-to-end tests for web and mobile apps with e2e, the agentic test runner, which mixes agent.act goals with exact locator assertions on a Playwright browser or an iOS or Android device. Also drives a project's running app live over the e2e MCP server to look at a screen, check a UI change, take a screenshot or record a video, and try a locator; and runs bug bashes, parallel e2e explore runs with each bug proven by a repro test. Use when a project depends on e2e or has an e2e.config.ts, when asked for end-to-end, browser, mobile, or agentic UI tests, to check a change in the running app, to QA or bug bash an app or branch, or when an e2e run fails.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

create-verification-skill

Generate a project-local verify-<app> skill on top of e2e, so any coding agent can launch the app, check it is worth driving, exercise a feature the way a user does, keep evidence, and bug bash it. Writes the skill, a feature map with one explore charter per feature, and proves it once. Use for /create-verification-skill, "make a verification skill for this repo", or when a project has no scripted way to prove UI behavior.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

deja-search

deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

deja-reflect

End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

revid

Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.

图像与多媒体Skill与智能体开发
★ 1.6k