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 toMeeting
class using theaddEventListener()
method ofMeeting
Class.
Example
Here is the usage of the event mentioned in this page.
- Kotlin
- Java
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()
}
}
}
private final MeetingEventListener meetingEventListener = new MeetingEventListener() {
//..
@Override
public void onError(JSONObject error) {
try {
JSONObject errorCodes = VideoSDK.getErrorCodes();
int code = error.getInt("code");
Log.d("#error", "Error is: " + error.get("message"));
} catch (Exception e) {
e.printStackTrace();
}
}
};
Error Codes
We have depicted a specific constant with code and message in the below table.
Code | Type | Message |
---|---|---|
4001 | INVALID_API_KEY | 'apikey' provided in the token is empty or invalid, please verify it on the dashboard. |
4002 | INVALID_TOKEN | 'token' is empty or invalid or might have expired. |
4003 | INVALID_MEETING_ID | 'meetingId' is empty or invalid, please verify it or generate new meetingId using the API. |
4004 | INVALID_PARTICIPANT_ID | 'participantId' is empty or invalid, it shouldn't contain any whitespaces. |
4005 | DUPLICATE_PARTICIPANT | Leaving meeting, since this 'participantId' joined from another device. |
4006 | ACCOUNT_DEACTIVATED | It seems your account is deactivated by VideoSDK for some reason, you can reach out to us at support@videosdk.live. |
4007 | ACCOUNT_DISCONTINUED | Server will respond you with specific message. |
4008 | INVALID_PERMISSIONS | 'permissions' provided in the token are invalid, please don't use 'allow_join' or 'allow_mod' with 'ask_join'. |
4009 | MAX_PARTCIPANT_REACHED | You have reached max partcipant limit in a meeting. |
4010 | MAX_SPEAKER_REACHED | You have reached max speaker limit in a meeting. |
4011 | START_RECORDING_FAILED | Recording start request failed due to an unknown error. |
4012 | STOP_RECORDING_FAILED | Recording stop request failed due to an unknown error. |
4013 | START_LIVESTREAM_FAILED | Livestream start request failed due to an unknown error. |
4014 | STOP_LIVESTREAM_FAILED | Livestream stop request failed due to an unknown error. |
4015 | INVALID_LIVESTREAM_CONFIG | Livestream 'outputs' configuration provided was invalid. |
4016 | START_HLS_FAILED | HLS start request failed due to an unknown error. |
4017 | STOP_HLS_FAILED | HLS stop request failed due to an unknown error. |
4018 | PREV_RECORDING_PROCESSING | Previous recording session is being processed, please try again after few seconds. |
4019 | PREV_RTMP_RECORDING_PROCESSING | Previous RTMP recording session is being processed, please try again after few seconds! |
4020 | PREV_HLS_STREAMING_PROCESSING | Previous HLS streaming session is being processed, please try again after few seconds! |
4026 | MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATION | You have reached max speaker limit on organization. To increase contact at support@videosdk.live |
4027 | MAX_VIEWER_LIMIT_REACHED_ON_ORGANIZATION | You have reached max viewer limit on organization. To increase contact at support@videosdk.live |
4028 | MAX_RECORDING_LIMIT_REACHED_ON_ORGANIZATION | You have reached max limit of recording on organization. To increase contact at support@videosdk.live |
4029 | MAX_HLS_LIMIT_REACHED_ON_ORGANIZATION | You have reached max limit of hls on organization. To increase contact at support@videosdk.live |
4030 | MAX_LIVESTREAM_LIMIT_REACHED_ON_ORGANIZATION | You have reached max limit of livestream on organization. To increase contact at support@videosdk.live |
5001 | RECORDING_FAILED | Recording stopped due to an unknown error. |
5002 | LIVESTREAM_FAILED | Livestream stopped due to an unknown error. |
5003 | HLS_FAILED | HLS stopped due to an unknown error. |
5004 | RECORDING_DURATION_LIMIT_REACHED | Recording has been automatically stopped by the system, due to max duration limit of 2 hours reached for a single Recording. |
5005 | LIVESTREAM_DURATION_LIMIT_REACHED | Livestream has been automatically stopped by the system, due to max duration limit of 2 hours reached for a single RTMP. |
5006 | HLS_DURATION_LIMIT_REACHED | Hls 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