Error Codes and Warning Codes

When you make an API call to access an Agora SDK, the SDK may return error codes or warning codes: Error codes are returned when a problem that cannot be recovered without app intervention has occurred. Warning codes are returned when a problem that might be resolved automatically has occurred. Warning codes provide information but normally do not require any action.

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 submit a ticket so that our technical support team can help resolve the issue.

An error code can be a negative number. In such a case, it should be read as if it were positive. For example, if the SDK returns error code -2, you should refer to 2 in the error code table.

The error and warning codes may be returned in the following ways:

  • The return value of a method call, represented by a negative number. In such a case, it should be read as if it were positive.

  • An OnError or OnWarning callback.

General errors

EnumeratorDescription
0No error occurs.
1A general error occurs (no specified reason). Try calling the method again.
2An invalid parameter is used. For example, the specified channel name includes illegal characters. Please reset the parameters.
3The SDK is not ready. Possible reasons:
  • IAgoraRtcEngine fails to initialize. Please re-initialize IAgoraRtcEngine.
  • No user has joined the channel when the method is called. Please check your code logic.
  • Users have not left the channel when the Rate and Complain methods are called. Please check your code logic.
  • The audio module is disabled.
  • The program is not complete.
4IAgoraRtcEngine does not support the request. Possible reasons:
  • The SetBeautyEffectOptions method is called on devices running versions earlier than Android 4.4. Please check the Android version.
  • The built-in encryption mode is incorrect or the SDK fails to load the external encryption library. Please check the encryption mode setting or reload the external encryption library.
5The request is rejected. Possible reasons:
  • IAgoraRtcEngine fails to initialize. Please re-initialize IAgoraRtcEngine.
  • The channel name is set as the empty string "" when creating the IAgoraRtcChannel instance. Please reset the channel name.
  • When the JoinChannel [2/2] method is called to join one of multiple channels, the specified channel name is already in use. Please reset the channel name.
  • The joinChannel method in IAgoraRtcEngine is called to join another channel after an IAgoraRtcChannel instance has been created to join a channel and a stream has been published in the channel. The joinChannel method in IAgoraRtcEngine is called to join another channel after an IAgoraRtcChannel instance has been created to join a channel and a stream has been published in the channel.
  • A user whose role is not audience calls the SwitchChannel [2/2] method. Ensure that the user role is audience before calling the switchChannel method.
6The buffer size is insufficient to store the returned data.
7]IRtcEngine[ is not initialized. Ensure that the IAgoraRtcEngine instance is created and initialized before calling the method.
9Permission to access is not granted. Check whether your app has access to the audio and video device.
10A 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.
17The request to join the channel is rejected. Typical reasons include:
  • The user is already in the channel and still calls a method (for example, JoinChannel [2/2]) to join the channel. Stop calling this method to clear this error.
  • The user tries to join a channel during a call test started by calling StartEchoTest [2/3]. To join a channel, the call test must be ended by calling StopEchoTest.
18The request to leave the channel is rejected. Typical reasons include:
  • The user has left the channel but still calls a method (for example, LeaveChannel) to leave the channel. Stop calling this method to clear this error.
  • The user is not in the channel and calls a method to leave the channel. In this case, no extra operation is needed.
19Resources are already in use.
20The request is abandoned by the SDK, possibly because the request has been sent too frequently.
21]IRtcEngine[ fails to initialize and has crashed because of specific Windows firewall settings.
22The SDK fails to allocate resources because your app uses too many system resources or system resources are insufficient.
101The specified App ID is invalid. Please rejoin the channel with a valid App ID.
102The specified channel name is invalid, possibly because the data types of some parameters are incorrect. Please rejoin the channel with a valid channel name.
103Fails to get server resources in the specified region. Try another region when initializing IAgoraRtcEngine.
109Note: This method is deprecated as of v2.4.1. Please use CONNECTION_CHANGED_TOKEN_EXPIRED(9) in the OnConnectionStateChanged callback instead. The current token has expired. Please apply for a new token on the server and call RenewToken.
110Note: This method is deprecated as of v2.4.1. Please use CONNECTION_CHANGED_INVALID_TOKEN(8) in the OnConnectionStateChanged callback instead. The token is invalid. Typical reasons include:
  • 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 user ID used to generate the token is not the same as the one used to join the channel.
111The network connection is interrupted. This error occurs when the SDK has connected to the server but lost connection for more than 4 seconds.
112The network connection is lost. This error occurs when the connection is interrupted and the SDK cannot reconnect to the server within 10 seconds.
113The user is not in the channel when calling the method.
114The data size exceeds 1024 bytes when calling the SendStreamMessage method.
115The data bitrate exceeds 6 Kbps when calling the SendStreamMessage method.
116More than five data streams are created when calling the CreateDataStream [2/2] method.
117The data stream transmission times out.
119Switching roles fails.
120Decryption 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.
123The user is banned from the server. This error occurs when the user is kicked out of the channel from the server.
134The user account is invalid, possibly because it contains invalid parameters.

Watermark errors

EnumeratorDescription
124Incorrect watermark file parameter.
125Incorrect watermark file path.
126Incorrect watermark file format. The SDK only supports adding PNG files as the watermark image.
127Incorrect watermark file information.
128Incorrect watermark file data format.
129An error occurs when reading the watermark file.

Streaming errors

EnumeratorDescription
130Stream encryption is enabled when the user calls the AddPublishStreamUrl method. The SDK does not support pushing encrypted streams to CDN.
151An 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.
152The host has published more than 10 URLs. Please delete the unnecessary URLs before adding new ones.
153The host is making changes to other hosts' URLs, such as updating parameters and disabling a URL. Please check your app logic.
154An error occurs in Agora's streaming server. Call the AddPublishStreamUrl method to push the stream again.
155The server fails to find the stream.
156The URL format is incorrect. Check whether the URL format is correct.

Audio errors

EnumeratorDescription
1005A general error occurs (no specified reason). Check whether the audio device is already in use by another app, or try rejoining the channel.
1006An error occurs when using Java resources. Check whether the audio device storage is sufficient, or restart the audio device.
1007The sampling frequency setting is incorrect.
1008An error occurs when initializing the playback device. Check whether the playback device is already in use by another app, or try rejoining the channel.
1009An error occurs when starting the playback device. Check the playback device, or try rejoining the channel.
1010An error occurs when stopping the playback device.
1011An error occurs when initializing the recording device. Check the recording device, or try rejoining the channel.
1012An error occurs when starting the recording device. Check the recording device, or try rejoining the channel.
1013An error occurs when stopping the recording device.
1015A playback error occurs. Check the playback device, or try rejoining the channel.
1017A recording error occurs. Check the recording device, or try rejoining the channel.
1018Recording fails.
1022An error occurs when initializing the loopback device.
1023An error occurs when starting the loopback device.
1027Permission to record is not granted. Check whether permission to record is granted or whether the recording device is already in use by another app.
1033The recording device is already in use.
1101An error occurs when using Java resources. Check whether the audio device storage is sufficient, or restart the audio device.
1108The audio recording frequency is lower than 50 Hz. In this case, the frequency is often 0, which indicates that the recording has not started. Agora recommends that you check whether permission to record is granted.
1109The audio playback frequency is lower than 50 Hz. In this case, the frequency is often 0, which indicates that the playback has not started. Agora recommends that you check whether too many AudioTrack instances have been created.
1111Recording fails to start, and a ROM system error occurs. Possible solutions: Restart your app. Restart the device on which your app is running. Check whether permission to record is granted.
1112Playback fails to start and a ROM system error occurs. Possible solutions: Restart the app. Restart the device on which your app is running. Check whether permission to record is granted.
1115Recording fails. Check whether there is permission to record or whether there is a problem with the network connection.
1201The 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.
1206Audio Session fails to launch. Check your recording settings.
1210An error occurs when initializing the playback device. An error occurs when initializing the audio device, usually because some audio device parameters are incorrect.
1213An error occurs when re-initializing the playback device. An error occurs when initializing the audio device, usually because some audio device parameters are incorrect.
1214An error occurs when restarting the playback device. An error occurs when restarting the audio device, usually because the Audio Session category setting is not compatible with the audio device settings.
1301The audio device module fails to initialize. Disable and re-enable the audio device, or restart the device on which your app is running.
1303The audio device module fails to terminate. Disable and re-enable the audio device, or restart the device on which your app is running.
1306The playback device fails to initialize. Disable and re-enable the audio device, or restart the device on which your app is running.
1307Initialization fails because no audio playback device is available. Ensure that a proper audio device is connected.
1309Recording fails to start. Disable and re-enable the audio device, or restart the device on which your app is running.
1311The system fails to create a recording thread, possibly because the device storage or performance is insufficient. Restart the device or use a different one.
1314Recording fails to start. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1319The system fails to create a playback thread, possibly because the device storage or performance is insufficient. Restart the device or use a different one.
1320Audio playback fails to start. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1322No recording device is available. Ensure that a proper audio device is connected.
1323No playback device is available. Ensure that a proper audio device is connected.
1351The audio device module fails to initialize. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1353The recording device fails to initialize. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1354The microphone fails to initialize. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1355The playback device fails to initialize. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1356The speaker fails to initialize. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1357Recording fails to start. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1358Audio playback fails to start. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1359No recording device is available. Check whether the recording device is connected or whether it is already in use by another app.
1360No playback device is available. Check whether the playback device is connected or whether it is already in use by another app.

Video errors

EnumeratorDescription
1003Note: This method is deprecated as of v2.4.1. Please use LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE(4) in the OnLocalVideoStateChanged callback instead. The camera fails to start. Check whether the camera is already in use by another app, or try rejoining the channel.
1004The video rendering module fails to start.
1510Permission to access the camera is not granted. Check whether permission to access the camera permission is granted.
1512Note: This method is deprecated as of v2.4.1. Please use LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY(3) in the OnLocalVideoStateChanged callback instead. The camera is already in use.
1600An unknown error occurs.
1601Video encoding initialization fails. Try rejoining the channel.
1602Video encoding fails. Try rejoining the channel.
1603Video encoding settings fail to be applied.

Other errors

EnumeratorDescription
1001The SDK fails to load the media engine.
1002The SDK fails to start an audio/video call after launching the media engine. Try rejoining the channel.

Warning code

EnumeratorDescription
8The specified view is invalid. The video call function requires a specified view.
16The 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.
20The request is pending, usually because some modules are not ready, causing the SDK to postpone processing the request.
103103: No channel resources are available. Maybe because the server cannot allocate any channel resource.
104A 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.
105Note: This method is deprecated as of v2.4.1. Please use CONNECTION_CHANGED_REJECTED_BY_SERVER(10) in the OnConnectionStateChanged callback instead. 105: The server rejected the request to look up the channel. The server cannot process this request or the request is illegal.
106A 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.
107105: The server rejected the request to look up the channel. The server cannot process this request or the request is illegal.
111A timeout occurs when switching to the live video.
118A timeout occurs when setting user roles in the live-streaming profile.
121The ticket to join the channel is invalid.
122The SDK is trying to connect to another server.
131The channel connection cannot be recovered.
132The IP address has changed.
133The port has changed.
701An error occurs when opening the audio-mixing file.
1014A playback device warning occurs.
1016A recording device warning occurs.
1019No data is recorded. Possible solutions: Check whether the microphone is already in use. Check whether permission to record is granted. Check whether the recording device works properly. Restart the device.
1020The audio playback frequency is abnormal due to high CPU usage. Recommended solutions: Close other apps that are consuming CPU resources. You can also check whether the audio module is enabled in your app or try rejoining the channel.
1021The audio recording frequency is abnormal due to high CPU usage. You can close other apps that are consuming CPU resources. You can also check whether the audio module is enabled in your app or try rejoining the channel.
1025The audio playback or recording is interrupted by system events (such as a phone call).
1029The Audio Session category must be set as AVAudioSessionCategoryPlayAndRecord. During a call, IAgoraRtcEngine monitors the Audio Session category. If the category is modified, this warning occurs, and the SDK automatically sets it back to AVAudioSessionCategoryPlayAndRecord.
1031The recording volume is too low. Check whether the user's microphone is muted or whether the user has enabled microphone augmentation.
1032The playback volume is too low. Check whether the user's microphone is muted or whether the user has enabled microphone augmentation.
1033The recording device is already in use. Check whether permission to record is granted or whether another app is using the device.
1040No audio data is available. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1051Audio feedback is detected during recording. Ensure that users in the same channel maintain sufficient physical distance between themselves.
1052The system threads for recording and playback cannot be arranged due to high CPU usage.
1053A residual echo is detected. This may be caused by the delayed scheduling of system threads or a signal overflow.
1323No playback device is available. Ensure that a proper audio device is connected.
1324The recording device is released improperly. Possible solutions: Disable and re-enable the audio device. Restart the device on which your app is running. Update the sound card driver.
1610The original resolution of the remote video is beyond the range (640 × 480) where the super-resolution algorithm can be applied.
1611Another user is using super resolution.
1612The device does not support super resolution.