Repro — enableCalling: true without the Calls SDK crashes the app at launch
Kit: com.cometchat:chatuikit-compose-android:6.0.5 (crash path is in the shared
chatuikit-core, so chatuikit-kotlin-android is affected identically)
Device: Pixel 8 emulator, API 36 · Observed: 2026-08-21
Steps
- New Android app,
minSdk 28, Kotlin DSL. Add the CometChat maven tosettings.gradle.kts: - Add only the UI Kit — deliberately no
calls-sdk-android: - Create
app/src/main/assets/cometchat-settings.jsonwith valid credentials and the calling flag ON. Credentials must be valid — the crash occurs after chat init succeeds: - In
MainActivity.onCreate, call init — nothing else is required: - Build, install, launch.
Expected
Either init succeeds with calling silently unavailable, oronError fires with an actionable
message naming the missing dependency.
Actual
Process dies inonCreate, before any UI renders. Neither onSuccess nor onError is called —
the throw escapes the callback.
Confirming the cause
Set"enableCalling": false, change nothing else, rebuild → init OK then login OK, app runs
normally. Flip it back → crash returns.
Why it matters
- The symptom (app will not start at all) is maximally distant from the cause (one boolean in a JSON asset). Nothing in the flag’s name implies a Gradle dependency.
- It compiles cleanly, so no build-time gate can catch it.
- It is trivially hit by copying
cometchat-settings.jsonbetween projects — which is how it was found here. onErroris not invoked, so an app that correctly handles init failure still dies.
Suggested fix
GuardinitCometChatCalls so a missing Calls SDK routes to callbackListener.onError(...) with a
message naming the required dependency, rather than propagating NoClassDefFoundError. Unlike the
CometChatCallLogs case (where a missing dependency legitimately cannot work), here calling is an
optional feature the app may never use — a launch crash is disproportionate.