Skip to main content
Version: 0.1.x

Error Events - Android

VideoSDK provides onError event which will notify you of any error happening during the meeting.

onError

  • This event will be triggered whenever any invalid configuration provided or server/network errors arise, this event will trigger with a specific error code and message.
  • This event is helpful for development level troubleshooting while integrating SDK.
  • You can implement this method of the abstract Class MeetingEventListener and add the listener to Meeting class using the addEventListener() method of Meeting Class.

Example

Here is the usage of the event mentioned in this page.

private val meetingEventListener: MeetingEventListener = object : MeetingEventListener() {
//..
override fun onError(error: JSONObject) {
try {
val errorCodes: JSONObject = VideoSDK.getErrorCodes()
val code = error.getInt("code")
Log.d("#error", "Error is: " + error["message"])
} catch (e: Exception) {
e.printStackTrace()
}
}
}

Error Codes

We have depicted a specific constant with code and message in the below table.

CodeTypeMessage
4001INVALID_API_KEY'apikey' provided in the token is empty or invalid, please verify it on the dashboard.
4002INVALID_TOKEN'token' is empty or invalid or might have expired.
4003INVALID_MEETING_ID'meetingId' is empty or invalid, please verify it or generate new meetingId using the API.
4004INVALID_PARTICIPANT_ID'participantId' is empty or invalid, it shouldn't contain any whitespaces.
4005DUPLICATE_PARTICIPANTLeaving meeting, since this 'participantId' joined from another device.
4006ACCOUNT_DEACTIVATEDIt seems your account is deactivated by VideoSDK for some reason, you can reach out to us at support@videosdk.live.
4007ACCOUNT_DISCONTINUEDServer will respond you with specific message.
4008INVALID_PERMISSIONS'permissions' provided in the token are invalid, please don't use 'allow_join' or 'allow_mod' with 'ask_join'.
4009MAX_PARTCIPANT_REACHEDYou have reached max partcipant limit in a meeting.
4010MAX_SPEAKER_REACHEDYou have reached max speaker limit in a meeting.
4011START_RECORDING_FAILEDRecording start request failed due to an unknown error.
4012STOP_RECORDING_FAILEDRecording stop request failed due to an unknown error.
4013START_LIVESTREAM_FAILEDLivestream start request failed due to an unknown error.
4014STOP_LIVESTREAM_FAILEDLivestream stop request failed due to an unknown error.
4015INVALID_LIVESTREAM_CONFIGLivestream 'outputs' configuration provided was invalid.
4016START_HLS_FAILEDHLS start request failed due to an unknown error.
4017STOP_HLS_FAILEDHLS stop request failed due to an unknown error.
4018PREV_RECORDING_PROCESSINGPrevious recording session is being processed, please try again after few seconds.
4019PREV_RTMP_RECORDING_PROCESSINGPrevious RTMP recording session is being processed, please try again after few seconds!
4020PREV_HLS_STREAMING_PROCESSINGPrevious HLS streaming session is being processed, please try again after few seconds!
4026MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATIONYou have reached max speaker limit on organization. To increase contact at support@videosdk.live
4027MAX_VIEWER_LIMIT_REACHED_ON_ORGANIZATIONYou have reached max viewer limit on organization. To increase contact at support@videosdk.live
4028MAX_RECORDING_LIMIT_REACHED_ON_ORGANIZATIONYou have reached max limit of recording on organization. To increase contact at support@videosdk.live
4029MAX_HLS_LIMIT_REACHED_ON_ORGANIZATIONYou have reached max limit of hls on organization. To increase contact at support@videosdk.live
4030MAX_LIVESTREAM_LIMIT_REACHED_ON_ORGANIZATIONYou have reached max limit of livestream on organization. To increase contact at support@videosdk.live
5001RECORDING_FAILEDRecording stopped due to an unknown error.
5002LIVESTREAM_FAILEDLivestream stopped due to an unknown error.
5003HLS_FAILEDHLS stopped due to an unknown error.
5004RECORDING_DURATION_LIMIT_REACHEDRecording has been automatically stopped by the system, due to max duration limit of 2 hours reached for a single Recording.
5005LIVESTREAM_DURATION_LIMIT_REACHEDLivestream has been automatically stopped by the system, due to max duration limit of 2 hours reached for a single RTMP.
5006HLS_DURATION_LIMIT_REACHEDHls has been automatically stopped by the system, due to max duration limit of 2 hours reached for a single HLS.

API Reference

The API references for all the methods and events utilised in this guide are provided below.

Got a Question? Ask us on discord