ErrorCodeType enum

Error codes.

An error code indicates that the SDK encountered an unrecoverable error that requires application intervention. For example, an error is returned when the camera fails to open, and the app needs to inform the user that the camera cannot be used.

Inheritance
Annotations
  • @JsonEnum(alwaysCreate: true)

Constructors

ErrorCodeType()
const

Values

errOk → const ErrorCodeType

0: No error.

errFailed → const ErrorCodeType

1: General error with no classified reason. Try calling the method again.

errInvalidArgument → const ErrorCodeType

2: An invalid parameter is used. For example, the specified channel name includes illegal characters. Reset the parameter.

errNotReady → const ErrorCodeType

3: The SDK is not ready. Possible reasons include the following: The initialization of RtcEngine fails. Reinitialize the RtcEngine. No user has joined the channel when the method is called. Check the code logic. The user has not left the channel when the rate or complain method is called. Check the code logic. The audio module is disabled. The program is not complete.

errNotSupported → const ErrorCodeType

4: The RtcEngine does not support the request. Possible reasons include the following: The built-in encryption mode is incorrect, or the SDK fails to load the external encryption library. Check the encryption mode setting, or reload the external encryption library.

errRefused → const ErrorCodeType

5: The request is rejected. Possible reasons include the following: The RtcEngine initialization fails. Reinitialize the RtcEngine. The channel name is set as the empty string "" when joining the channel. Reset the channel name. When the joinChannelEx method is called to join multiple channels, the specified channel name is already in use. Reset the channel name.

errBufferTooSmall → const ErrorCodeType

6: The buffer size is insufficient to store the returned data.

errNotInitialized → const ErrorCodeType

7: A method is called before the initialization of RtcEngine. Ensure that the RtcEngine object is initialized before using this method.

errInvalidState → const ErrorCodeType

8: Invalid state.

errNoPermission → const ErrorCodeType

9: Permission to access is not granted. Check whether your app has access to the audio and video device.

errTimedout → const ErrorCodeType

10: A timeout occurs. Some API calls require the SDK to return the execution result. This error occurs if the SDK takes too long (more than 10 seconds) to return the result.

errJoinChannelRejected → const ErrorCodeType

17: The request to join the channel is rejected. Possible reasons include the following: The user is already in the channel. Agora recommends that you use the onConnectionStateChanged callback to determine whether the user exists in the channel. Do not call this method to join the channel unless you receive the connectionStateDisconnected (1) state. After calling startEchoTest for the call test, the user tries to join the channel without calling stopEchoTest to end the current test. To join a channel, the call test must be ended by calling stopEchoTest.

errLeaveChannelRejected → const ErrorCodeType

18: Fails to leave the channel. Possible reasons include the following: The user has left the channel before calling the leaveChannel method. Stop calling this method to clear this error. The user calls the leaveChannel method to leave the channel before joining the channel. In this case, no extra operation is needed.

errAlreadyInUse → const ErrorCodeType

19: Resources are already in use.

errAborted → const ErrorCodeType

20: The request is abandoned by the SDK, possibly because the request has been sent too frequently.

errInitNetEngine → const ErrorCodeType

21: The RtcEngine fails to initialize and has crashed because of specific Windows firewall settings.

errResourceLimited → const ErrorCodeType

22: The SDK fails to allocate resources because your app uses too many system resources or system resources are insufficient.

errInvalidAppId → const ErrorCodeType

101: The specified App ID is invalid. Rejoin the channel with a valid App ID.

errInvalidChannelName → const ErrorCodeType

102: The specified channel name is invalid. A possible reason is that the parameter's data type is incorrect. Rejoin the channel with a valid channel name.

errNoServerResources → const ErrorCodeType

103: Fails to get server resources in the specified region. Try another region when initializing RtcEngine.

errTokenExpired → const ErrorCodeType

109: The current token has expired. Apply for a new token on the server and call renewToken. Deprecated: This enumerator is deprecated. Use connectionChangedTokenExpired (9) in the onConnectionStateChanged callback instead.

errInvalidToken → const ErrorCodeType

110: Invalid token. Typical reasons include the following: App Certificate is enabled in Agora Console, but the code still uses App ID for authentication. Once App Certificate is enabled for a project, you must use token-based authentication. The uid used to generate the token is not the same as the uid used to join the channel. Deprecated: This enumerator is deprecated. Use connectionChangedInvalidToken (8) in the onConnectionStateChanged callback instead.

errConnectionInterrupted → const ErrorCodeType

111: The network connection is interrupted. The SDK triggers this callback when it loses connection with the server for more than four seconds after the connection is established.

errConnectionLost → const ErrorCodeType

112: The network connection is lost. Occurs when the SDK cannot reconnect to Agora's edge server 10 seconds after its connection to the server is interrupted.

errNotInChannel → const ErrorCodeType

113: The user is not in the channel when calling the sendStreamMessage method.

errSizeTooLarge → const ErrorCodeType

114: The data size exceeds 1 KB when calling the sendStreamMessage method.

errBitrateLimit → const ErrorCodeType

115: The data bitrate exceeds 6 KB/s when calling the sendStreamMessage method.

errTooManyDataStreams → const ErrorCodeType

116: More than five data streams are created when calling the createDataStream method.

errStreamMessageTimeout → const ErrorCodeType

117: The data stream transmission times out.

errSetClientRoleNotAuthorized → const ErrorCodeType

119: Switching roles fails, try rejoining the channel.

errDecryptionFailed → const ErrorCodeType

120: Decryption fails. The user might have entered an incorrect password to join the channel. Check the entered password, or tell the user to try rejoining the channel.

errInvalidUserId → const ErrorCodeType

121: The user ID is invalid.

errClientIsBannedByServer → const ErrorCodeType

123: The user is banned from the server.

errEncryptedStreamNotAllowedPublish → const ErrorCodeType

130: The SDK does not support pushing encrypted streams to CDN.

errInvalidUserAccount → const ErrorCodeType

134: The user account is invalid, possibly because it contains invalid parameters.

errLoadMediaEngine → const ErrorCodeType

1001: The SDK fails to load the media engine.

errAdmGeneralError → const ErrorCodeType

1005: A general error occurs (no specified reason). Check whether the audio device is already in use by another app, or try rejoining the channel.

errAdmInitPlayout → const ErrorCodeType

1008: An error occurs when initializing the playback device. Check whether the playback device is already in use by another app, or try rejoining the channel.

errAdmStartPlayout → const ErrorCodeType

1009: An error occurs when starting the playback device. Check the playback device.

errAdmStopPlayout → const ErrorCodeType

1010: An error occurs when stopping the playback device.

errAdmInitRecording → const ErrorCodeType

1011: An error occurs when initializing the recording device. Check the recording device, or try rejoining the channel.

errAdmStartRecording → const ErrorCodeType

1012: An error occurs when starting the recording device. Check the recording device.

errAdmStopRecording → const ErrorCodeType

1013: An error occurs when stopping the recording device.

errVdmCameraNotAuthorized → const ErrorCodeType

1501: Permission to access the camera is not granted. Check whether permission to access the camera permission is granted.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<ErrorCodeType>
A constant List of the values in this enum, in order of their declaration.