Skip to main content
Version: 2.x.x

Error Event - React Native

Whenever any invalid configuration provided or server/network errors arise, this event will trigger with a specific error code and message.

The tables below list each constant with its code and message.

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_ROOM_ID4003roomId is empty or invalid, please verify it or generate new roomId 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_PARTCIPANT_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_CAMERA_ACCESS_DENIED_OR_DISMISSED3017Oops! It seems like camera access was denied or dismissed. To proceed, kindly grant access through your browser settings.
ERROR_MICROPHONE_ACCESS_DENIED_OR_DISMISSED3018Oops! It seems like microphone access was denied or dismissed. To proceed, kindly grant access through your browser settings.
ERROR_CAMERA_NOT_FOUND3021Please ensure your camera is connected and turned on, and that the camera driver is installed and up-to-date.

Camera and microphone failures arrive with general codes such as the ones above. When access was already denied in iOS Settings, you get ERROR_CAMERA_PERMISSION_DENIED_BY_OS (3019) or ERROR_MICROPHONE_PERMISSION_DENIED_BY_OS (3020). A device with no camera or microphone gives ERROR_NO_WEBCAM_DEVICE_FOUND (3051) or ERROR_NO_MICROPHONE_DEVICE_FOUND (3059). The React Native–specific ERROR_RN_* codes (3036 to 3043) are still in Constants.VideoSDKError, but they are no longer reported. For every code, see Room Error Codes.

Event Code​

import { Constants, useRoom } from "@videosdk.live/react-native-sdk";

const RoomView = () => {
const {
/** Properties and Methods */
} = useRoom({
onError: (data) => {
const { code, message } = data;

// Get Constant from SDK which contain value of error Code
const { INVALID_TOKEN, INVALID_ROOM_ID } = Constants.VideoSDKError;

switch (Number(code)) {
case INVALID_TOKEN:
console.log(`Error is ${message}`);
break;

case INVALID_ROOM_ID:
console.log(`Error is ${message}`);
break;

default:
break;
}
},
});

return <>...</>;
};

Got a Question? Ask us on discord


Was this helpful?

Not helpfulHelpful