The Agora Native SDK will return error or warning codes when calling APIs or during runtime:
Error Codes occur when the SDK encounters an error that cannot be recovered automatically without any application intervention. For example, the SDK returns an error if it fails to turn on the camera, and reminds the user not to use the camera.
Warning Codes occur when the SDK encounters an error that might be recovered automatically. These are only notifications, and can generally be ignored.
Error Code | Value | Description |
---|---|---|
ERR_OK | 0 | No error. |
ERR_FAILED | 1 | General error (the reason is not classified specifically). |
ERR_INVALID_ARGUMENT | 2 | Invalid parameter called. For example, the specific channel name includes illegal characters. |
ERR_NOT_READY | 3 | The SDK module is not ready. For example, if some API relies on a specific module, and the module is not ready. |
ERR_NOT_SUPPORTED | 4 | The SDK does not support this function. |
ERR_REFUSED | 5 | The request is rejected. This is for internal SDK internal use only, and it will not return to the application through any API or callback event. |
ERR_BUFFER_TOO_SMALL | 6 | The buffer size is not big enough to store the returned data. |
ERR_NOT_INITIALIZED | 7 | The SDK is not initialized before calling this API. |
ERR_NO_PERMISSION | 9 | No permission. This is for internal SDK internal use only, and it will not return to the application through any API or callback event. |
ERR_TIMEDOUT | 10 | An API timeout. Some APIs require the SDK to return the execution result, and this error occurs if the request takes too long for the SDK to process. |
ERR_CANCELED | 11 | The request is cancelled. This is for internal SDK internal use only, and it will not return to the application through any API or callback event. |
ERR_TOO_OFTEN | 12 | The call frequency is too high. This is for internal SDK internal use only, and it will not return to the application through any API or callback event. |
ERR_BIND_SOCKET | 13 | The SDK failed to bind to the network socket. This is for internal SDK internal use only, and it will not return to the application through any API or callback event. |
ERR_NET_DOWN | 14 | The network is unavailable. This is for internal SDK internal use only, and it will not return to the application through any API or callback event. |
ERR_NET_NOBUFS | 15 | No network buffers available. This is for internal SDK internal use only, and it will not return to the application through any API or callback event. |
ERR_JOIN_CHANNEL_REJECTED | 17 | The request to join the channel is rejected. This error usually occurs when the user is already in the channel, and still calls the API to join the channel, for example, joinChannel. |
ERR_LEAVE_CHANNEL_REJECTED | 18 | The request to leave the channel is rejected. This error usually occurs when the user has already left the channel, and still calls the API to leave the channel, for example, leaveChannel. |
ERR_ALREADY_IN_USE | 19 | Resources have been occupied, and cannot be reused. |
ERR_ABORTED | 20 | The SDK gave up the request due to too many requests. This is for internal SDK internal use only, and it will not return to the application through any API or callback event. |
ERR_INIT_NET_ENGINE | 21 | In Windows, specific firewall settings can cause the SDK to fail to initialize and crash. |
ERR_INVALID_APP_ID | 101 | The specified App ID is invalid. |
ERR_INVALID_TOKEN | 102 | The specified Token is invalid. |
ERR_TOKEN_EXPIRED | 109 | The Token expired due to one of the following reasons:
|
ERR_INVALID_TOKEN | 110 | The Token is invalid due to one of the following reasons: The App Certificate for the project is enabled on the Console, but the user is still using the App ID. Once the App Certificate is enabled, the user must use a Token. The uid field is mandatory, and users must set the same uid when setting the uid parameter when calling joinChannel. |
ERR_CONNECTION_INTERRUPTED | 111 | The CONNECTION_INTERRUPTED callback. This applies to the Agora Web SDK only. |
ERR_CONNECTION_LOST | 112 | The CONNECTION_LOST callback. This applies to the Agora Web SDK only. |
ERR_NOT_IN_CHANNEL | 113 | The user is not in the channel. |
ERR_SIZE_TOO_LARGE | 114 | The data size is too big. |
ERR_BITRATE_LIMIT | 115 | The bitrate is limited. |
ERR_TOO_MANY_DATA_STREAMS | 116 | Too many data streams. |
ERR_DECRYPTION_FAILED | 120 | Failed to decrypt. |
ERR_CLIENT_IS_BANNED_BY_SERVER | 123 | The client is banned by the server. |
ERR_WATERMARK_PARAM | 124 | Error in the watermark file parameter. |
ERR_WATERMARK_PATH | 125 | Error in the watermark file path. |
ERR_WATERMARK_PNG | 126 | Error in the watermark file format. |
ERR_WATERMARKR_INFO | 127 | Error in the watermark file information. |
ERR_WATERMARK_ARGB | 128 | Error in the watermark file data format. |
ERR_WATERMARK_READ | 129 | Error in reading the watermark file. |
ERR_LOAD_MEDIA_ENGINE | 1001 | Failed to load the media engine. |
ERR_START_CALL | 1002 | Failed to start the call after enabling the media engine. |
ERR_START_CAMERA | 1003 | Failed to start the camera. |
ERR_START_VIDEO_RENDER | 1004 | Failed to start the video rendering module. |
ERR_ADM_GENERAL_ERROR | 1005 | General error on the Audio Device Module (the reason is not classified specifically. |
ERR_ADM_JAVA_RESOURCE | 1006 | Audio Device Module: Error in using the Java resources. |
ERR_ADM_SAMPLE_RATE | 1007 | Audio Device Module: Error in setting the sampling frequency. |
ERR_ADM_INIT_PLAYOUT | 1008 | Audio Device Module: Error in initializing the playback device. |
ERR_ADM_START_PLAYOUT | 1009 | Audio Device Module: Error in starting the playback device. |
ERR_ADM_STOP_PLAYOUT | 1010 | Audio Device Module: Error in stopping the playback device. |
ERR_ADM_INIT_RECORDING | 1011 | Audio Device Module: Error in initializing the recording device. |
ERR_ADM_START_RECORDING | 1012 | Audio Device Module: Error in starting the recording device. |
ERR_ADM_STOP_RECORDING | 1013 | Audio Device Module: Error in stopping the recording device. |
ERR_ADM_RUNTIME_PLAYOUT_ERROR | 1015 | Audio Device Module: Runtime playback error. |
ERR_ADM_RUNTIME_RECORDING_ERROR | 1017 | Audio Device Module: Runtime recording error. |
ERR_ADM_RECORD_AUDIO_FAILED | 1018 | Audio Device Module: Failed to record. |
ERR_ADM_INIT_LOOPBACK | 1022 | Audio Device Module: Error in initializing the loopback device. |
ERR_ADM_START_LOOPBACK | 1023 | Audio Device Module: Error in starting the loopback device. |
ERR_ADM_NO_RECORDING_DEVICE | 1359 | Audio Device Module: No recording device. |
ERR_ADM_NO_PLAYOUT_DEVICE | 1360 | Audio Device Module: No playback device. |
ERR_VDM_CAMERA_NOT_AUTHORIZED | 1501 | Video Device Module: The camera is not authorized. |
ERR_VCM_UNKNOWN_ERROR | 1600 | Video Device Module: Unknown error. |
ERR_VCM_ENCODER_INIT_ERROR | 1601 | Video Device Module: Error in initializing the video encoder. |
ERR_VCM_ENCODER_ENCODE_ERROR | 1602 | Video Device Module: Error in encoding. |
ERR_VCM_ENCODER_SET_ERROR | 1603 | Video Device Module: Error in setting the video encoder. |
Warning Code | Value | Description |
---|---|---|
WARN_INVALID_VIEW | 8 | The specified view is invalid. It is required to specify a view when using the video call function. |
WARN_INIT_VIDEO | 16 | Failed to initialize the video function. |
WARN_PENDING | 20 | The request is pending, usually due to some module not being ready, and the SDK postponed processing the request. |
WARN_NO_AVAILABLE_CHANNEL | 103 | No channel resources are available. Maybe because the server cannot allocate any channel resource. |
WARN_LOOKUP_CHANNEL_TIMEOUT | 104 | A timeout when looking up the channel. When joining a channel, the SDK looks up the specified channel. The warning usually occurs when the network condition is too poor to connect to the server. |
WARN_LOOKUP_CHANNEL_REJECTED | 105 | The server rejected the request to look up the channel. The server cannot process this request or the request is illegal. |
WARN_OPEN_CHANNEL_TIMEOUT | 106 | A timeout when opening the channel. Once the specific channel is found, the SDK opens the channel. The warning usually occurs when the network condition is too poor to connect to the server. |
WARN_OPEN_CHANNEL_REJECTED | 107 | The server rejected the request to open the channel. The server cannot process this request or the request is illegal. |
WARN_SWITCH_LIVE_VIDEO_TIMEOUT | 111 | A timeout when switching the live video. |
WARN_SET_CLIENT_ROLE_TIMEOUT | 118 | A timeout when setting the client role in the LIVE_BROADCASTING profile. |
WARN_SET_CLIENT_ROLE_NOT_AUTHORIZED | 119 | The client role is not authorized. |
WARN_OPEN_CHANNEL_INVALID_TICKET | 121 | The ticket to open the channel is invalid. |
WARN_AUDIO_MIXING_OPEN_ERROR | 701 | Error in opeinging the audio mixing. |
WARN_ADM_RUNTIME_PLAYOUT_WARNING | 1014 | Audio Device Module: A warning in the runtime playback device. |
WARN_ADM_RUNTIME_RECORDING_WARNING | 1016 | Audio Device Module: A warning in the runtime recording device. |
WARN_ADM_RECORD_AUDIO_SILENCE | 1019 | Audio Device Module: No valid audio data is collected. |
WARN_ADM_PLAYOUT_MALFUNCTION | 1020 | Audio Device Module: A playback device failure. |
WARN_ADM_RECORD_MALFUNCTION | 1021 | Audio Device Module: A recording device failure. |
WARN_ADM_RECORD_AUDIO_LOWLEVEL | 1031 | Audio Device Module: The recorded audio voice is too low. |
WARN_ADM_PLAYOUT_AUDIO_LOWLEVEL | 1032 | Audio Device Module: The playback audio voice is too low. |
WARN_ADM_RECORD_IS_OCCUPIED | 1033 | Audio Device Module: The recording device is occupied. |
WARN_ADM_HOWLING | 1051 | Audio Device Module: Howling is detected. |
WARN_ADM_GLITCH_STATE | 1052 | Audio Device Module: The device is in the glitch state. |
WARN_ADM_IMPROPER_SETTINGS | 1053 | Audio Device Module: The settings are improper. |