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_PARTICIPANT_REACHED | You have reached max participant limit in a meeting. To increase contact at support@videosdk.live' |
4010 | MAX_SPEAKER_REACHED | You have reached max speaker limit in a meeting. To increase contact at support@videosdk.live' |
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! |
4021 | ADD_ON_SERVICES_DISABLED | Add-On services are disabled for your account! Please contact us at support@videosdk.live.! |
4022 | UNAUTHORIZED_MEETING_ID | 'token' is not valid for the provided meetingId |
4023 | UNAUTHORIZED_PARTCIPANT_ID | 'token' is not valid for the provided participantId |
4024 | UNAUTHORIZED_ROLE | Role provided in 'token' is not valid for joining the meeting |
4025 | UNAUTHORIZED_REQUEST | Your request does not match the security configuration |
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. |
4031 | START_TRANSCRIPTION_FAILED | Transcription start request failed due to an unknown error. |
4032 | STOP_TRANSCRIPTION_FAILED | Transcription stop request failed due to an unknown error. |
4035 | START_PARTICIPANT_RECORDING_FAILED | Participant recording start request failed due to an unknown error. |
4036 | STOP_PARTICIPANT_RECORDING_FAILED | Participant recording stop request failed due to an unknown error. |
4037 | START_TRACK_RECORDING_FAILED | Track recording start request failed due to an unknown error. |
4038 | STOP_TRACK_RECORDING_FAILED | Track recording stop request failed due to an unknown error. |
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 4 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 4 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 4 hours reached for a single HLS. |
5007 | TRANSCRIPTION_FAILED | Transcription stopped due to an unknown error. |
5012 | PARTICIPANT_RECORDING_FAILED | Participant recording stopped due to an unknown error. |
5013 | TRACK_RECORDING_FAILED | Track recording stopped due to an unknown error. |
3001 | ERROR_ACTION_PERFORMED_BEFORE_MEETING_JOINED | The meeting is not connected yet. All actions on meeting should be performed after meeting is joined successfully. |
3002 | ERROR_CAMERA_ACCESS | Something went wrong. Unable to access camera. |
3003 | ERROR_MIC_ACCESS_DENIED | It seems like microphone access was denied or dismissed. To proceed, kindly grant access through your device's settings. |
3004 | ERROR_CAMERA_ACCESS_DENIED | It seems like camera access was denied or dismissed. To proceed, kindly grant access through your device's settings. |
3005 | ERROR_CUSTOM_SCREEN_SHARE_TRACK_ENDED | The provided custom track is in an ended state. Please try again with new custom track. |
3006 | ERROR_CUSTOM_SCREEN_SHARE_TRACK_DISPOSED | The provided custom track was disposed. Please try again with new custom track. |
3007 | ERROR_CHANGE_WEBCAM | Something went wrong, and the camera could not be changed. Please try again. |
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