Skip to main content
FieldValue
Page typeTroubleshooting reference
ScopeAll CometChat Android UI Kit v5 issues — initialization, theming, components, calling, extensions, AI features, localization, sound, events, methods, text formatters
When to referenceWhen 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
Blank screen after loginComponent rendered before init() or login() completesEnsure init()login() order completes before rendering any UI Kit component. See Methods
Component renders but shows no dataUser not logged inCall CometChatUIKit.login("UID", callback) after init resolves
Login fails with “UID not found”UID doesn’t exist in your CometChat appCreate the user via Dashboard, SDK, or REST API first
getLoggedInUser() returns nullUser not logged in or session expiredCall login() or loginWithAuthToken() first
Auth Key exposed in productionUsing Auth Key instead of Auth TokenSwitch to loginWithAuthToken() for production. Generate tokens server-side via the REST API
init() callback never firesNetwork blocked or incorrect regionVerify internet permission in AndroidManifest.xml and confirm the region matches your Dashboard (us, eu, in)
minSdk build errorProject minSdk is below 24Set minSdk to 24 or higher in your app-level build.gradle — the UI Kit requires Android 7.0 (API 24)+
Dependency resolution failureMissing CometChat Maven repositoryAdd maven("https://dl.cloudsmith.io/public/cometchat/cometchat/maven/") to settings.gradle repositories block

Theming and Styling

SymptomCauseFix
Theme not applied / crash on launchApp theme does not extend CometChatTheme.DayNightSet parent="CometChatTheme.DayNight" in your themes.xml style and apply it in AndroidManifest.xml
Dark mode not workingSystem dark mode not propagated to CometChat themeEnsure your app theme parent is CometChatTheme.DayNight — it inherits Theme.MaterialComponents.DayNight.NoActionBar and responds to system dark mode automatically
Custom colors not applyingOverriding wrong theme attributesCheck the Color Resources page for the correct attribute names
Font not changingCustom font set on wrong theme attributeOverride cometchatFontFamily in your theme to apply a custom font globally
Styles leak into host appCometChat theme attributes conflict with app themeScope CometChat theme overrides to the Activity hosting CometChat components rather than the application-level theme
Styles apply to some screens but not othersActivity uses a different themeVerify the Activity hosting CometChat components has android:theme set to your custom theme in AndroidManifest.xml
Changes apply in light mode but not dark modeOnly values/themes.xml updatedUpdate both values/themes.xml and values-night/themes.xml with your overrides
Drawable changes not visibleStale build cacheRebuild the app after adding or replacing drawable files
Bubble style not applyingCustom style linked to wrong hubConfirm the style is linked inside the correct hub (CustomIncomingMessageBubbleStyle or CustomOutgoingMessageBubbleStyle). See Message Bubble Styling
Only incoming or outgoing bubble changesSeparate styles required per directionDefine separate styles for incoming and outgoing bubbles — changing one does not affect the other
Component style attribute not recognizedWrong attribute nameConfirm the exact attribute name in the linked attribute reference file on the component page

Components

SymptomCauseFix
Component not renderinginit() or login() not completeEnsure both init() and login() resolve before inflating any CometChat view. Use a callback or state flag to gate rendering
List is empty despite having dataUser not logged inVerify a user is logged in with CometChatUIKit.login() before displaying the component. Components fetch data for the logged-in user only
Callback not firingWrong listener method or signatureCheck the Actions section on the component page for the exact method name and parameter types
setOnItemClick not firingSelection mode set to MULTIPLEItem clicks may be consumed by selection logic. Set setSelectionMode(NONE) if you need standard click behavior
Messages not loadingInvalid User or Group object passedFetch the user or group via the SDK before passing it to the component
View not appearing in XML layoutMissing fully qualified class nameUse the full XML element name, e.g. <com.cometchat.chatuikit.conversations.CometChatConversations />
Custom view not renderingcreateView returns nullIf createView returns null, the default view is used. Return a valid inflated View to replace the default
ActivityResultLauncher not initializedMessageComposer created outside onCreateCreate CometChatMessageComposer in the onCreate state of an Activity. In a Fragment, ensure the Fragment is loaded during the Activity’s onCreate
Sticker button disappears after setting auxiliary viewAuxiliary button overriddenRetrieve default auxiliary buttons via CometChatUIKit.getDataSource().getAuxiliaryOption() and include them in your custom layout before calling setAuxiliaryButtonView()
Typing indicator not showingCustom subtitle view overrides itThe typing indicator renders in the default subtitle area. When you provide a custom setSubtitleView, it replaces the entire subtitle layout including the typing indicator
disableSoundForMessages(true) has no effectCalled after component starts loadingCall disableSoundForMessages(true) before the component starts loading
Filters not appliedBuilder not set on componentEnsure you call the appropriate set*RequestBuilder(builder) method on the component instance after creating and configuring the builder
ProGuard/R8 strips CometChat classesMissing keep rules for CometChatAdd -keep class com.cometchat.** { *; } to your proguard-rules.pro file
Jetifier errors during buildandroid.enableJetifier=true not setAdd android.enableJetifier=true to gradle.properties

Calling

SymptomCauseFix
Call buttons not appearingcom.cometchat:calls-sdk-android not installedAdd the calls SDK dependency to your build.gradle — the UI Kit auto-detects it. See Integration
Incoming call screen not showingCometChatIncomingCall not added to the ActivityRender CometChatIncomingCall at the root of your Activity layout so it can listen for incoming calls
Incoming calls not detectedCallListener not registeredEnsure CometChat.addCallListener() is called in your Application class and the Application class is registered in AndroidManifest.xml
Call connects but no audio/videoMissing runtime permissionsRequest CAMERA, RECORD_AUDIO, and INTERNET permissions at runtime before initiating calls
Call fails immediatelyCalls SDK version mismatchEnsure com.cometchat:calls-sdk-android version is compatible with your UI Kit version. Check the Integration page for version pairing
Sound still plays after disablingdisableSoundForCalls(true) called too lateCall disableSoundForCalls(true) before the component starts the call. If called after the call is initiated, it may not take effect
Custom call sound not playingAudio file missing or wrong pathVerify the sound file exists in res/raw and pass the correct @RawRes int resource ID to setCustomSoundForCalls
Call events not receivedNon-unique listener IDUse a unique string ID when calling CometChatCallEvents.addListener(). If you reuse the same ID, the previous listener is replaced
Call events still firing after screen closedListener not removedCall CometChatCallEvents.removeListener("YOUR_ID") in onDestroy() or onDestroyView()

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 translatedWrong language codeUse a Language.Code constant from the supported languages list in Localize
setLocale called after UI Kit screens renderLocale applied too lateCall CometChatLocalize.setLocale(...) before launching any UI Kit screen
String overrides not appearingKey name mismatch in strings.xmlVerify the key name matches exactly (e.g., cometchat_chats). See Localize
Changes not visible after editing strings.xmlStale build cacheClean and rebuild the project after editing string resources
Date/time labels unchangedDateTimeFormatterCallback not setAdd setDateTimeFormatterCallback(...) to the same UIKitSettings instance passed to CometChatUIKit.init(). See Methods

Sound

SymptomCauseFix
No sound playsCometChatSoundManager created with invalid ContextEnsure you pass a valid Context when instantiating CometChatSoundManager. See Sound Manager
Custom sound not playingAudio file missing or wrong formatPlace audio files in res/raw and reference them as R.raw.<file>. Ensure the format is supported by Android (WAV/MP3/OGG)
Sound plays only onceCreating a new CometChatSoundManager per eventReuse the same CometChatSoundManager instance instead of creating one per event
Silent on deviceDevice volume or ringer modeCheck device volume and ringer mode settings

Events

SymptomCauseFix
Event listener not firingSubscribed to wrong event class or methodCheck the Events page for exact event class names and callback methods
Duplicate event triggersMultiple registrations without cleanupRemove listeners in onDestroy() or onDestroyView() using the same tag passed during registration
Listener overwritten by anotherNon-unique or hardcoded listener tagUse a unique string for each listener registration (e.g., class name or UUID)
Event fires but UI doesn’t updateCallback not running on main threadWrap UI updates in runOnUiThread {} (Kotlin) or runOnUiThread(() -> { }) (Java)
Missed events after rotationListener not re-registered after Activity recreationRegister listeners in onCreate() or onViewCreated() and remove in the corresponding destroy callback
Not all event types receivedOnly some callbacks overriddenOverride every callback method you need. For example, registering a CometChatGroupEvents listener but only overriding ccGroupCreated means you will not receive ccGroupMemberJoined or other group events

Methods

SymptomCauseFix
UI Kit method failsCalled before init() completesCall CometChatUIKit.init() first and wait for the onSuccess callback before calling login(), sendTextMessage(), or any other UI Kit method
Messages sent but UI not updatingUsing SDK method instead of UI Kit wrapperUse CometChatUIKit.sendTextMessage() instead of CometChat.sendTextMessage(). The UI Kit wrapper automatically updates Message List and Conversations components via internal events
Failures silently ignoredonError callback left emptyEvery UI Kit method accepts a CallbackListener with onError. Log the CometChatException or display an error message to the user
Session conflicts after switching usersPrevious user not logged outCall CometChatUIKit.logout() and wait for onSuccess before logging in a different user
Custom message not appearing in Message ListNo MessageTemplate registeredCustom messages and custom interactive messages require a registered MessageTemplate that defines how to render them
Interactive message missing sender or receiversender or receiver not setFor FormMessage, CardMessage, SchedulerMessage, and CustomInteractiveMessage, set both sender (via CometChatUIKit.getLoggedInUser()) and receiver (the target User or Group object) before sending

Text Formatters

SymptomCauseFix
Mentions render as plain textFormatter not added to componentCreate a CometChatMentionsFormatter, add it to a List<CometChatTextFormatter>, and pass the list to the component via setTextFormatters()
setTextFormatters() has no effectCalled with empty listAdd at least one formatter to the list before calling setTextFormatters()
Custom mention style not applied in composerStyle not set on formatterCall mentionFormatter.setMessageComposerMentionTextStyle(context, R.style.YourStyle) before passing the formatter to the component
Custom mention style not applied in bubblesOnly one direction styledCall both setOutgoingBubbleMentionTextStyle() and setIncomingBubbleMentionTextStyle() — setting only one leaves the other with default style
Shortcut suggestions not appearingFormatter not registered or extension disabledConfirm the ShortCutFormatter is added to the formatters list via setTextFormatters(), and that the message-shortcuts extension is enabled in the Dashboard
setOnMentionClick callback not firingFormatter not passed to componentEnsure the formatter is passed to the component via setTextFormatters() after calling setOnMentionClick()