Error Events - React
VideoSDK provides the onError()
event which informs you about any error happening during the meeting.
onError()
- This event is triggered whenever an invalid configuration is provided or server/network errors arise. In such cases, the event will trigger with a specific error code and message.
- It is particularly useful for development-level troubleshooting during SDK integration.
- It can be subscribed to using the
useMeeting
hook.
Example
Here is an example demonstrating the usage of the event mentioned on this page.
import { Constants, useMeeting } from "@videosdk.live/react-sdk";
function onError(data) {
const { code, message } = data;
}
const {
meetingId
...
} = useMeeting({
onerror,
...
});
Error Codes
We have provided a specific constant along with the corresponding code and message in the table below.
1. Errors associated with Organization
This table lists errors that occur due to the configuration and limitations within your organization’s account. These include account status, participant limits, and add-on service availability.
Type | Code | Message |
---|---|---|
ACCOUNT_DEACTIVATED | 4006 | Your account has been deactivated. Please contact VideoSDK support. |
ACCOUNT_DISCONTINUED | 4007 | Your account has been discontinued. Please reach out to support for more details. |
MAX_PARTICIPANT_REACHED | 4009 | You have reached the maximum participant limit for this meeting. |
MAX_SPEAKER_REACHED | 4010 | The maximum number of speakers for this meeting has been reached. |
MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATION | 4026 | Your organization has reached the maximum number of speakers allowed. |
MAX_VIEWER_LIMIT_REACHED_ON_ORGANIZATION | 4027 | Your organization has reached the maximum number of viewers allowed. |
ADD_ON_SERVICES_DISABLED | 4021 | Add-On services have been disabled. Please contact support to enable them. |
MAX_RECORDING_LIMIT_REACHED_ON_ORGANIZATION | 4028 | You have reached max limit of recording on organization. To increase contact at support@videosdk.live |
MAX_HLS_LIMIT_REACHED_ON_ORGANIZATION | 4029 | You have reached max limit of hls on organization. To increase contact at support@videosdk.live |
MAX_LIVESTREAM_LIMIT_REACHED_ON_ORGANIZATION | 4030 | You have reached max limit of livestream on organization. To increase contact at support@videosdk.live |
2. Errors associated with Token
Errors listed here are related to issues with the API key, authentication tokens, or permissions assigned to users. These errors can occur when tokens are missing, expired, or improperly configured.
Type | Code | Message |
---|---|---|
INVALID_API_KEY | 4001 | The provided API key is either missing or invalid. |
INVALID_TOKEN | 4002 | The provided token is empty, invalid, or has expired. |
INVALID_PERMISSIONS | 4008 | The permissions in the token are incorrect. Please verify them. |
UNAUTHORIZED_MEETING_ID | 4022 | The provided token is not authorized for this meeting ID. |
UNAUTHORIZED_PARTICIPANT_ID | 4023 | The provided token is not authorized for this participant ID. |
UNAUTHORIZED_ROLE | 4024 | The role specified in the token is not valid for joining this meeting. |
UNAUTHORIZED_REQUEST | 4025 | Your request does not match the security configuration. |
3. Errors associated with Meeting and Participant
This table lists errors resulting from invalid or missing meeting or participant details, including cases where a participant attempts to join with a duplicate ID.
Type | Code | Message |
---|---|---|
INVALID_MEETING_ID | 4003 | The meeting ID provided is either invalid or missing. |
INVALID_PARTICIPANT_ID | 4004 | The participant ID is either invalid or missing. |
DUPLICATE_PARTICIPANT | 4005 | This participant has joined from another device. |
4. Errors associated with Add-on Service
This section addresses errors that occur while using VideoSDK's add-on services such as recording, livestreaming, HLS streaming, and transcription.
Recording-related errors
Type | Code | Message |
---|---|---|
START_RECORDING_FAILED | 4011 | Failed to start recording. Please try again. |
STOP_RECORDING_FAILED | 4012 | Failed to stop recording. Please try again. |
RECORDING_FAILED | 5001 | Recording was stopped due to an error. |
START_PARTICIPANT_RECORDING_FAILED | 4035 | Failed to start participant recording. Please check the request. |
STOP_PARTICIPANT_RECORDING_FAILED | 4036 | Failed to stop participant recording. |
PARTICIPANT_RECORDING_FAILED | 5012 | Participant recording has stopped due to an error. |
START_TRACK_RECORDING_FAILED | 4037 | Failed to start track recording. |
STOP_TRACK_RECORDING_FAILED | 4038 | Failed to stop track recording. |
TRACK_RECORDING_FAILED | 5013 | Track recording stopped due to an unknown error. |
PREV_RECORDING_PROCESSING | 4018 | Previous recording session is being processed, please try again after few seconds. |
RECORDING_DURATION_LIMIT_REACHED | 5004 | Recording stopped due to maximum duration being reached. |
Livestream-related errors
Type | Code | Message |
---|---|---|
INVALID_LIVESTREAM_CONFIG | 4015 | Livestream 'outputs' configuration provided was invalid |
START_LIVESTREAM_FAILED | 4013 | Failed to start livestream. Please try again. |
STOP_LIVESTREAM_FAILED | 4014 | Failed to stop livestream. Please try again. |
LIVESTREAM_FAILED | 5002 | Livestream stopped due to an error. |
PREV_RTMP_RECORDING_PROCESSING | 4019 | Previous RTMP recording session is being processed, please try again after few seconds! |
LIVESTREAM_DURATION_LIMIT_REACHED | 5005 | Livestream stopped due to maximum duration being reached. |
HLS-related errors
Type | Code | Message |
---|---|---|
START_HLS_FAILED | 4016 | Failed to start HLS stream. |
STOP_HLS_FAILED | 4017 | Failed to stop HLS stream. |
HLS_FAILED | 5003 | HLS streaming stopped due to an error. |
PREV_HLS_STREAMING_PROCESSING | 4020 | Previous HLS streaming session is still being processed. |
HLS_DURATION_LIMIT_REACHED | 5006 | HLS stream stopped due to maximum duration being reached. |
Transcription-related errors
Type | Code | Message |
---|---|---|
START_TRANSCRIPTION_FAILED | 4031 | Failed to start transcription. Please try again. |
STOP_TRANSCRIPTION_FAILED | 4032 | Failed to stop transcription. |
TRANSCRIPTION_FAILED | 5007 | Transcription stopped due to an error. |
5.Errors associated with Media
These errors involve media access, device availability, or permission-related issues affecting camera, microphone, and screen sharing.
Device permission-related errors
Type | Code | Message |
---|---|---|
ERROR_GET_VIDEO_MEDIA_PERMISSION_DENIED | 3014 | Permission for video capture has been denied. |
ERROR_GET_AUDIO_MEDIA_PERMISSION_DENIED | 3015 | Permission for audio capture has been denied. |
ERROR_GET_DISPLAY_MEDIA_PERMISSION_DENIED | 3016 | Permission for screen sharing has been denied. |
ERROR_CAMERA_ACCESS_DENIED_OR_DISMISSED | 3017 | Oops! It seems like camera access was denied or dismissed. To proceed, kindly grant access through your browser settings. |
ERROR_MICROPHONE_ACCESS_DENIED_OR_DISMISSED | 3018 | Oops! It seems like microphone access was denied or dismissed. To proceed, kindly grant access through your browser settings. |
ERROR_CAMERA_ACCESS_UNAVAILABLE | 3033 | Camera access is unavailable. |
ERROR_MICROPHONE_ACCESS_UNAVAILABLE | 3034 | Microphone access is unavailable. |
ERROR_CAMERA_PERMISSION_DENIED_BY_OS | 3019 | Camera permission has been denied by the operating system. |
ERROR_MICROPHONE_PERMISSION_DENIED_BY_OS | 3020 | Microphone permission has been denied by the operating system. |
ERROR_CAMERA_PERMISSION_OR_AUTOPLAY_ISSUE | 3025 | It seems like there's an issue with camera permission or video autoplay, you can check out this link for details: http://tinyurl.com/autoplay-issue |
ERROR_VIDEO_SOURCE_INITIATION_FAILED | 3026 | Unable to initiate video source. Please verify browser settings for video permissions. |
Device-related errors
Type | Code | Message |
---|---|---|
ERROR_GET_VIDEO_MEDIA | 3011 | Your browser/Device does not support Video. |
ERROR_GET_AUDIO_MEDIA | 3012 | Your browser/Device does not support Audio. |
ERROR_GET_DISPLAY_MEDIA | 3013 | Your browser/Device does not support Screen Sharing. |
ERROR_CAMERA_NOT_FOUND | 3021 | Camera not found. Please ensure it's properly connected. |
ERROR_MICROPHONE_NOT_FOUND | 3022 | Microphone not found. Please ensure it's properly connected. |
ERROR_CAMERA_IN_USE | 3023 | Camera is already in use by another application. |
ERROR_MICROPHONE_IN_USE | 3024 | Microphone is already in use by another application. |
6.Errors associated with Track
These errors occur when there are issues with video or audio tracks, such as disconnections or invalid custom tracks.
Type | Code | Message |
---|---|---|
ERROR_WEBCAM_TRACK_ENDED | 3027 | Webcam track has ended or the webcam is disconnected. Please ensure your webcam is properly connected and try restarting it. |
ERROR_MICROPHONE_TRACK_ENDED | 3028 | Microphone track has ended or the microphone is disconnected. Please check your microphone connection and try again. |
ERROR_INVALID_CUSTOM_VIDEO_TRACK | 3029 | The provided custom video track is invalid; reverting to the default video track. Please ensure that the video track meets the required specifications. |
ERROR_INVALID_CUSTOM_AUDIO_TRACK | 3030 | The provided custom audio track is invalid; reverting to the default audio track. Please ensure that the audio track meets the required specifications. |
ERROR_CUSTOM_VIDEO_TRACK_ENDED | 3031 | The provided custom video track is in an ended state. Please verify the video track's status, and try again. |
ERROR_CUSTOM_AUDIO_TRACK_ENDED | 3032 | The provided custom audio track is in an ended state. Please verify the audio track's status, and try again. |
7.Errors associated with Actions
Below error is triggered when an action is attempted before joining a meeting.
Type | Code | Message |
---|---|---|
ERROR_ACTION_PERFORMED_BEFORE_MEETING_JOINED | 3035 | Oops! Something went wrong. The room was in a connecting state, and during that time, an action encountered an issue. Please try again after joining a meeting. |
API Reference
The API references for all the methods and events utilized in this guide are provided below.
Got a Question? Ask us on discord