When you make an API call to access an Agora SDK, the SDK may return error codes or warning codes:
This article provides descriptions and troubleshooting tips for common Agora SDK error and warning codes. If you receive a response that is not included here, Agora recommends you contact support@agora.io so that our technical support team can help resolve the issue.
-2
, you should refer to 2
in the error code table.This section applies to the Agora RTC SDKs designed for:
The error and warning codes may be returned in the following ways:
onError
or onWarning
callback.Error code | Cause and troubleshooting tips |
---|---|
0 |
No error occurs. |
1 |
A general error occurs (no specified reason). Try calling the method again. |
2 |
An invalid parameter is used. For example, the specified channel name includes illegal characters. Please reset the parameters. |
3 |
The SDK is not ready due to one of the following reasons:RtcEngine fails to initialize. Please re-initialize RtcEngine .rate and complain methods are called. Please check your code logic. |
4 |
RtcEngine does not support the request due to one of the following reasons:setBeautyEffectOptions method is called on devices running versions earlier than Android 5.0. Please check the Android version. |
5 |
The request is rejected due to one of the following reasons:RtcEngine fails to initialize. Please re-initialize RtcEngine .RtcChannel instance. Please reset the channel name.joinChannel method is called to join one of multiple channels, the specified channel name is already in use. Please reset the channel name.joinChannel method in RtcEngine is called to join another channel after an RtcChannel instance has been created to join a channel and a stream has been published in the channel.switchChannel method. Ensure that the user role is audience before calling the switchChannel method. |
6 |
The buffer size is insufficient to store the returned data. |
7 |
A method is called before the initialization of RtcEngine . Ensure that the RtcEngine instance is created and initialized before calling the method. |
9 |
Permission to access is not granted. Check whether your app has access to the audio and video device. |
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. |
17 |
The request to join the channel is rejected. Typical causes include:joinChannel ) to join the channel. Stop calling the method to clear this error.stopEchoTest . |
18 |
The request to leave the channel is rejected. Typical causes include:leaveChannel ) to leave the channel. Stop calling the method to clear this error. |
19 |
Resources are already in use. |
20 |
The request is abandoned by the SDK, possibly because the request has been sent too frequently. |
21 |
RtcEngine fails to initialize and has crashed because of specific Windows firewall settings. |
22 |
The SDK fails to allocate resources because your app uses too many system resources or system resources are insufficient. |
101 |
The specified App ID is invalid. Please rejoin the channel with a valid App ID. |
102 |
The specified channel name is invalid, possibly because the data types of some parameters are incorrect. Please rejoin the channel with a valid channel name. |
103 |
RtcEngine fails to get server resources in the specified region. Try another region when initializing RtcEngine . |
109 |
The current token has expired. Please apply for a new token on the server and call renewToken. Note: This method is deprecated as of v2.4.1. Please use CONNECTION_CHANGED_TOKEN_EXPIRED(9) in theonConnectionStateChanged callback instead. |
110 |
The token is invalid due to one of the following reasons: Note: This method is deprecated as of v2.4.1. Please use CONNECTION_CHANGED_INVALID_TOKEN(8) in the onConnectionStateChanged callback instead. |
111 |
The network connection is interrupted. This error occurs when the SDK has connected to the server but lost connection for more than 4 seconds. |
112 |
The network connection is lost. This error occurs when the connection is interrupted and the SDK cannot reconnect to the server within 10 seconds. |
113 |
The user is not in the channel when calling the method. |
114 |
The data size exceeds 1024 bytes when calling the sendStreamMessage method. |
115 |
The data bitrate exceeds 6 Kbps when calling the sendStreamMessage method. |
116 |
More than five data streams are created when calling the createDataStream method. |
117 |
The data stream transmission times out. |
119 |
Switching roles fails. Note: This method is deprecated as of v3.7.0. Use CLIENT_ROLE_CHANGE_FAILED_REASON in the onConnectionStateChanged callback instead. |
120 |
Decryption fails. The user may have entered an incorrect password to join the channel. Check the entered password or tell the user to try rejoining the channel. |
123 |
The user is banned from the server. This error occurs when the user is kicked out of the channel from the server. |
134 |
The user account is invalid, possibly because it contains invalid parameters. |
Error code | Cause |
---|---|
124 |
Incorrect watermark file parameter. |
125 |
Incorrect watermark file path. |
126 |
Incorrect watermark file format. The SDK only supports adding PNG files as the watermark image. |
127 |
Incorrect watermark file information. |
128 |
Incorrect watermark file data format. |
129 |
An error occurs when reading the watermark file. |
Error code | Cause and troubleshooting tips |
---|---|
130 |
Stream encryption is enabled when the user calls the addPublishStreamUrl method. The SDK does not support pushing encrypted streams to CDN. |
151 |
An error occurs when pushing streams to CDN. Please remove the current URL address by calling the removePublishStreamUrl method, and then add a new address by calling the addPublishStreamUrl method. |
152 |
The host has published more than 10 URLs. Please delete the unnecessary URLs before adding new ones. |
153 |
The host is making changes to other hosts' URLs, such as updating parameters and disabling a URL. Please check your app logic. |
154 |
An error occurs on Agora's streaming server. Call the addPublishStreamUrl method to push the stream again. |
155 |
The server fails to find the stream. |
156 |
The URL format is incorrect. Please check the format. |
Error code | Cause and troubleshooting tips |
---|---|
160 |
The client is already recording audio. To start a new recording, call stopAudioRecording to stop the current recording first, and then call startAudioRecording . |
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. |
1006 |
An error occurs when using Java resources. Check whether the audio device storage is sufficient, or restart the audio device. |
1007 |
The sampling frequency setting is incorrect. |
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. |
1009 |
An error occurs when starting the playback device. Check the playback device. |
1010 |
An error occurs when stopping the playback device. |
1011 |
An error occurs when initializing the recording device. Check the recording device, or try rejoining the channel. |
1012 |
An error occurs when starting the recording device. Check the recording device. |
1013 |
An error occurs when stopping the recording device. |
1015 |
A playback error occurs. Check the playback device, or try rejoining the channel. |
1017 |
A recording error occurs. Check the recording device, or try rejoining the channel. |
1018 |
Recording fails. |
1022 |
An error occurs when initializing the loopback device. |
1023 |
An error occurs when starting the loopback device. |
1027 |
The application does not have permission to use the microphone. Remind your user to grant permission and rejoin the channel. |
1033 |
The local audio capture device is occupied by another application. Remind your user to leave the channel, stop the audio capture in another application, and rejoin the channel in sequence. |
1101 |
An error occurs when using Java resources. Check whether the audio device storage is sufficient, or restart the audio device. |
1108 |
An exception occurred in the audio capture thread. Remind your user to rejoin the channel. |
1109 |
An exception occurred in the audio playback thread. Remind your user to rejoin the channel. |
1111 |
Failed to start the local audio capture. Remind your user to rejoin the channel. |
1112 |
Failed to start the local audio playback. Remind your user to rejoin the channel. |
1115 |
Recording fails. Check whether there is permission to record or whether there is a problem with the network connection. |
1153 |
Failed to create Audio Recorder. Remind your user to rejoin the channel. |
1156 |
Failed to start the local audio capture. Remind your user to rejoin the channel. |
1157 |
Failed to create Audio Player. Remind your user to rejoin the channel. |
1160 |
Failed to start the local audio playback. Remind your user to rejoin the channel. |
1201 |
The current device does not support audio input, possibly because the configuration of the Audio Session category is incorrect, or because the device is already in use. Agora recommends terminating all background apps and rejoining the channel. |
1206 |
Audio Session fails to launch. Check your recording settings. |
1210 |
An error occurs when initializing the audio device, usually because some audio device parameters are incorrect. |
1213 |
An error occurs when re-initializing the audio device, usually because some audio device parameters are incorrect. |
1214 |
An error occurs when restarting the audio device, usually because the Audio Session category setting is not compatible with the audio device settings. |
1301 |
The audio device module fails to initialize. Disable and re-enable the audio device, or restart the device on which your app is running. |
1303 |
The audio device module fails to terminate. Disable and re-enable the audio device, or restart the device on which your app is running. |
1306 |
The playback device fails to initialize. Disable and re-enable the audio device, or restart the device on which your app is running. |
1307 |
Initialization fails because no audio playback device is available. Ensure that a proper audio device is connected. |
1309 |
Recording fails to start. Disable and re-enable the audio device, or restart the device on which your app is running. |
1311 |
The system fails to create a recording thread, possibly because the device storage or performance is insufficient. Restart the device or use a different one. |
1314 |
Recording fails to start. Possible solutions: |
1319 |
The system fails to create a playback thread, possibly because the device storage or performance is insufficient. Restart the device, or use a different one. |
1320 |
Audio playback fails to start. Possible solutions: |
1322 |
No recording device is available. Ensure that a proper audio device is connected. |
1323 |
No playback device is available. Ensure that a proper audio device is connected. |
1351 |
The audio device module fails to initialize. Possible solutions: |
1353 |
The recording device fails to initialize. Possible solutions: |
1354 |
The microphone fails to initialize. Possible solutions: |
1355 |
The playback device fails to initialize. Possible solutions: |
1356 |
The speaker fails to initialize. Possible solutions: |
1357 |
Recording fails to start. Possible solutions: |
1358 |
Audio playback fails to start. Possible solutions: |
1359 |
No recording device is available. Check whether the recording device is connected or whether it is already in use by another app. |
1360 |
No playback device is available. Check whether the playback device is connected or whether it is already in use by another app. |
1735 |
The Windows Audio service is disabled. You need to either enable the Windows Audio service or restart the device. |
Error code | Cause and troubleshooting tips |
---|---|
1003 |
The camera fails to start. Check whether the camera is already in use by another app, or try rejoining the channel. Note: This method is deprecated as of v2.4.1. Please use LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE(4) in the onLocalVideoStateChanged callback instead. |
1004 |
The video rendering module fails to start. |
1501 |
Permission to access the camera is not granted. Check whether permission to access the camera permission is granted. |
1502 |
The camera is already in use. Note: This method is deprecated as of v2.4.1. Please use LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY(3) in the onLocalVideoStateChanged callback instead. |
1600 |
An unknown error occurs. |
1601 |
Video encoding initialization fails. Try rejoining the channel. |
1602 |
Video encoding fails. Try rejoining the channel. |
1603 |
Video encoding settings fail to be applied. |
1736 |
The SDK does not support you to set excludeWindowList to block windows on a device with multiple graphics cards. |
Error code | Cause and troubleshooting tips |
---|---|
157 |
The necessary dynamic libraries have not been integrated. For example, you have not integrated the noise suppression dynamic library into your project before calling enableDeepLearningDenoise . You have not integrated the super resolution dynamic library into your project before calling enableRemoteSuperResolution . |
1001 |
The SDK fails to load the media engine. |
1002 |
The SDK fails to start an audio/video call after launching the media engine. Try rejoining the channel. |
Warning code | Cause and troubleshooting tips |
---|---|
8 |
The specified view is invalid. The video call function requires a specified view. |
16 |
The SDK fails to initialize the video call function, possibly due to a lack of resources. When this warning occurs, users cannot make a video call, but the voice call function is not affected. |
20 |
The request is pending, usually because some modules are not ready, causing the SDK to postpone processing the request. |
103 |
No channel resources are available, possibly because the server fails to allocate channel resources. |
104 |
A timeout occurs when the SDK is searching for a specified channel. When receiving a request to join a channel, the SDK searches for the channel first. This warning usually occurs when the network connection is too poor for the SDK to connect to the server. |
105 |
The server rejects the request to search for the channel because the server cannot process the request or the request is illegal. Note: This method is deprecated as of v2.4.1. Please use CONNECTION_CHANGED_REJECTED_BY_SERVER(10) in the onConnectionStateChanged callback instead. |
106 |
A timeout occurs when joining the channel. Once the specified channel is found, the SDK starts joining the channel. This warning usually occurs when the network connection is too poor for the SDK to connect to the server. |
107 |
The server rejects the request to join the channel because the server cannot process this request or the request is illegal. |
111 |
A timeout occurs when switching to the live video. |
118 |
A timeout occurs when setting user roles in the live-streaming profile. |
121 |
The SDK fails to join a channel. |
122 |
The SDK is trying to connect to another server. |
131 |
The channel connection cannot be recovered. |
132 |
The IP address has changed. |
133 |
The port has changed. |
701 |
An error occurs when opening the audio-mixing file. |
1014 |
A playback device warning occurs. |
1016 |
A recording device warning occurs. |
1019 |
No data is recorded. Possible solutions: |
1020 |
The audio playback frequency is abnormal due to high CPU usage. Recommended solutions: |
1021 |
The audio recording frequency is abnormal due to high CPU usage. Recommended solutions: |
1025 |
The audio capture or playback is interrupted by a system call. If the audio capture or playback is required, remind your user to hang up the phone. |
1029 |
The Audio Session category is not set as AVAudioSessionCategoryPlayAndRecord. During a call, RtcEngine monitors the Audio Session category. If the category is modified, this warning occurs, and RtcEngine automatically sets it back to AVAudioSessionCategoryPlayAndRecord . |
1031 |
The recording volume is too low. Check whether the user's microphone is muted or whether the user has enabled microphone augmentation. |
1032 |
The playback volume is too low. Check whether the user's microphone is muted or whether the user has enabled microphone augmentation. |
1033 |
The local audio capture device is occupied by another application. Remind your user to leave the channel, stop the audio capture in another application, and rejoin the channel in sequence. |
1040 |
No audio data is available. Possible solutions: |
1051 |
Audio feedback is detected during recording. Ensure that users in the same channel maintain sufficient physical distance between themselves. |
1052 |
The system threads for recording and playback cannot be arranged due to high CPU usage. |
1053 |
A residual echo is detected. This may be caused by the delayed scheduling of system threads or a signal overflow. |
1323 |
No playback device is available. Ensure that a proper audio device is connected. |
1324 |
The recording device is released improperly. Possible solutions: |
1610 |
The original resolution of the remote user's video is beyond the range where super resolution can be applied. |
1611 |
Super resolution is already being used to boost another remote user's video. |
1612 |
The device does not support using super resolution. |