cometchat-flutter-v5-troubleshooting

SkillDev tools

Use when debugging CometChat Flutter UIKit v5 issues. Symptom-to-cause lookup, verify checks, common errors, drift detection.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the cometchat-flutter-v5-troubleshooting skill

What this skill tells your AI

The instructions your AI receives, as published by cometchat/cometchat-skills in skills/cometchat-flutter-v5-troubleshooting/SKILL.md and read by ahel’s review.

Ground truth: cometchat_chat_uikit: ^5.2 (legacy/maintenance-only; calls via raw cometchat_calls_sdk ^5.0.2) — pub-cache source + ui-kit/flutter/v5. Official docs: https://www.cometchat.com/docs/ui-kit/flutter/v5/overview · Docs MCP: claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.

CometChat Flutter UIKit v5 — Troubleshooting

Symptom-to-cause lookup and verification checks.

Init / Login Issues

SymptomCauseFix
"Authentication null"CometChatUIKit.init() not calledCall init before login/components
"APP ID null"appId not set in UIKitSettingsBuilderSet ..appId = 'YOUR_APP_ID'
Login hangs silentlyinit() hasn't completed yetAwait init completion via onSuccess before calling login
"ERR_INVALID_REGION"Uppercase regionUse lowercase: 'us', 'eu', 'in'
Login succeeds but no messages loadsubscriptionType not setSet ..subscriptionType = CometChatSubscriptionType.allUsers

UI / Layout Issues

SymptomCauseFix
Theme jank during keyboard animationCometChatThemeHelper.getColorPalette(context) called in build()Cache in didChangeDependencies()
Components don't reflect theme changesUsing _themeInitialized flagRemove flag — cache unconditionally in didChangeDependencies()
Hardcoded colors don't match dark modeUsing Color(0xFF...) instead of theme tokensUse colorPalette.primary, colorPalette.textPrimary, etc.
colorPalette.white doesn't change in dark modewhite/black/transparent are NOT brightness-awareUse colorPalette.neutral50 for brightness-aware white

GetX Issues

SymptomCauseFix
"GetX controller not found"Using Get.find() before Get.put()Let UIKit components manage their own controllers
Controller not disposedManually created controller without cleanupUse controllerTag or let widget manage lifecycle
Multiple controller instancesCreating controller outside the widgetLet the widget's initState() handle Get.put()
Get.delete() throwsDeleting controller that was created with controllerTagOnly delete if controllerTag was null (widget-managed)

Listener / Event Issues

SymptomCauseFix
Duplicate events firingListener not removed in dispose()Always remove with same ID used to register
Listener ID collisionHardcoded listener ID stringUse timestamp: 'id_${DateTime.now().millisecondsSinceEpoch}'
No typing indicatorssubscriptionType not setSet CometChatSubscriptionType.allUsers
No online/offline statussubscriptionType not setSame fix
ccMessageSent not firingUsing CometChat.sendMessage() directlyUse CometChatUIKit.sendTextMessage() instead
Events fire after screen disposedListener not removedRemove in dispose() / onClose()

Call Issues

SymptomCauseFix
Incoming call overlay doesn't showCallNavigationContext.navigatorKey not setSet on MaterialApp.navigatorKey
Call buttons don't appearCometChatCallingExtension not registeredSet ..callingExtension = CometChatCallingExtension() on UIKitSettingsBuilder
Call fails silentlyCamera/microphone permissions not grantedRequest Permission.camera and Permission.microphone
Incoming calls not handledCall listener not registered globallyRegister CallListener + CometChatCallEventListener at dashboard level

Push Notification Issues

SymptomCauseFix
No push notificationsToken not registeredCall CometChatNotifications.registerPushToken(PushPlatforms.FCM_FLUTTER_ANDROID, fcmToken: token, ...) after login (PNRegistry.registerPNService is a v5 sample-app extension, not a kit API — must be copied in; see cometchat-flutter-v5-push)
Notifications after logoutToken not unregisteredCall CometChatNotifications.unregisterPushToken(onSuccess:, onError:) before logout
Duplicate notificationsForeground notification shown for active conversationCheck conversationId match before showing
VoIP call notification doesn't showBackground handler not top-levelUse @pragma('vm:entry-point') on top-level function
Tap doesn't navigateCallNavigationContext.navigatorKey.currentContext is nullEnsure navigatorKey is set on MaterialApp
iOS VoIP token not registeredMissing VoIP background modeEnable Voice over IP in Xcode Background Modes

Android Build Issues

SymptomCauseFix
Release build crashMissing ProGuard keep rulesAdd -keep class com.cometchat.** { *; }
Build fails with minSdk errorminSdk too lowSet minSdk 24 in android/app/build.gradle (matches vendor sample apps; bump to 26 ONLY if calls + min-SDK runtime errors)
AndroidX conflictMissing AndroidX migrationSet BOTH android.useAndroidX=true AND android.enableJetifier=true in gradle.properties

iOS Build Issues

SymptomCauseFix
Camera/mic permission crashMissing Info.plist entriesAdd NSCameraUsageDescription, NSMicrophoneUsageDescription
Pod install failsCocoapods version mismatchRun pod repo update then pod install

Callback Signature Errors

SymptomCauseFix
Type error on CometChatUsers.onItemTapMissing BuildContext parameterSignature is Function(BuildContext, User)?
Type error on CometChatGroups.onItemTapMissing BuildContext parameterSignature is Function(BuildContext, Group)?
Type error on CometChatConversations.onItemTapExtra BuildContext parameterSignature is Function(Conversation)? — no BuildContext
Type error on CometChatGroupMembers.onItemTapExtra BuildContext parameterSignature is Function(GroupMember)? — no BuildContext

v5 vs v6 Drift Detection

If you see any of these in a v5 project, it's a v6 pattern that was accidentally used:

v6 Pattern (wrong in v5)v5 Equivalent
import 'package:flutter_bloc/flutter_bloc.dart'GetX — no BLoC in v5
extends Bloc<Event, State>extends GetxController
extends EquatableNot used in v5
ServiceLocator.get<T>()Get.find<T>() or let widget manage
Single cometchat_chat_uikit with calls built-inSeparate cometchat_calls_uikit package
Per-component style classes (e.g. CometChatConversationsStyle, CometChatMessageListStyle) + theme via CometChatThemePer-widget feature flags only (no BuilderSettings/BuilderColor/BuilderTypography in v5 — those are v4 leftovers)
enableCalls: true + CallingConfiguration() on UIKitSettingsBuilder..callingExtension = CometChatCallingExtension()

Verify Checklist

Run through this when something isn't working:

  • CometChatUIKit.init() completes before any other CometChat call
  • subscriptionType set in UIKitSettingsBuilder
  • region is lowercase
  • Theme cached in didChangeDependencies(), not build()
  • All listeners registered with unique IDs
  • All listeners removed in dispose() / onClose()
  • CallNavigationContext.navigatorKey set on MaterialApp
  • CometChatCallingExtension() set if using calls
  • Push tokens registered after login
  • Push tokens unregistered before logout
  • ProGuard rules present for release builds
  • No v6 imports (flutter_bloc, equatable, BlocProvider / BlocBuilder)

Signals

GitHub stars
105
Forks
2
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
cometchat-flutter-v5-troubleshooting
Source
github.com/cometchat/cometchat-skills