Skip to main content
  • Page type: Troubleshooting reference
  • Scope: All CometChat React UI Kit v6 issues — initialization, rendering, theming, calling, extensions, AI features, localization, sound, events
  • When to reference: When a component fails to render, data is missing, styling doesn’t apply, or a feature doesn’t appear

Initialization and Login

SymptomCauseFix
CometChatUIKit.init() fails silentlyInvalid App ID, Region, or Auth KeyDouble-check credentials from the CometChat Dashboard
Component doesn’t renderinit() not called or not awaited before renderingEnsure init() completes before mounting components. See Methods
Component renders but shows no dataUser not logged inCall CometChatUIKit.login("UID") after init
Login fails with “UID not found”UID doesn’t exist in your CometChat appCreate the user via Dashboard, SDK, or API first
Blank screen after loginComponent mounted before init/login completesUse state to conditionally render after login resolves
getLoggedinUser() returns nullUser not logged in or session expiredCall login() or loginWithAuthToken() first
sendTextMessage() failsUser not logged in or invalid receiverEnsure login completes before sending messages
Auth Key exposed in productionUsing Auth Key instead of Auth TokenSwitch to Auth Token for production

SSR / Framework-Specific

SymptomCauseFix
SSR hydration errorCometChat components use browser APIs (window, WebSocket, document) on serverWrap in useEffect or use dynamic import with ssr: false. See Next.js Integration
CometChat components fail in AstroAstro SSR tries to render on serverUse client:only="react" directive on CometChat islands

Theming and CSS

SymptomCauseFix
CSS/theme not appliedMissing CSS importAdd @import url("@cometchat/chat-uikit-react/css-variables.css"); in your CSS entry file
CSS has no effectBase stylesheet not importedAdd @import url("@cometchat/chat-uikit-react/css-variables.css"); at top of App.css
Overrides not applyingMissing .cometchat scope in selectorScope overrides under .cometchat
Selectors don’t matchUsing CSS Modules (hashed class names)Move rules to a global stylesheet, not *.module.css
Component-level override not workingMissing .cometchat parent in selectorUse .cometchat .cometchat-conversations not just .cometchat-conversations
Dark mode unchangeddata-theme missing or mismatchSet data-theme="dark" on the wrapper and target .cometchat-root[data-theme="dark"] .cometchat
Font not changing--cometchat-font-family set on wrong elementSet on .cometchat
Styles leak into host appMissing .cometchat scope prefixAlways scope overrides under .cometchat
Token change has no visible effectToken doesn’t control the expected propertyCheck the Color Resources table

Components

SymptomCauseFix
Callback not firingWrong prop name or signatureCheck the Actions section on the component page for exact prop name and parameter types
Custom view not appearingReturning null or undefined from view propEnsure view function returns valid JSX
Messages not loadingInvalid user/group object passedEnsure you fetch the user/group via SDK before passing to components

Calling

SymptomCauseFix
Call buttons not appearing in Message Header@cometchat/calls-sdk-javascript not installedRun npm install @cometchat/calls-sdk-javascript — UI Kit auto-detects it
Incoming call screen not showingCometChatIncomingCall not mounted in the component treeRender the component at the app root level so it can listen for incoming calls

Extensions

SymptomCauseFix
Extension feature not appearingExtension not activated in CometChat DashboardEnable the specific extension from your Dashboard
Stickers not showing in composerSticker extension not enabledActivate Sticker Extension in Dashboard
Polls option missing from action sheetPolls extension not enabledActivate Polls Extension in Dashboard
Link preview not rendering in messagesLink Preview extension not enabledActivate Link Preview Extension in Dashboard

AI Features

SymptomCauseFix
AI features not appearingFeature not activated in CometChat DashboardEnable the specific AI feature from your Dashboard
Conversation Starter not showingFeature not enabled or no conversation contextEnsure Conversation Starter is activated in Dashboard
Smart Replies not appearing in composerFeature not enabled in DashboardEnsure Smart Replies is activated in Dashboard

Localization

SymptomCauseFix
UI text not translatedLanguage code not matching supported codesCheck the supported languages table in Localize for exact codes (e.g., en-US not en)
Custom translations not appearingaddTranslation called before initCall CometChatLocalize.init() first, then addTranslation()
Date/time format unchangeddisableDateTimeLocalization set to trueSet disableDateTimeLocalization: false in init config
Component-level CalendarObject ignoredProp name mismatchCheck the component docs for the exact prop name (e.g., lastActiveAtDateTimeFormat)
Missing translation key shows raw keyNo missingKeyHandler configuredAdd a missingKeyHandler function in init config

Sound

SymptomCauseFix
No sound playsBrowser autoplay policy blocks audio before user interactionhasInteracted() must return true — the user must interact with the page first
Custom sound not playingInvalid file path or unsupported formatEnsure the path is correct and the file is a valid audio format (WAV/MP3)
Sound keeps playingpause() not calledCall CometChatSoundManager.pause() to stop playback
Sound import errorSound is not a separate exportAccess via CometChatSoundManager.Sound, not import { Sound }

Events

SymptomCauseFix
Event listener not firingSubscribed to wrong event nameCheck the Events page for exact event names
Duplicate event triggersMultiple subscriptions without cleanupUnsubscribe in useEffect cleanup or component unmount
Event fires but UI doesn’t updateState not updated in event handlerEnsure you call setState or equivalent in the handler