Error Codes

Error code will be json object of { error_code:error_message }

Common errors

Code Message
100 Please check your internet connection
101 Error in connection
102 You must be logged in
103 Error at parsing json
104 Error at initializing settings
105 Log in error in heartbeat
    Possible reason:
  1. The chatlogin() and getUserId() functions of integration.php are not returning same value.
  2. The getUserId() function is not configured to accept values from mobileapp.
106 The file does not exist on the given path.
107 Exception is thrown
    Possible reason:
  1. null values are passed to functions, json parsing exceptions.
108 CometChat is not installed at specified url
109 Please configure Translate Conversation module on CometChat admin panel
111 Sticker plugin is not enabled on your CometChat
112 User is not found

Login error

Code Message
200 Incorrect user id (server returns 0)
201 Invalid user details (Server returned empty response)
202 Invalid url or response for login is incorrect
    Possible reason:
  1. chatlogin() function of integration.php is not configured
203 Sorry, CometChat needs to be upgraded on the site to use this sdk.
    Possible reason:
  1. Old version of CometChat detected, version must be 5.4+, also there may be issue like some html/php warnings, echo,404 page is getting mix with the login response
204 Incorrect username or password

One-on-One error

Code Message
300 An error occurred while blocking user
    Possible reason:
  1. Server returns 0 , either user is already blocked or server error
301 An error occurred while unblocking user
    Possible reason:
  1. Server returns 0 , either user is not blocked or server error
303 Text broadcast module is not enabled for your CometChat.
304 CometService is not enabled for your CometChat
305 Typing feature is not enabled.
    Possible reason:
  1. CometChat version may be less than 5.7
  2. Typing feature is not enabled from CometChat administraion panel. Login to administration panel-> Settings -> CometService -> Enable the CometService-> Enable “use isTyping service”

Chatroom error

Code Message
400 You have not joined any chatroom
401 This chatroom can’t be created, it may exists.
402 Please enter correct password for chatroom
    Possible reason:
  1. Incorrect password provided while joining password protected chatroom
403 You are banned from this chatroom
404 Please check your chatroom id
405 This chatroom does not exist

AVChat error

Code Message
500 Audio/Video Chat plugin not enabled
501 User provided for Audio/Video Chat call is incorrect
502 No Call Details found
    Possible reasons:
  1. In case of group conference you are calling startConference() function before join or sendRequest
  2. In case of Audio/Video Chat this error will occur when you call startAVChatCall() function before sending call request or accepting call request, or trying to reject, cancel the call even if there is no call
503 Container is empty
504 Your device does not support this feature

Not finding what you need?

The CometChat team is here to help!