Skip to main content
FieldValue
Page typeTroubleshooting reference
ScopeAll CometChat Flutter UI Kit v5 issues — initialization, rendering, theming, calling, extensions, AI features, localization, sound, events
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
Widget doesn’t renderinit() not called or not awaited before renderingEnsure init() completes before mounting widgets. See Methods
Widget 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 loginWidget mounted before init/login completesUse FutureBuilder or 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

Platform-Specific Issues

Android

SymptomCauseFix
App crashes on launchMissing internet permissionAdd <uses-permission android:name="android.permission.INTERNET"/> to AndroidManifest.xml
Network requests failMissing network security configFor debug builds, add android:usesCleartextTraffic="true" to AndroidManifest.xml
Camera/microphone not workingMissing permissionsAdd camera and microphone permissions to AndroidManifest.xml
Build fails with minSdk errorminSdkVersion too lowSet minSdkVersion 21 or higher in build.gradle
ProGuard issues in release buildMissing ProGuard rulesAdd CometChat ProGuard rules to proguard-rules.pro

iOS

SymptomCauseFix
App crashes on camera/mic accessMissing Info.plist entriesAdd NSCameraUsageDescription and NSMicrophoneUsageDescription to Info.plist
Build fails with deployment target erroriOS version too lowSet platform :ios, '13.0' or higher in Podfile
Pod install failsCocoaPods cache issueRun pod cache clean --all then pod install
Bitcode errorBitcode enabledDisable bitcode in Xcode build settings
Simulator crashesArchitecture mismatchEnsure you’re using the correct simulator architecture

Theming and Styling

SymptomCauseFix
Theme not appliedTheme not passed to widgetWrap your app with CometChatTheme or pass theme to individual widgets
Colors not changingUsing wrong color paletteUse CometChatThemeHelper.getColorPalette(context) to access theme colors
Typography not appliedFont family not setSet font family in CometChatTypography
Dark mode not workingTheme mode not setUse ThemeMode.dark and ensure CometChatColorPalette has dark mode colors
Custom style not applyingStyle property not set correctlyCheck the component’s style class (e.g., CometChatConversationsStyle)
Spacing issuesUsing wrong spacing valuesUse CometChatSpacing for consistent spacing

Components

SymptomCauseFix
Callback not firingWrong callback name or signatureCheck the Actions section on the component page for exact callback name and parameters
Custom view not appearingReturning null from view builderEnsure view builder returns a valid Widget
Messages not loadingInvalid user/group object passedEnsure you fetch the user/group via SDK before passing to components
List not refreshingState not updatedCall setState() or use a state management solution
Scroll position lostKey not set on list itemsEnsure unique keys are set on list items
Empty state not showingemptyStateView not setProvide an emptyStateView builder

Calling

SymptomCauseFix
Call buttons not appearingCalling extension not installedAdd cometchat_calls_uikit to your pubspec.yaml
Incoming call screen not showingCometChatIncomingCall not in widget treeAdd CometChatIncomingCall at the app root level
Call fails to connectWebRTC permissions not grantedEnsure camera and microphone permissions are granted
Audio not working in callAudio session not configuredConfigure audio session for iOS in AppDelegate.swift
Video not showingCamera permission deniedRequest camera permission before starting video call
Call drops immediatelyNetwork connectivity issueCheck internet connection and firewall settings

Extensions

SymptomCauseFix
Extension feature not appearingExtension not activated in DashboardEnable the specific extension from your Dashboard
Stickers not showing in composerSticker extension not enabledActivate Sticker Extension in Dashboard
Polls option missingPolls extension not enabledActivate Polls Extension in Dashboard
Link preview not renderingLink Preview extension not enabledActivate Link Preview Extension in Dashboard
Reactions not workingReactions extension not enabledActivate Reactions Extension in Dashboard

AI Features

SymptomCauseFix
AI features not appearingFeature not activated in DashboardEnable the specific AI feature from your Dashboard
Conversation Starter not showingFeature not enabled or no conversation contextEnsure Conversation Starter is activated
Smart Replies not appearingFeature not enabled in DashboardEnsure Smart Replies is activated
AI extension not in UIKitSettingsAI features not configuredAdd AI extensions to UIKitSettings.aiFeature list
UIKitSettings uiKitSettings = (UIKitSettingsBuilder()
  ..aiFeature = [
    AISmartRepliesExtension(),
    AIConversationStarterExtension(),
    AIConversationSummaryExtension(),
  ]
).build();

Localization

SymptomCauseFix
UI text not translatedLanguage code not matchingCheck supported languages in Localize
Custom translations not appearingTranslations not added correctlyUse Translations class to add custom translations
Date/time format unchangedLocale not setSet locale in MaterialApp or use dateTimeFormatterCallback
RTL layout not workingText direction not setSet textDirection: TextDirection.rtl for RTL languages

Sound

SymptomCauseFix
No sound playsSound disabled or volume mutedCheck CometChatSoundManager settings and device volume
Custom sound not playingInvalid file path or formatEnsure the path is correct and file is WAV/MP3 format
Sound plays multiple timesMultiple listeners registeredEnsure you’re not registering duplicate sound listeners
Sound continues after app backgroundedSound not stoppedCall CometChatSoundManager.stop() when appropriate

Events

SymptomCauseFix
Event listener not firingSubscribed to wrong eventCheck the Events page for exact event names
Duplicate event triggersMultiple subscriptionsRemove listener in dispose() method
Event fires but UI doesn’t updateState not updated in handlerCall setState() in the event handler
Memory leak from eventsListener not removedAlways remove listeners in dispose()
@override
void dispose() {
  CometChatMessageEvents.removeMessagesListener("listenerId");
  super.dispose();
}

Build and Dependencies

SymptomCauseFix
Dependency conflictVersion mismatchRun flutter pub upgrade and check version constraints
Build fails with Dart version errorDart SDK too oldUpgrade Flutter: flutter upgrade
iOS build failsPod dependencies outdatedRun cd ios && pod update
Android build fails with Gradle errorGradle version mismatchUpdate Gradle in android/gradle/wrapper/gradle-wrapper.properties
Package not foundPackage not in pubspec.yamlAdd cometchat_chat_uikit: ^5.x.x to dependencies

Performance

SymptomCauseFix
UI janky/laggyToo many rebuildsUse const constructors and optimize state management
Memory usage highImages not cachedEnable image caching and limit message history
Slow message loadingLarge message historyUse pagination with MessagesRequestBuilder().limit
App freezes on large groupsToo many members loadedUse pagination for group members

Common Error Messages

ErrorCauseFix
ERR_APP_NOT_FOUNDInvalid App IDCheck App ID in Dashboard
ERR_AUTH_TOKEN_NOT_FOUNDInvalid or expired auth tokenGenerate new auth token
ERR_UID_NOT_FOUNDUser doesn’t existCreate user first via Dashboard or API
ERR_GROUP_NOT_FOUNDGroup doesn’t existCreate group first
ERR_NOT_LOGGED_INUser not authenticatedCall login() before using SDK
ERR_WEBSOCKET_CONNECTION_FAILEDNetwork issueCheck internet connection

Getting Help

If you’re still experiencing issues: