Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
cometchat avatar

Cometchat Native Troubleshooting

  • 6 installs
  • 70 repo stars
  • Updated June 23, 2026
  • cometchat/cometchat-skills

Diagnoses CometChat React Native UI Kit failures across init/login, pod install, iOS privacy manifest, Metro cache, permissions, and v4-to-v5 upgrade.

About

Diagnoses and fixes common CometChat React Native integration failures spanning init/login, native build, cache, and permission issues. A developer uses it when a React Native chat integration is broken or drifted.

  • Covers gesture handler, pod install, iOS privacy manifest, and Android Maven issues
  • Includes v4-to-v5 upgrade and Metro cache troubleshooting

Cometchat Native Troubleshooting by the numbers

  • 6 all-time installs (skills.sh)
  • Ranked #438 of 596 Debugging skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cometchat/cometchat-skills --skill cometchat-native-troubleshooting

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs6
repo stars70
Last updatedJune 23, 2026
Repositorycometchat/cometchat-skills

What it does

Diagnoses CometChat React Native UI Kit failures across init/login, pod install, iOS privacy manifest, Metro cache, permissions, and v4-to-v5 upgrade.

Files

SKILL.mdMarkdownGitHub ↗

Purpose

Teaches Claude how to diagnose and fix CometChat React Native integration failures. Covers every category of failure I've seen across Expo + bare RN, with an up-front triage flow so Claude asks the right questions before assuming a fix.

Read `cometchat-native-core` first — most "why doesn't this work" issues trace to the init/login/wrapper chain explained there.

Ground truth: docs/ui-kit/react-native/troubleshooting.mdx, apple-privacy-manifest-guide.mdx, upgrading-from-v4.mdx, and first-hand failure modes from real integrations.

---

1. Triage — read project state before guessing

When the user reports a problem, gather facts before proposing a fix. Ask + run these first:

1a. Which framework?

# Expo or bare?
grep -E '"expo":|"expo-router":' package.json
ls -d ios android 2>/dev/null   # bare RN has these dirs at root
ls app.json app.config.js 2>/dev/null
  • expo in dependencies + no ios/android folders → Expo managed → route to cometchat-native-expo-patterns
  • ios/ + android/ folders at root → bare RN → route to cometchat-native-bare-patterns
  • Both (expo + ios/android) → bare-after-prebuild. Treat as bare.

1b. Is the wrapper chain correct?

# Confirm four wrappers in entry file
grep -E "GestureHandlerRootView|SafeAreaProvider|CometChatThemeProvider|CometChatProvider" \
  App.tsx index.js index.ts app/_layout.tsx 2>/dev/null

If any are missing, that's almost certainly the cause. See cometchat-native-core § 3.

1c. Is react-native-gesture-handler imported first?

# Must be line 1 (or 2 with a shebang) of entry
head -5 index.js index.ts App.tsx app/_layout.tsx 2>/dev/null

If the import is missing or below React, swipe gestures and bottom sheets silently break — often only in release builds.

1d. Is init complete before login?

grep -A 10 "CometChatUIKit.init" src/providers/CometChatProvider.tsx 2>/dev/null

Look for the init-then-login sequence with an await or module-level initialized flag. Fire-and-forget init is a common cause of "components don't render."

1e. Pod install state (iOS)

ls ios/Pods/ | head -5 2>/dev/null       # should list dozens of pods
cat ios/Podfile.lock | head -3 2>/dev/null

If ios/Pods/ is missing or sparse, native modules aren't linked. cd ios && pod install && cd .. is the fix.

1f. Package deps

# Check the full UI Kit peer-dep set is installed
for dep in \
  @cometchat/chat-sdk-react-native \
  @cometchat/chat-uikit-react-native \
  react-native-gesture-handler \
  react-native-safe-area-context \
  react-native-svg \
  @react-native-async-storage/async-storage; do
  node -e "try{require.resolve('$dep'); console.log('✓ $dep')}catch(e){console.log('✗ MISSING: $dep')}"
done

Missing peer deps → install + pod install (bare) or expo install (Expo) + rebuild.

---

2. Symptom → fix lookup tables

Quick-reference tables. Work through in order; if none match, drop into § 3 deep-dives.

2a. Initialization + login

SymptomLikely causeFix
CometChatUIKit.init() fails silentlyInvalid APP_ID / REGION / AUTH_KEYRe-verify from dashboard → your app → Credentials
Components render nothing after logininit() not awaited before mountUse the provider pattern from cometchat-native-core § 6 with isReady gating
Blank screen, no errorsComponent mounted before init completedConditionally render: if (!isReady) return null
getLoggedInUser() returns nullLogin not called or session expiredCall CometChatUIKit.login({ uid }) after init resolves
Login fails: "UID not found"User doesn't exist in CometChatCreate via dashboard, SDK, or REST API. For dev, use cometchat-uid-1 through cometchat-uid-5 (pre-seeded)
"Please wait until the previous login request ends"login() called concurrently (React StrictMode double-mount / navigation remount)Use the ensureLoggedIn module-level promise guard from cometchat-native-core § 2
sendTextMessage() failsNot logged in or invalid receiverVerify getLoggedInUser() returns a user + receiver user/group object exists
Production build exposes Auth KeyUsing authKey in productionSwitch to server-minted auth tokens via login({ authToken }). See cometchat-native-production

2b. Gesture handler + wrapper chain

SymptomLikely causeFix
Composer swipe gestures not workingimport "react-native-gesture-handler" not at TOP of entry fileMove to line 1 of index.js / index.ts / Expo Router's app/_layout.tsx
BottomSheet doesn't open on swipeMissing GestureHandlerRootView wrapperWrap at app root with <GestureHandlerRootView style={{ flex: 1 }}>
Content overlaps status bar / home indicatorMissing SafeAreaProviderWrap inside GestureHandlerRootView with <SafeAreaProvider>
Theme tokens return undefinedMissing CometChatThemeProviderAdd wrapper. See cometchat-native-core § 3 for the full chain
"Couldn't find SafeArea context" errorSafeAreaView used outside SafeAreaProviderAdd SafeAreaProvider at root, or use plain View inside chat screens
Release build: swipe/gesture broken, dev build finereact-native-gesture-handler not line 1 (some bundlers defer it)Move to line 1 unconditionally

2c. iOS build failures

SymptomLikely causeFix
No such module 'RNGestureHandler'Pods not installedcd ios && pod install && cd .. + rebuild
Undefined symbol: _OBJC_CLASS_$_RNCAsyncStoragePods out of sync after npm installcd ios && pod install && cd ..
TurboModuleRegistry.getEnforcing(...) crash at runtimeNative module not linkedcd ios && pod install && cd .. + reset Metro cache (--reset-cache)
App Store rejection ITMS-91053Missing Apple Privacy ManifestAdd ios/<App>/PrivacyInfo.xcprivacy with 4 API types. See cometchat-native-bare-patterns § 2c
Simulator build fails: "arm64 excluded"Architecture mismatch on Apple SiliconAdd EXCLUDED_ARCHS[sdk=iphonesimulator*] post_install in Podfile. See cometchat-native-features § 3c
Camera/mic permission dialog doesn't appearMissing NSCameraUsageDescription / NSMicrophoneUsageDescriptionAdd to ios/<App>/Info.plist (bare) or app.json ios.infoPlist (Expo)
iOS build fails: "deployment target too low"Calls SDK needs 12+Set IPHONEOS_DEPLOYMENT_TARGET = '12.0' in Podfile post_install
Expo Go crashes: "Main module field cannot be resolved"Expo Go doesn't support native modulesUse dev builds: npx expo run:ios or eas build --profile development

2d. Android build failures

SymptomLikely causeFix
Could not find :react-native-async-storage_async-storage:Local Maven repo entry missingAdd to android/build.gradle allprojects.repositories — see cometchat-native-bare-patterns § 3b
Build crashes on launchcompileSdkVersion too lowSet compileSdkVersion to 33+ and minSdkVersion to 24+ in android/app/build.gradle
"Permission denied" when picking photosMissing Android permissionsAdd READ_MEDIA_IMAGES (API 33+) or READ_EXTERNAL_STORAGE (API ≤32) to AndroidManifest.xml
"Camera permission denied"Missing permission in manifest or runtime denialAdd CAMERA to AndroidManifest.xml + verify runtime-grant flow
Gradle sync fails after npm installNative module autolinking stalecd android && ./gradlew clean && cd .. then rebuild
Unable to delete file: ...node_modules/...Metro lockfile on Windows (if cross-OS)Restart Metro + IDE

2e. Metro / JS runtime

SymptomLikely causeFix
"Unable to resolve module ..." for a dep that IS installedMetro cache staleStop Metro, run with --reset-cache: npx react-native start --reset-cache or npx expo start --clear
Fast Refresh doesn't pick up new depsNative dep change (requires rebuild)Restart Metro + rebuild (iOS/Android)
"Maximum update depth exceeded" after theme changeTheme object recreated each renderDefine theme at module scope or in useMemo(() => ..., [])
App crashes on first JS loadEntry file error (syntax or import order)Check index.jsreact-native-gesture-handler should be line 1

2f. Theming

SymptomLikely causeFix
Theme overrides don't applyMissing CometChatThemeProvider wrapperAdd at app root. See cometchat-native-theming § 2
Dark mode doesn't switch when system toggledmode hardcoded to "light" / "dark"Omit the mode field to follow system
Custom color shows as fallbackColor not a hex stringUse #RRGGBB format. rgb() / named colors / hsl() break the extendedPrimary auto-derivation
Custom font shows system default (iOS) / crashes (Android)Font not loaded before renderGate the provider on font loading (Expo useFonts or bare react-native-asset)
Icon color not changing via imageStyleOnly tintColor, height, width work on default SVG iconsUse tintColor. Other props are ignored for built-in icons
useTheme() returns undefinedCalled outside CometChatThemeProviderEnsure the component is a descendant of the provider

2g. Components

SymptomLikely causeFix
Slot view (TitleView, LeadingView, etc.) renders nothingSlot returned null / undefinedSlot must return valid JSX
Empty message list despite sent messagesuser vs group prop mixed upPass exactly one of user OR group — never both, never neither
"Reply in Thread" option does nothing when tappedThread panel not wiredSet hideReplyInThreadOption (see cometchat-native-components § 11) OR wire a thread panel (§ 2b)
onItemPress callback not firingWrong prop name (RN uses Press not Click)It's onItemPress, not onItemClick — web and RN diverge here
Conversations list empty but data existsWrong request builderCheck conversationsRequestBuilder filters (tags, types)
List components collapse to zero heightContainer has no bounded heightWrap in <View style={{ flex: 1 }}> or explicit height: N. See cometchat-native-placement Hard rule #8
Component renders but data never loadsUser/group passed as UID string instead of CometChat.User/Group instanceawait CometChat.getUser(uid) first, pass the resolved object

2h. Calling

SymptomLikely causeFix
Call buttons missing from MessageHeader@cometchat/calls-sdk-react-native not installedInstall + rebuild. See cometchat-native-features § 3
Incoming call UI doesn't showCometChatIncomingCall not mounted or listener not registeredRegister CometChat.addCallListener(...) and mount <CometChatIncomingCall> at app root
Call connects but no audio/videoMissing Podfile settings or Android SDK versionsCheck IPHONEOS_DEPLOYMENT_TARGET = 12.0 + Android minSdkVersion = 24
WebRTC errors on loadMissing peer depsInstall react-native-webrtc + @react-native-community/netinfo + react-native-background-timer + react-native-callstats
Call crashes on Android after acceptPermissions denied at runtimeRequest RECORD_AUDIO + CAMERA runtime permissions before call
onIncomingCallReceived silentListener registered before login completesRegister the listener INSIDE the useEffect that runs after login

2i. Extensions

SymptomLikely causeFix
Polls option missing from composerExtension not enabled in dashboardcometchat features enable polls --json or toggle in dashboard → Features
Stickers not renderingSticker extension not enabledSame as above — enable via CLI
Extension enabled but UI doesn't appearCached session — hard reload neededStop Metro, clear cache (--reset-cache), rebuild
Extension says enabled but auto_wired_in_uikit: falseNeeds extensions field on CometChatUIKit.init({ ... })Add extensions: [new StickersExtension(), ...] to the init settings — see cometchat-native-features § 2
Message translation "Translate" option missingExtension not enabledEnable MessageTranslation via CLI / dashboard

2j. AI features

SymptomLikely causeFix
AI suggestions don't appearAI feature not enabled in dashboardEnable via dashboard → AI → individual feature
Smart Replies not showingSmart Replies extension offEnable via CLI: cometchat features enable smart-replies
Conversation Starter missingFeature off + no conversation contextEnable feature + ensure chat has at least one previous message

2k. Localization

SymptomLikely causeFix
UI text not translatedLanguage code mismatchUse full codes like en-US, not short en
Auto-detection not workingreact-native-localize missingInstall: npm install react-native-localize + pod install
Custom translations not appliedMissing CometChatI18nProviderWrap app inside CometChatThemeProvider with <CometChatI18nProvider>

2l. Events

SymptomLikely causeFix
Listener doesn't fireWrong event nameCheck docs/events.mdx for exact event names (e.g., ccMessageSent not onMessageSent)
Listener fires twiceDuplicate registration (common with hot reload / remount)Remove in useEffect cleanup: return () => CometChatUIEventHandler.removeMessageListener(id)
Listener ID collisionHardcoded ID reused across componentsUse a unique constant per component: const LISTENER_ID = "APP_SCREEN_LISTENER"
Call events not receivedCometChat.addCallListener registered before loginMove registration into useEffect after login completes

2m. Production / auth tokens

SymptomLikely causeFix
login({ authToken }) fails: "user does not exist"User not created in CometChat before token mintCreate user server-side via REST API on your signup flow. See cometchat-native-production § 6
Token endpoint returns 401Backend auth check failingVerify Authorization: Bearer <jwt> header is attached to the fetch
429 rate limit on token endpointMinting tokens too often (e.g. per screen mount)Cache client-side, reuse until expiry. See cometchat-native-production § 10
SDK disconnects after a few hoursToken expiredWire onDisconnected listener to re-fetch + re-login. See cometchat-native-production § 5c
CometChatUIKit.loginWithAuthToken not foundWrong API nameIt's CometChatUIKit.login({ authToken }) — same method as dev, different key

---

3. Deep dives on common failures

3a. "The most common 'why is my chat blank' bug"

CometChat components fill 100% of their parent's height. If the parent has no bounded height, the components render at 0px and look empty.

Diagnostic:

grep -B5 -A5 "CometChatMessageList\|CometChatConversations" src/**/*.tsx | grep -B2 -A2 "style"

Look for the message list's parent. One of these must be true:

  • Parent has flex: 1
  • Parent has an explicit height: N
  • Parent is a flex column with the list getting flex: 1

Broken example:

<ScrollView>
  <CometChatMessageList user={user} />   {/* ← ScrollView doesn't constrain height */}
</ScrollView>

Fixed:

<View style={{ flex: 1 }}>
  <CometChatMessageList user={user} hideReplyInThreadOption />
</View>

3b. Apple Privacy Manifest rejection (ITMS-91053)

Apple's App Store Connect rejects RN apps that use certain APIs without declaring them in PrivacyInfo.xcprivacy. The CometChat kit (through React Native + react-native-video) triggers 4 of these APIs.

Full manifest content is in cometchat-native-bare-patterns § 2c. Required reason codes:

APICode
FileTimestampC617.1
UserDefaultsCA92.1
SystemBootTime35F9.1
DiskSpaceE174.1

If the user's rejection email lists OTHER API categories, their app uses additional Apple APIs through other SDKs (analytics, crash reporters, etc.). Add those codes too — the CometChat-specific 4 aren't exhaustive for all apps.

After updating: 1. cd ios && pod install && cd .. 2. Rebuild the archive 3. Resubmit

3c. Metro cache issues (post-dep-install "not found" errors)

Happens when you npm install a native module and Metro's bundler still has the old module graph cached.

# Full reset
watchman watch-del-all 2>/dev/null          # watchman (if installed)
rm -rf $TMPDIR/metro-*                       # Metro cache on macOS
rm -rf $TMPDIR/haste-map-*                   # Haste cache on macOS
rm -rf node_modules
npm install
cd ios && pod install && cd ..               # iOS only
npx react-native start --reset-cache         # bare
# OR for Expo:
npx expo start --clear

If the error persists after a clean cache + pod install, the native module isn't autolinked. Check react-native.config.js for exclusions.

3d. "App crashes on first launch" — entry file order

index.js MUST have import "react-native-gesture-handler" as line 1. Not line 2. Not after a // comment. Not after a "use strict". Literally line 1.

Wrong:

import React from "react";              // ← line 1
import "react-native-gesture-handler";  // ← line 2 — TOO LATE

Right:

import "react-native-gesture-handler";  // ← line 1
import React from "react";

For Expo Router, the same rule applies to app/_layout.tsx.

3e. Push notification issues

Push setup is covered end-to-end in cometchat-native-push. That skill has:

  • § 3 APNs p8 setup (Apple Developer portal)
  • § 4 FCM setup (Firebase project + service account)
  • § 5 CometChat dashboard provider upload (dev + prod for iOS)
  • § 7 Client registration with CometChatNotifications.registerPushToken(token, platform, providerId) (the correct API — not CometChat.registerTokenForPushNotification)
  • § 9 Foreground display + tap-to-deep-link handlers
  • § 12 Troubleshooting table mapping symptoms to fixes (production APNs cert missing, token registered before login, Expo Go can't receive push, etc.)

When diagnosing a push issue, route the user to cometchat-native-push § 12 rather than re-triaging here.

---

4. v4 → v5 upgrade gotchas

If the user is upgrading from @cometchat/chat-uikit-react-native@4, these are the common breakages. Full migration guide: docs/upgrading-from-v4.mdx.

v4v5Notes
CometChatContext providerCometChatThemeProvider + CometChatI18nProviderSplit into theme + i18n providers
<CometChatConversationsWithMessages> composite<CometChatConversations> + navigate to separate screenComposite component removed; use two-screen navigation pattern
theme prop on componentsTheme via CometChatThemeProvider onlyPer-component theme prop removed
Palette objectColor tokens under theme.colorRenamed + restructured
onClick callback namesonPress callback namesReact Native convention
CometChat.login(uid, authKey)CometChatUIKit.login({ uid })Object-form argument
Native deps in peerDependenciesMust explicitly install peer depsSee cometchat-native-core § 9
Single NPM package for callsSeparate @cometchat/calls-sdk-react-native packageCalls broken out

Upgrade sequence

# 1. Update the main kit
npm install @cometchat/chat-uikit-react-native@latest

# 2. Install the full peer-dep set (v5 doesn't auto-install them like v4 did)
npm install @cometchat/chat-sdk-react-native \
  @react-native-async-storage/async-storage \
  @react-native-clipboard/clipboard \
  @react-native-community/datetimepicker \
  react-native-gesture-handler react-native-localize \
  react-native-safe-area-context react-native-svg \
  react-native-video dayjs punycode

# 3. iOS
cd ios && pod install && cd ..

# 4. Android — add the local Maven repo for async-storage
#    (see cometchat-native-bare-patterns § 3b)

# 5. Entry file — add `import "react-native-gesture-handler"` as line 1
#    (new requirement in v5)

# 6. Replace `<CometChatContext>` with the 4-wrapper chain
#    (see cometchat-native-core § 3)

# 7. Split composite components — e.g. `<CometChatConversationsWithMessages>`
#    becomes two screens with navigation

# 8. Rename `onClick*` → `onPress*` throughout

# 9. Replace `Palette` → theme tokens

# 10. Rebuild + test

---

5. Escalation — when the above doesn't solve it

If none of the lookup tables or deep dives apply:

1. Read the raw error. RN errors are usually specific ("Module 'X' not found in app 'Y'" is different from "TurboModuleRegistry.getEnforcing"). 2. Check the dev console + native logs. For iOS: Xcode → View → Debug Area → Activate Console. For Android: adb logcat | grep -E "cometchat|CometChat|ReactNative". 3. Search the upstream docs MCP (cometchat-docs if installed). 4. Search the sample app (examples/SampleApp/ or examples/SampleAppExpo/) for a working version of the pattern the user is trying. 5. If the issue is a kit bug, file at https://github.com/cometchat/cometchat-uikit-react-native/issues with a minimal repro.

---

6. Hard rules (diagnostic best-practice)

1. Don't assume — triage first. § 1 gets the framework, wrapper chain, pod state, and dep list before proposing a fix. A "I don't see messages" could be 10 different things. 2. Don't suggest "try reinstalling node_modules" as a first step. It's rarely the actual fix and it takes minutes; check the entry file, wrapper chain, and pod state first. 3. Always verify against the ground-truth doc (troubleshooting.mdx). If a user's symptom matches a table row, use the doc's fix verbatim — don't paraphrase. 4. Never guess a fix that requires code changes without first gathering facts. Changing code based on a wrong hypothesis wastes user time. 5. When recommending a rebuild, say why + what to rebuild. "pod install + rebuild iOS" is more useful than "try rebuilding." 6. If a symptom matches the Apple Privacy Manifest rejection, always paste the full 4-code XML. Don't describe it; show it.

---

Skill routing reference

SkillWhen to route
cometchat-native-coreMost "doesn't work" bugs trace back here — init/login/wrapper chain
cometchat-native-componentsWrong prop / slot view / request builder
cometchat-native-placementBlank chat / bounded-height issues
cometchat-native-expo-patternsExpo-specific build errors (dev client required, expo install)
cometchat-native-bare-patternsBare RN build errors (pod install, Android Maven, privacy manifest)
cometchat-native-themingTheme not applying, dark mode not switching, font not loading
cometchat-native-featuresCalls don't work, extension UI missing after enable
cometchat-native-customizationFormatter not rendering, listener not firing, template not showing
cometchat-native-production401 on token fetch, user-does-not-exist on login
cometchat-native-troubleshootingThis skill — cross-category diagnosis + v4→v5 upgrade

Related skills

Debuggingintegrationsfrontend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.