ERROR_CODE_TYPE
Error codes.
Error codes indicate that the SDK has encountered an unrecoverable error and requires intervention from the application. 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
- ERR_OK
- 0: No error.
- ERR_FAILED
- 1: A general error (no specific classification of the cause). Please try calling the method again.
- ERR_INVALID_ARGUMENT
- 2: Invalid parameter set in the method. For example, the specified channel name contains illegal characters. Please reset the parameters.
- ERR_NOT_READY
- 3: SDK is not ready. Possible reasons include:
- IRtcEngine initialization failed. Please reinitialize IRtcEngine.
- 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.
- ERR_NOT_SUPPORTED
- 4: The current state of IRtcEngine does not support the 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.
- ERR_REFUSED
- 5: This method call was rejected. Possible reasons include:
- IRtcEngine initialization failed. Please reinitialize IRtcEngine.
- Channel name is set to an empty string
""when joining the channel. Please reset the channel name. - In multi-channel scenarios, the specified channel name already exists when calling JoinChannelEx. Please reset the channel name.
- ERR_BUFFER_TOO_SMALL
- 6: Buffer size is insufficient to hold the returned data.
- ERR_NOT_INITIALIZED
- 7: IRtcEngine method called before initialization. Please ensure that the IRtcEngine object is created and initialized before calling the method.
- ERR_INVALID_STATE
- 8: Invalid current state.
- ERR_NO_PERMISSION
- 9: No permission to operate. Please check whether the user has granted the app permission to use audio and video devices.
- ERR_TIMEDOUT
- 10: Method call timed out. Some method calls require a result from the SDK. If the SDK takes too long (over 10 seconds) to respond, this error occurs.
- ERR_JOIN_CHANNEL_REJECTED
- 17: Join channel request rejected. Possible reasons include:
- User is already in the channel. It is recommended to use the OnConnectionStateChanged callback to determine whether the user is in the channel. Do not call this method again to join the channel unless receiving
CONNECTION_STATE_DISCONNECTED(1). - After calling StartEchoTest for a call test, the user tries to join a channel without first calling StopEchoTest to end the test. You must call StopEchoTest before joining a channel.
- User is already in the channel. It is recommended to use the OnConnectionStateChanged callback to determine whether the user is in the channel. Do not call this method again to join the channel unless receiving
- ERR_LEAVE_CHANNEL_REJECTED
- 18: Failed to leave the channel. Possible reasons include:
- User has already left the channel before calling LeaveChannel [2/2]. You can stop calling this method.
- User has not joined the channel but calls LeaveChannel [2/2]. No additional action is required in this case.
- ERR_ALREADY_IN_USE
- 19: Resource already in use and cannot be reused.
- ERR_ABORTED
- 20: SDK aborted the request, possibly due to too many requests.
- ERR_INIT_NET_ENGINE
- 21: On Windows, specific firewall settings cause IRtcEngine initialization to fail and crash.
- ERR_RESOURCE_LIMITED
- 22: SDK failed to allocate resources, possibly due to excessive app resource usage or system resource exhaustion.
- ERR_INVALID_APP_ID
- 101: Invalid App ID. Please use a valid App ID to rejoin the channel.
- ERR_INVALID_CHANNEL_NAME
- 102: Invalid channel name. Possible reason is incorrect data type of the parameter. Please use a valid channel name to rejoin the channel.
- ERR_NO_SERVER_RESOURCES
- 103: Unable to acquire server resources in the current region. Try specifying a different region when initializing IRtcEngine.
- ERR_TOKEN_EXPIRED
- 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
CONNECTION_CHANGED_TOKEN_EXPIRED(9) in the OnConnectionStateChanged callback instead. - ERR_INVALID_TOKEN
-
Note: Deprecated: This enum is deprecated. Use110: Invalid Token. Possible reasons include:
CONNECTION_CHANGED_INVALID_TOKEN(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 to generate the Token does not match theuidused when the user joins the channel.
- ERR_CONNECTION_INTERRUPTED
- 111: Network connection interrupted. SDK lost connection for more than 4 seconds after establishing a connection with the server.
- ERR_CONNECTION_LOST
- 112: Network connection lost. Connection interrupted and SDK fails to reconnect to the server within 10 seconds.
- ERR_NOT_IN_CHANNEL
- 113: User is not in the channel when calling SendStreamMessage.
- ERR_SIZE_TOO_LARGE
- 114: Data length exceeds 1 KB when calling SendStreamMessage.
- ERR_BITRATE_LIMIT
- 115: Data sending frequency exceeds the limit (6 KB/s) when calling SendStreamMessage.
- ERR_TOO_MANY_DATA_STREAMS
- 116: Number of data streams exceeds the limit (5) when calling CreateDataStream [2/2].
- ERR_STREAM_MESSAGE_TIMEOUT
- 117: Data stream sending timed out.
- ERR_SET_CLIENT_ROLE_NOT_AUTHORIZED
- 119: Failed to switch user role. Please try rejoining the channel.
- ERR_DECRYPTION_FAILED
- 120: Media stream decryption failed. Possibly due to incorrect key used when joining the channel. Please check the key entered when joining or guide the user to rejoin the channel.
- ERR_INVALID_USER_ID
- 121: Invalid user ID.
- ERR_DATASTREAM_DECRYPTION_FAILED
- 122: Data stream decryption failed. Possibly due to incorrect key used when joining the channel. Please check the key entered when joining or guide the user to rejoin the channel.
- ERR_CLIENT_IS_BANNED_BY_SERVER
- 123: This user is banned by the server.
- ERR_ENCRYPTED_STREAM_NOT_ALLOWED_PUBLISH
- 130: SDK does not support publishing encrypted streams to CDN.
- ERR_INVALID_USER_ACCOUNT
- 134: Invalid user account, possibly due to invalid parameters.
- ERR_LOAD_MEDIA_ENGINE
- 1001: Failed to load media engine.
- ERR_PCMSEND_FORMAT
- 200: Unsupported PCM format.
- ERR_PCMSEND_BUFFEROVERFLOW
- 201: Buffer overflow due to PCM send rate being too fast.
- ERR_ADM_GENERAL_ERROR
- 1005: Audio device error (unspecified). Please check whether the audio device is occupied by another application or try rejoining the channel.
- ERR_ADM_INIT_PLAYOUT
- 1008: Error initializing playback device. Please check whether the playback device is occupied by another application or try rejoining the channel.
- ERR_ADM_START_PLAYOUT
- 1009: Error starting playback device. Please check whether the playback device is functioning properly.
- ERR_ADM_STOP_PLAYOUT
- 1010: Error stopping playback device.
- ERR_ADM_INIT_RECORDING
- 1011: Error initializing recording device. Please check whether the recording device is functioning properly or try rejoining the channel.
- ERR_ADM_START_RECORDING
- 1012: Error starting recording device. Please check whether the recording device is functioning properly.
- ERR_ADM_STOP_RECORDING
- 1013: Error stopping recording device.
- ERR_VDM_CAMERA_NOT_AUTHORIZED
- 1501: No permission to use the camera. Please check whether camera access is enabled.