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.

ConstantCodeMessage
INVALID_API_KEY4001apikey provided in the token is empty or invalid, please verify it on the dashboard.
INVALID_TOKEN4002token is empty or invalid or might have expired.
INVALID_MEETING_ID4003meetingId is empty or invalid, please verify it or generate new meetingId using the API.
INVALID_PARTICIPANT_ID4004participantId is empty or invalid, it shouldn't contain any whitespaces.
DUPLICATE_PARTICIPANT4005Leaving meeting, since this participantId joined from another device.
ACCOUNT_DEACTIVATED4006It seems your account is deactivated by VideoSDK for some reason, you can reach out to us at support@videosdk.live.
ACCOUNT_DISCONTINUED4007Server will respond you with specific message.
INVALID_PERMISSIONS4008permissions provided in the token are invalid, please don't use allow_join or allow_mod with ask_join.
MAX_PARTICIPANT_REACHED4009You have reached max participant limit in a meeting.
MAX_SPEAKER_REACHED4010You have reached max speaker limit in a meeting.
START_RECORDING_FAILED4011Recording start request failed due to an unknown error.
STOP_RECORDING_FAILED4012Recording stop request failed due to an unknown error.
START_LIVESTREAM_FAILED4013Livestream start request failed due to an unknown error.
STOP_LIVESTREAM_FAILED4014Livestream stop request failed due to an unknown error.
INVALID_LIVESTREAM_CONFIG4015Livestream 'outputs' configuration provided was invalid.
START_HLS_FAILED4016HLS start request failed due to an unknown error.
STOP_HLS_FAILED4017HLS stop request failed due to an unknown error.
PREV_RECORDING_PROCESSING4018Previous recording session is being processed, please try again after few seconds!
PREV_RTMP_RECORDING_PROCESSING4019Previous RTMP recording session is being processed, please try again after few seconds!
PREV_HLS_STREAMING_PROCESSING4020Previous HLS streaming session is being processed, please try again after few seconds!
MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATION4026You have reached max speaker limit on organization. To increase contact at support@videosdk.live".
MAX_VIEWER_LIMIT_REACHED_ON_ORGANIZATION4027You have reached max viewer limit on organization. To increase contact at support@videosdk.live".
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.
RECORDING_FAILED5001Recording stopped due to an unknown error.
LIVESTREAM_FAILED5002Livestream stopped due to an unknown error.
HLS_FAILED5003HLS stopped due to an unknown error.
RECORDING_DURATION_LIMIT_REACHED5004Recording has been automatically stopped by the system, due to max duration limit of 2 hours reached for a single Recording
LIVESTREAM_DURATION_LIMIT_REACHED5005Livestream has been automatically stopped by the system, due to max duration limit of 2 hours reached for a single RTMP
HLS_DURATION_LIMIT_REACHED5006Hls has been automatically stopped by the system, due to max duration limit of 2 hours reached for a single HLS
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_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_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_CUSTOM_VIDEO_TRACK_ENDED3031The provided custom video track is in an ended state. Please verify the video track's status, and try again.
ERROR_CUSTOM_AUDIO_TRACK_ENDED3032The provided custom audio track is in an ended state. Please verify the audio track's status, and try again.
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.
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_CAMERA_NOT_FOUND3037Please ensure your camera is connected and turned on.
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_MIC_NOT_FOUND3039Please ensure your mic is connected and turned on.
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.
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.

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