ErrorCode enum Null safety

Error codes occur when the SDK encounters an error that cannot be recovered automatically without any app intervention.

Constants

Abort → const ErrorCode

The SDK gave up the request due to too many requests.

@JsonValue(20)
const ErrorCode(18)
AdmGeneralError → const ErrorCode

Audio Device Module: A general error occurs in the Audio Device Module (the reason is not classified specifically). Check if the audio device is used by another app, or try rejoining the channel.

@JsonValue(1005)
const ErrorCode(54)
AdmInitLoopback → const ErrorCode

Audio Device Module: An error occurs in initializing the loopback device.

@JsonValue(1022)
const ErrorCode(68)
AdmInitPlayout → const ErrorCode

Audio Device Module: An error occurs in initializing the playback device.

@JsonValue(1008)
const ErrorCode(57)
AdmInitRecording → const ErrorCode

Audio Device Module: An error occurs in initializing the recording device.

@JsonValue(1011)
const ErrorCode(60)
AdmJavaResource → const ErrorCode

Audio Device Module: An error occurs in using the Java resources.

@JsonValue(1006)
const ErrorCode(55)
AdmNoPermission → const ErrorCode

Audio Device Module: An error occurs in no recording Permission.

@JsonValue(1027)
const ErrorCode(70)
AdmNoPlayoutDevice → const ErrorCode

No playback device exists.

@JsonValue(1360)
const ErrorCode(73)
AdmNoRecordingDevice → const ErrorCode

Audio Device Module: No recording device exists.

@JsonValue(1359)
const ErrorCode(72)
AdmPlayAbnormalFrequency → const ErrorCode

Audio Device Module: Abnormal audio playback frequency.

@JsonValue(1020)
const ErrorCode(66)
AdmRecordAbnormalFrequency → const ErrorCode

Audio Device Module: Abnormal audio recording frequency.

@JsonValue(1021)
const ErrorCode(67)
AdmRecordAudioFailed → const ErrorCode

Audio Device Module: Fails to record.

@JsonValue(1018)
const ErrorCode(65)
AdmRuntimePlayoutError → const ErrorCode

Audio Device Module: A playback error occurs. Check your playback device, or try rejoining the channel.

@JsonValue(1015)
const ErrorCode(63)
AdmRuntimeRecordingError → const ErrorCode

Audio Device Module: A recording error occurs.

@JsonValue(1017)
const ErrorCode(64)
AdmSampleRate → const ErrorCode

Audio Device Module: An error occurs in setting the sampling frequency.

@JsonValue(1007)
const ErrorCode(56)
AdmStartLoopback → const ErrorCode

Audio Device Module: An error occurs in starting the loopback device.

@JsonValue(1023)
const ErrorCode(69)
AdmStartPlayout → const ErrorCode

Audio Device Module: An error occurs in starting the playback device.

@JsonValue(1009)
const ErrorCode(58)
AdmStartRecording → const ErrorCode

Audio Device Module: An error occurs in starting the recording device.

@JsonValue(1012)
const ErrorCode(61)
AdmStopPlayout → const ErrorCode

Audio Device Module: An error occurs in stopping the playback device.

@JsonValue(1010)
const ErrorCode(59)
AdmStopRecording → const ErrorCode

Audio Device Module: An error occurs in stopping the recording device.

@JsonValue(1013)
const ErrorCode(62)
AlreadyInRecording → const ErrorCode

The client is already recording audio. To start a new recording, call RtcEngine.stopAudioRecording to stop the current recording first, and then call RtcEngine.startAudioRecording.

@JsonValue(160)
const ErrorCode(49)
AlreadyInUse → const ErrorCode

The resources are occupied and cannot be used.

@JsonValue(19)
const ErrorCode(17)
AudioBtScoFailed → const ErrorCode

Audio Routing: Fails to route the audio to the connected Bluetooth device. The default route is used.

@JsonValue(1030)
const ErrorCode(71)
BindSocket → const ErrorCode

The SDK fails to bind to the network socket. This is for internal SDK use only, and is not returned to the app through any method or callback.

@JsonValue(13)
const ErrorCode(12)
BitrateLimit → const ErrorCode

The bitrate of the sent data exceeds the limit of 6 Kbps when the user calls the RtcEngine.sendStreamMessage method.

@JsonValue(115)
const ErrorCode(30)
BufferTooSmall → const ErrorCode

The buffer size is not big enough to store the returned data.

@JsonValue(6)
const ErrorCode(6)
Canceled → const ErrorCode

The request is canceled. This is for internal SDK use only, and is not returned to the app through any method or callback.

@JsonValue(11)
const ErrorCode(10)
ClientIsBannedByServer → const ErrorCode

The client is banned by the server.

@JsonValue(123)
const ErrorCode(33)
ConnectionInterrupted → const ErrorCode

The Internet connection is interrupted. This applies to the Agora Web SDK only.

@JsonValue(111)
const ErrorCode(26)
ConnectionLost → const ErrorCode

The Internet connection is lost. This applies to the Agora Web SDK only.

@JsonValue(112)
const ErrorCode(27)
DecryptionFailed → const ErrorCode

Decryption fails. The user may have used a different encryption password to join the channel. Check your settings or try rejoining the channel.

@JsonValue(120)
const ErrorCode(32)
EncryptedStreamNotAllowedPublish → const ErrorCode

The encrypted stream is not allowed to publish.

@JsonValue(130)
const ErrorCode(40)
Failed → const ErrorCode

A general error occurs (no specified reason).

@JsonValue(1)
const ErrorCode(1)
InitNetEngine → const ErrorCode

In Windows, specific firewall settings cause the SDK to fail to initialize and crash.

@JsonValue(21)
const ErrorCode(19)
InvalidAppId → const ErrorCode

The specified App ID is invalid. Please try to rejoin the channel with a valid App ID.

@JsonValue(101)
const ErrorCode(21)
InvalidArgument → const ErrorCode

An invalid parameter is used. For example, the specific channel name includes illegal characters.

@JsonValue(2)
const ErrorCode(2)
InvalidChannelId → const ErrorCode

The specified channel name is invalid. Please try to rejoin the channel with a valid channel name.

@JsonValue(102)
const ErrorCode(22)
InvalidToken → const ErrorCode

The token is invalid. Agora recommends that you use ConnectionChangedReason.InvalidToken in the reason parameter of RtcEngineEventHandler.connectionStateChanged instead.

Possible reasons are:

  • The App Certificate for the project is enabled in Console, but the user is using the App ID. Once the App Certificate is enabled, the user must use a token.
  • The uid is mandatory, and users must set the same uid as the one set in the RtcEngine.joinChannel method.
@JsonValue(110)
const ErrorCode(25)
InvalidUserAccount → const ErrorCode

The user account is invalid.

@JsonValue(134)
const ErrorCode(41)
JoinChannelRejected → const ErrorCode

The request to join the channel is rejected. Possible reasons are:

  • The user is already in the channel, and still calls the API method to join the channel, for example, RtcEngine.joinChannel.
  • The user tries joining the channel during the echo test. Please join the channel after the echo test ends.
@JsonValue(17)
const ErrorCode(15)
LeaveChannelRejected → const ErrorCode

The request to leave the channel is rejected. Possible reasons are:

  • The user left the channel and still calls the API method to leave the channel, for example, RtcEngine.leaveChannel.
  • The user has not joined the channel and calls the API method to leave the channel.
@JsonValue(18)
const ErrorCode(16)
LoadMediaEngine → const ErrorCode

Fails to load the media engine.

@JsonValue(1001)
const ErrorCode(50)
ModuleNotFound → const ErrorCode

The extension library is not integrated, such as the library for enabling deep-learning noise reduction.

@JsonValue(157)
const ErrorCode(48)
NetDown → const ErrorCode

The network is unavailable. This is for internal SDK use only, and is not returned to the app through any method or callback.

@JsonValue(14)
const ErrorCode(13)
NoBufs → const ErrorCode

No network buffers are available. This is for internal SDK use only, and is not returned to the app through any method or callback.

@JsonValue(15)
const ErrorCode(14)
NoError → const ErrorCode

No error occurs.

@JsonValue(0)
const ErrorCode(0)
NoPermission → const ErrorCode

No permission exists. Check whether the user has granted access to the audio or video device.

@JsonValue(9)
const ErrorCode(8)
NoServerResources → const ErrorCode

103: Fails to get server resources in the specified region. Please try to specify another region.

@JsonValue(103)
const ErrorCode(23)
NotInChannel → const ErrorCode

The user is not in the channel when calling the RtcEngine.sendStreamMessage or RtcEngine.getUserInfoByUserAccount method.

@JsonValue(113)
const ErrorCode(28)
NotInitialized → const ErrorCode

The SDK is not initialized before calling this method.

@JsonValue(7)
const ErrorCode(7)
NotReady → const ErrorCode

The SDK module is not ready. Possible solutions:

  • Check the audio device.
  • Check the completeness of the app.
  • Re-initialize the SDK.
@JsonValue(3)
const ErrorCode(3)
NotSupported → const ErrorCode

The current state of the SDK does not support this function.

@JsonValue(4)
const ErrorCode(4)
PublishStreamCDNError → const ErrorCode

CDN related errors. Remove the original URL address and add a new one by calling the RtcEngine.removePublishStreamUrl and RtcEngine.addPublishStreamUrl methods.

@JsonValue(151)
const ErrorCode(42)
PublishStreamFormatNotSuppported → const ErrorCode

The format of the RTMP stream URL is not supported. Check whether the URL format is correct.

@JsonValue(156)
const ErrorCode(47)
PublishStreamInternalServerError → const ErrorCode

An error occurs in Agora’s streaming server. Call the addPublishStreamUrl method to publish the stream again.

See RtcEngine.addPublishStreamUrl

@JsonValue(154)
const ErrorCode(45)
PublishStreamNotAuthorized → const ErrorCode

The host manipulates other hosts' URLs. Check your app logic.

@JsonValue(153)
const ErrorCode(44)
PublishStreamNotFound → const ErrorCode

The server fails to find the stream.

@JsonValue(155)
const ErrorCode(46)
PublishStreamNumReachLimit → const ErrorCode

The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones.

@JsonValue(152)
const ErrorCode(43)
Refused → const ErrorCode

The request is rejected. This is for internal SDK use only, and is not returned to the app through any method or callback.

@JsonValue(5)
const ErrorCode(5)
ResourceLimited → const ErrorCode

The app uses too much of the system resources and the SDK fails to allocate the resources.

@JsonValue(22)
const ErrorCode(20)
SizeTooLarge → const ErrorCode

The size of the sent data is over 1024 bytes when the user calls the RtcEngine.sendStreamMessage method.

@JsonValue(114)
const ErrorCode(29)
StartCall → const ErrorCode

Fails to start the call after enabling the media engine.

@JsonValue(1002)
const ErrorCode(51)
StartCamera → const ErrorCode

Fails to start the camera. Agora recommends that you use LocalVideoStreamError.CaptureFailure in the error parameter of RtcEngineEventHandler.localVideoStateChanged instead.

@JsonValue(1003)
const ErrorCode(52)
StartVideoRender → const ErrorCode

Fails to start the video rendering module.

@JsonValue(1004)
const ErrorCode(53)
TimedOut → const ErrorCode

An API method timeout occurs. Some API methods require the SDK to return the execution result, and this error occurs if the request takes too long (over 10 seconds) for the SDK to process.

@JsonValue(10)
const ErrorCode(9)
TokenExpired → const ErrorCode

The token expired. Agora recommends that you use ConnectionChangedReason.TokenExpired in the reason parameter of RtcEngineEventHandler.connectionStateChanged instead.

Possible reasons are:

  • Authorized Timestamp expired: The timestamp is represented by the number of seconds elapsed since 1/1/1970. The user can use the token to access the Agora service within five minutes after the token is generated. If the user does not access the Agora service after five minutes, this token is no longer valid.
  • Call Expiration Timestamp expired: The timestamp is the exact time when a user can no longer use the Agora service (for example, when a user is forced to leave an ongoing call). When a value is set for the Call Expiration Timestamp, it does not mean that the token will expire, but that the user will be banned from the channel.
@JsonValue(109)
const ErrorCode(24)
TooManyDataStreams → const ErrorCode

Too many data streams (over five streams) are created when the user calls the RtcEngine.createDataStream method.

@JsonValue(116)
const ErrorCode(31)
TooOften → const ErrorCode

The method is called too often. This is for internal SDK use only, and is not returned to the app through any method or callback.

@JsonValue(12)
const ErrorCode(11)
values → const List<ErrorCode>

A constant List of the values in this enum, in order of their declaration.

const List<ErrorCode>
VcmEncoderEncodeError → const ErrorCode

Video Device Module: An error occurs in video encoding.

@JsonValue(1602)
const ErrorCode(77)
VcmEncoderInitError → const ErrorCode

Video Device Module: An error occurs in initializing the video encoder.

@JsonValue(1601)
const ErrorCode(76)
VcmEncoderSetError → const ErrorCode

Video Device Module: An error occurs in setting the video encoder.

@JsonValue(1603)
const ErrorCode(78)
VcmUnknownError → const ErrorCode

Video Device Module: An unknown error occurs.

@JsonValue(1600)
const ErrorCode(75)
VdmCameraNotAuthorized → const ErrorCode

Video Device Module: The camera is unauthorized.

@JsonValue(1501)
const ErrorCode(74)
WatermarkAGRB → const ErrorCode

Incorrect watermark file data format.

@JsonValue(128)
const ErrorCode(38)
WatermarkInfo → const ErrorCode

Incorrect watermark file information.

@JsonValue(127)
const ErrorCode(37)
WatermarkParam → const ErrorCode

Incorrect watermark file parameter.

@JsonValue(124)
const ErrorCode(34)
WatermarkPath → const ErrorCode

Incorrect watermark file path.

@JsonValue(125)
const ErrorCode(35)
WatermarkPng → const ErrorCode

Incorrect watermark file format.

@JsonValue(126)
const ErrorCode(36)
WatermarkRead → const ErrorCode

An error occurs in reading the watermark file.

@JsonValue(129)
const ErrorCode(39)

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited