ErrorCodeType
Error codes.
Error codes indicate that the SDK has encountered an unrecoverable error requiring application intervention. For example, an error is returned when the camera fails to open, and the app needs to notify the user that the camera cannot be used.
Enumerations
- errOk
- 0: No error.
- errFailed
- 1: General error (uncategorized error cause). Please try calling the method again.
- errInvalidArgument
- 2: Invalid parameter set in the method. For example, the specified channel name contains illegal characters. Please reset the parameters.
- errNotReady
- 3: SDK is not ready. Possible reasons include:
- RtcEngine initialization failed. Please reinitialize RtcEngine.
- User has not joined the channel when calling the method. Please check the method call logic.
- User has not left the channel when calling rate or complain. Please check the method call logic.
- Audio module is not enabled.
- Incomplete assembly.
- errNotSupported
- 4: The current state of RtcEngine does not support this operation. Possible reasons include:
- When using built-in encryption, the encryption mode is incorrect or loading the external encryption library failed. Please check whether the encryption enum value is correct or reload the external encryption library.
- errRefused
- 5: This method call was rejected. Possible reasons include:
- RtcEngine initialization failed. Please reinitialize RtcEngine.
- An empty string
""was set as the channel name when joining the channel. Please reset the channel name. - In multi-channel scenarios, the specified channel name already exists when calling joinChannelEx to join a channel. Please reset the channel name.
- errBufferTooSmall
- 6: Buffer size is insufficient to hold the returned data.
- errNotInitialized
- 7: Method is called before RtcEngine is initialized. Please ensure that the RtcEngine object is created and initialized before calling this method.
- errInvalidState
- 8: Invalid current state.
- errNoPermission
- 9: No permission to operate. Please check whether the user has granted the app permission to use audio and video devices.
- errTimedout
- 10: Method call timed out. Some method calls require a result from the SDK. If the SDK takes too long to process the event and does not return within 10 seconds, this error occurs.
- errJoinChannelRejected
- 17: Joining the channel was rejected. Possible reasons include:
- The user is already in the channel. It is recommended to determine whether the user is in the channel via the onConnectionStateChanged callback. Do not call this method again to join the channel unless receiving the
connectionStateDisconnected(1) state. - After calling startEchoTest for a call test, the user attempts to join the channel without calling stopEchoTest to end the current test. After starting the call test, you must call stopEchoTest to end the test before joining the channel.
- The user is already in the channel. It is recommended to determine whether the user is in the channel via the onConnectionStateChanged callback. Do not call this method again to join the channel unless receiving the
- errLeaveChannelRejected
- 18: Failed to leave the channel. Possible reasons include:
- The user has already left the channel before calling leaveChannel. Stop calling this method.
- The user calls leaveChannel to exit the channel without having joined it. No further action is needed in this case.
- errAlreadyInUse
- 19: The resource is already in use and cannot be reused.
- errAborted
- 20: SDK aborted the request, possibly due to too many requests.
- errInitNetEngine
- 21: Specific firewall settings on Windows caused RtcEngine initialization to fail and crash.
- errResourceLimited
- 22: SDK failed to allocate resources, possibly because the app is using too many resources or system resources are exhausted.
- errInvalidAppId
- 101: Invalid App ID. Please use a valid App ID to rejoin the channel.
- errInvalidChannelName
- 102: Invalid channel name. Possible reason is incorrect data type set for the parameter. Please use a valid channel name to rejoin the channel.
- errNoServerResources
- 103: Unable to obtain server resources in the current region. Try specifying a different region when initializing RtcEngine.
- errTokenExpired
- 109: The current Token has expired and is no longer valid. Please request a new Token from the server and call renewToken to update it.
Note: Deprecated: This enum is deprecated. Use
connectionChangedTokenExpired(9) in the onConnectionStateChanged callback instead. - errInvalidToken
-
Note: Deprecated: This enum is deprecated. Use110: Invalid Token. Common reasons include:
connectionChangedInvalidToken(8) in the onConnectionStateChanged callback instead.- App certificate is enabled in the console, but App ID + Token authentication is not used. When the project enables the App certificate, Token authentication must be used.
- The
uidfield used when generating the Token does not match theuidused when the user joins the channel.
- errConnectionInterrupted
- 111: Network connection interrupted. SDK lost network connection for more than 4 seconds after establishing a connection with the server.
- errConnectionLost
- 112: Network connection lost. The network was interrupted and the SDK could not reconnect to the server within 10 seconds.
- errNotInChannel
- 113: User is not in the channel when calling the sendStreamMessage method.
- errSizeTooLarge
- 114: The data length exceeds 1 KB when calling sendStreamMessage.
- errBitrateLimit
- 115: The data sending frequency exceeds the limit (6 KB/s) when calling sendStreamMessage.
- errTooManyDataStreams
- 116: The number of data streams created exceeds the limit (5) when calling createDataStream.
- errStreamMessageTimeout
- 117: Data stream sending timed out.
- errSetClientRoleNotAuthorized
- 119: Failed to switch user role. Please try rejoining the channel.
- errDecryptionFailed
- 120: Media stream decryption failed. Possibly due to an incorrect key used when the user joined the channel. Please check the key entered when joining the channel or guide the user to try rejoining.
- errInvalidUserId
- 121: Invalid user ID.
- errDatastreamDecryptionFailed
- 122: Data stream decryption failed. Possibly due to an incorrect key used when the user joined the channel. Please check the key entered when joining the channel or guide the user to try rejoining.
- errClientIsBannedByServer
- 123: The user is banned by the server.
- errEncryptedStreamNotAllowedPublish
- 130: The SDK does not support pushing encrypted streams to CDN.
- errInvalidUserAccount
- 134: Invalid user account, possibly due to invalid parameters.
- errPcmsendFormat
- 200: Unsupported PCM format.
- errPcmsendBufferoverflow
- 201: Buffer overflow, PCM sending rate is too fast.
- errLoadMediaEngine
- 1001: Failed to load media engine.
- errAdmGeneralError
- 1005: Audio device error (unspecified). Please check whether the audio device is occupied by another application, or try rejoining the channel.
- errAdmInitPlayout
- 1008: Error initializing playback device. Please check whether the playback device is occupied by another application, or try rejoining the channel.
- errAdmStartPlayout
- 1009: Error starting playback device. Please check whether the playback device is functioning properly.
- errAdmStopPlayout
- 1010: Error stopping playback device.
- errAdmInitRecording
- 1011: Error initializing recording device. Please check whether the recording device is functioning properly, or try rejoining the channel.
- errAdmStartRecording
- 1012: Error starting recording device. Please check whether the recording device is functioning properly.
- errAdmStopRecording
- 1013: Error stopping recording device.
- errVdmCameraNotAuthorized
- 1501: No permission to use the camera. Please check whether camera permission is enabled.