Skip to main content

Installation & Setup

SymptomCauseFix
CometChatCalls is not definedSDK not installed or not importedRun npm install @cometchat/calls-sdk-javascript and import CometChatCalls
init() fails silentlyInvalid App ID or RegionDouble-check credentials from the CometChat Dashboard
init() throws network errorRegion mismatch or network issueEnsure the Region matches your app’s region (us, eu, in, in-private)
Module not found errorIncorrect import pathUse import { CometChatCalls } from "@cometchat/calls-sdk-javascript"

Authentication

SymptomCauseFix
login() fails with invalid UIDUID doesn’t exist in CometChatCreate the user via Dashboard or REST API first
Auth token expiredToken has a limited lifetimeGenerate a new auth token and call login() again
login() called before init()SDK not initializedAlways await CometChatCalls.init() before calling login()

Joining a Session

SymptomCauseFix
generateToken() failsUser not logged in or invalid session IDEnsure login() completes before generating a token. Verify the session ID is valid
joinSession() shows blank screenContainer element not found or not visibleEnsure the HTML element passed to CallSettings exists in the DOM and has dimensions
Session joins but no audio/videoPermissions denied by browserPrompt the user to allow camera/microphone access. See Permissions Handling
joinSession() throws errorInvalid or expired tokenGenerate a fresh token using generateToken() before joining

Audio & Video

SymptomCauseFix
No audio from remote participantsAudio output device issue or mutedCheck speaker selection and ensure remote participants are not muted
Camera not workingAnother app is using the cameraClose other apps using the camera, or select a different device
Black video tilesBrowser blocked camera accessCheck browser permissions. HTTPS is required in production
Echo or feedbackNo echo cancellationUse headphones or enable browser echo cancellation

Screen Sharing

SymptomCauseFix
Screen share button not workingBrowser doesn’t support getDisplayMediaEnsure the browser supports screen sharing. See Browser Compatibility
Screen share fails silentlyUser cancelled the share dialogNo action needed — this is expected behavior when the user dismisses the dialog
Screen share not visible to othersNetwork or encoding issueCheck network connectivity and try reducing resolution

HTTPS & Deployment

SymptomCauseFix
Camera/mic permissions blockedApp not served over HTTPSUse HTTPS in production. Localhost is exempt during development
WebRTC connection fails behind firewallTURN/STUN servers blockedEnsure your network allows WebRTC traffic. Contact your network admin
SDK works locally but not in productionMixed content or CORS issuesEnsure all resources are loaded over HTTPS

Framework-Specific

SymptomCauseFix
SSR error in Next.jsSDK uses browser APIs (window, navigator)Use dynamic import with ssr: false or wrap in useEffect. See Next.js Integration
Component renders but call UI doesn’t appearContainer element not mounted yetEnsure the DOM element is rendered before calling joinSession()
Hot reload breaks call sessionSDK state lost on HMRRejoin the session after hot reload, or disable HMR during active calls

Events & Callbacks

SymptomCauseFix
Event listener not firingWrong event name or listener not registeredCheck the Events page for exact event names
Duplicate event triggersMultiple listeners registered without cleanupRemove listeners when the component unmounts or before re-registering
onUserJoined not calledListener registered after user already joinedRegister listeners before calling joinSession()