Skip to main content
Version: 0.1.x

Error Events - React Native

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-native-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.

TypeCodeMessage
ACCOUNT_DEACTIVATED4006Your account has been deactivated. Please contact VideoSDK support.
ACCOUNT_DISCONTINUED4007Your account has been discontinued. Please reach out to support for more details.
MAX_PARTICIPANT_REACHED4009You have reached the maximum participant limit for this meeting.
MAX_SPEAKER_REACHED4010The maximum number of speakers for this meeting has been reached.
MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATION4026Your organization has reached the maximum number of speakers allowed.
MAX_VIEWER_LIMIT_REACHED_ON_ORGANIZATION4027Your organization has reached the maximum number of viewers allowed.
ADD_ON_SERVICES_DISABLED4021Add-On services have been disabled. Please contact support to enable them.
MAX_RECORDING_LIMIT_REACHED_ON_ORGANIZATION4028You have reached max limit of recording on organization. To increase contact at support@videosdk.live
MAX_HLS_LIMIT_REACHED_ON_ORGANIZATION4029You have reached max limit of hls on organization. To increase contact at support@videosdk.live
MAX_LIVESTREAM_LIMIT_REACHED_ON_ORGANIZATION4030You 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.

TypeCodeMessage
INVALID_API_KEY4001The provided API key is either missing or invalid.
INVALID_TOKEN4002The provided token is empty, invalid, or has expired.
INVALID_PERMISSIONS4008The permissions in the token are incorrect. Please verify them.
UNAUTHORIZED_MEETING_ID4022The provided token is not authorized for this meeting ID.
UNAUTHORIZED_PARTICIPANT_ID4023The provided token is not authorized for this participant ID.
UNAUTHORIZED_ROLE4024The role specified in the token is not valid for joining this meeting.
UNAUTHORIZED_REQUEST4025Your 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.

TypeCodeMessage
INVALID_MEETING_ID4003The meeting ID provided is either invalid or missing.
INVALID_PARTICIPANT_ID4004The participant ID is either invalid or missing.
DUPLICATE_PARTICIPANT4005This 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.

TypeCodeMessage
START_RECORDING_FAILED4011Failed to start recording. Please try again.
STOP_RECORDING_FAILED4012Failed to stop recording. Please try again.
RECORDING_FAILED5001Recording was stopped due to an error.
START_PARTICIPANT_RECORDING_FAILED4035Failed to start participant recording. Please check the request.
STOP_PARTICIPANT_RECORDING_FAILED4036Failed to stop participant recording.
PARTICIPANT_RECORDING_FAILED5012Participant recording has stopped due to an error.
START_TRACK_RECORDING_FAILED4037Failed to start track recording.
STOP_TRACK_RECORDING_FAILED4038Failed to stop track recording.
TRACK_RECORDING_FAILED5013Track recording stopped due to an unknown error.
PREV_RECORDING_PROCESSING4018Previous recording session is being processed, please try again after few seconds.
RECORDING_DURATION_LIMIT_REACHED5004Recording stopped due to maximum duration being reached.
TypeCodeMessage
INVALID_LIVESTREAM_CONFIG4015Livestream 'outputs' configuration provided was invalid
START_LIVESTREAM_FAILED4013Failed to start livestream. Please try again.
STOP_LIVESTREAM_FAILED4014Failed to stop livestream. Please try again.
LIVESTREAM_FAILED5002Livestream stopped due to an error.
PREV_RTMP_RECORDING_PROCESSING4019Previous RTMP recording session is being processed, please try again after few seconds!
LIVESTREAM_DURATION_LIMIT_REACHED5005Livestream stopped due to maximum duration being reached.
TypeCodeMessage
START_HLS_FAILED4016Failed to start HLS stream.
STOP_HLS_FAILED4017Failed to stop HLS stream.
HLS_FAILED5003HLS streaming stopped due to an error.
PREV_HLS_STREAMING_PROCESSING4020Previous HLS streaming session is still being processed.
HLS_DURATION_LIMIT_REACHED5006HLS stream stopped due to maximum duration being reached.
TypeCodeMessage
START_TRANSCRIPTION_FAILED4031Failed to start transcription. Please try again.
STOP_TRANSCRIPTION_FAILED4032Failed to stop transcription.
TRANSCRIPTION_FAILED5007Transcription 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.

TypeCodeMessage
ERROR_GET_VIDEO_MEDIA_PERMISSION_DENIED3014Video capture permission denied.
ERROR_GET_AUDIO_MEDIA_PERMISSION_DENIED3015Audio capture permission denied.
ERROR_GET_DISPLAY_MEDIA_PERMISSION_DENIED3016Screen sharing permission denied.
ERROR_RN_CAMERA_ACCESS_DENIED_OR_DISMISSED3036Oops! It seems like camera access was denied or dismissed. To proceed, kindly grant access through your App settings.
ERROR_RN_MIC_ACCESS_DENIED_OR_DISMISSED3038Oops! It seems like mic access was denied or dismissed. To proceed, kindly grant access through your App settings.
ERROR_RN_CAMERA_ACCESS_UNAVAILABLE3040Camera access unavailable: Please ensure your device is compatible.
ERROR_RN_MIC_ACCESS_UNAVAILABLE3041Microphone access unavailable: Please ensure your device is compatible.
TypeCodeMessage
ERROR_GET_VIDEO_MEDIA3011Your browser/Device does not support Video.
ERROR_GET_AUDIO_MEDIA3012Your browser/Device does not support Audio.
ERROR_GET_DISPLAY_MEDIA3013Your browser/Device does not support Screen Sharing.
ERROR_RN_CAMERA_NOT_FOUND3037Please ensure your camera is connected and turned on.
ERROR_RN_MIC_NOT_FOUND3039Please ensure your mic is connected and turned on.

6.Errors associated with Track

These errors occur when there are issues with video or audio tracks, such as disconnections or invalid custom tracks.

TypeCodeMessage
ERROR_INVALID_CUSTOM_VIDEO_TRACK3029The 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_TRACK3030The provided custom audio track is invalid; reverting to the default audio track. Please ensure that the audio track meets the required specifications.
ERROR_RN_CAMERA_TRACK_ENDED3042Camera track has ended. Please make sure your camera is turned on or try restarting it.
ERROR_RN_MIC_TRACK_ENDED3043Microphone track has ended or the microphone is disconnected. Please check your microphone connection and try again.

7.Errors associated with Actions

Below error is triggered when an action is attempted before joining a meeting.

TypeCodeMessage
ERROR_ACTION_PERFORMED_BEFORE_MEETING_JOINED3035Oops! 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 utilised in this guide are provided below.

Got a Question? Ask us on discord