Skip to main content
Version: 1.2.x

Error Events - Flutter

VideoSDK provides the error event which informs you about any error happening during the meeting.

Events.error

  • 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 VideoSDK and the Room object for errors from the respective methods.
  • Both VideoSDK and Room objects emit different errors. Users need to set up listeners for errors from both objects to ensure comprehensive error handling and troubleshooting.

Example

Here is an example demonstrating the usage of the event mentioned on this page.

import 'dart:developer';

import 'package:flutter/material.dart';
import 'package:videosdk/videosdk.dart';

class MeetingScreen extends StatefulWidget {
//Existing configuration
}

class _MeetingScreenState extends State<MeetingScreen> {
late Room room;

@override
void initState() {
//Existing configuration

setupVideoSDKEventListener();
setupRoomEventListener();
}

@override
Widget build(BuildContext context) {
return YourMeetingWidget();
}

void setupVideoSDKEventListener() {
VideoSDK.on(Events.error, (error) {
log("VIDEOSDK ERROR :: ${error['code']} :: ${error['name']} :: ${error['message']}");
});
}

void setupRoomEventListener() {
room.on(Events.error, (error) {
log("VIDEOSDK ERROR :: ${error['code']} :: ${error['name']} :: ${error['message']}");
});
}
}

Error Codes

We have depicted a specific constant with code and message in the below table.

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_DISCONTINUED4007_Server 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!
ADD_ON_SERVICES_DISABLED4021Add-On services are disabled for your account! Please contact us at support@videosdk.live.
UNAUTHORIZED_MEETING_ID4022You have reached max speaker limit on organization. To increase contact at support@videosdk.live".
UNAUTHORIZED_PARTCIPANT_ID4023You have reached max speaker limit on organization. To increase contact at support@videosdk.live".
MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATION4024You have reached max speaker limit on organization. To increase contact at support@videosdk.live".
MAX_SPEAKER_LIMIT_REACHED_ON_ORGANIZATION4025You have reached max speaker limit on organization. To increase contact at support@videosdk.live".
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.
START_TRANSCRIPTION_FAILED4031Transcription start request failed due to an unknown error.
STOP_TRANSCRIPTION_FAILED4032Transcription stop request failed due to an unknown error.
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
TRANSCRIPTION_FAILED5007Transcription stopped due to an unknown error.
ERROR_CUSTOM_VIDEO_TRACK_DISPOSED3001The provided custom video track has been disposed of, and is now in an ended state. Reverting to the default video track.
ERROR_CUSTOM_AUDIO_TRACK_DISPOSED3002The provided custom audio track has been disposed of, and is now in an ended state. Reverting to the default audio track.
ERROR_CAMERA_IN_USE3003The camera is being used by another application. Please close any programs utilizing the camera, such as video conferencing tools, screen recording software, or other browsers. Restart your browser and attempt again.
ERROR_MICROPHONE_IN_USE3004The microphone is being used by another application. Please close any programs utilizing the microphone, such as video conferencing tools, screen recording software, or other browsers. Restart your browser and attempt again.
ERROR_CAMERA_ACCESS_UNAVAILABLE3005Camera access unavailable: Please ensure your device is compatible and that you're on a secure website (https://).
ERROR_MICROPHONE_ACCESS_UNAVAILABLE3006Microphone access unavailable: Please ensure your device is compatible and that you're on a secure website (https://).
ERROR_CAMERA_ACCESS_DENIED_OR_DISMISSED3007Camera access was denied or dismissed. To proceed, kindly grant access manually through your device/browser settings.
ERROR_MICROPHONE_ACCESS_DENIED_OR_DISMISSED3008Microphone access was denied or dismissed. To proceed, kindly grant access through your device/browser settings.
ERROR_CAMERA_PERMISSION_DENIED_BY_OS3009Camera permission denied by OS system settings. Please check the system settings and grant permission for this browser.
ERROR_MICROPHONE_PERMISSION_DENIED_BY_OS3010Microphone permission denied by OS system settings. Please check the system settings and grant permission for this browser.
ERROR_STARTING_VIDEO3011Something went wrong, and the webCam could not be enabled. Please try again.
ERROR_STARTING_AUDIO3012Something went wrong, and the microphone could not be enabled. Please try again.
ERROR_STARTING_SCREENSHARE3013Something went wrong, and the screenshare could not be enabled. Please try again.
ERROR_SCREENSHARE_PERMISSION_DENIED3014Screen sharing permission was denied. To enable screen sharing, please try again and grant the necessary permissions.
ERROR_SCREENSHARE_NOT_SUPPORTED3015Screenshare not supported: Unable to generate a screenshare stream. Please ensure your device/browser is compatible.
ERROR_STARTING_FOREGROUND_SERVICE3016An error occurred while initializing the foreground service, preventing screenshare from being enabled. Please try again.
ERROR_CREATING_VIDEO_TRACK3017An error occurred while creating the video track. Please try again.
ERROR_CREATING_AUDIO_TRACK3018An error occurred while creating the audio track. Please try again.
ERROR_CAMERA_DEVICE_INCOMPATIBLE3019Camera device cannot produce video: Unable to produce video stream. Please ensure your device is compatible.
ERROR_MICROPHONE_DEVICE_INCOMPATIBLE3020Microphone device cannot produce audio: Unable to produce audio stream. Please ensure your device is compatible.
ERROR_CHANGING_MODE3021Something went wrong, and the mode could not be changed. Please try again.
ERROR_ACTION_PERFORMED_BEFORE_MEETING_JOINED3022Something 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_JOINING_MEETING3023Something went wrong. The meeting could not be joined. Please try again.

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