Skip to main content

You are viewing Agora Docs forBetaproducts and features. Switch to Docs

You are looking at Voice Calling v3.x Docs. The newest version is  Voice Calling 4.x

Android
iOS
macOS
Windows C++
Windows C#
Unity
Flutter
React Native
Electron
Cocos Creator
Cocos2d-x

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 contact support@agora.io 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.

Native platforms and third-party frameworks

This section applies to the Agora Video Calling SDKs designed for:

  • Native platforms, such as Android, iOS, macOS, and Windows.
  • Third-party frameworks (third-party platforms where native app code is wrapped), such as Electron, Unity, React Native, and Flutter.

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

Error codeCause and troubleshooting tips
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 due to one of the following reasons:
  • RtcEngine fails to initialize. Please re-initialize RtcEngine.
  • 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.
  • 4RtcEngine does not support the request due to one of the following reasons:
  • The setBeautyEffectOptions method is called on devices running versions earlier than Android 5.0. 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 due to one of the following reasons:
  • RtcEngine fails to initialize. Please re-initialize RtcEngine.
  • The channel name is set as the empty string "" when creating the RtcChannel instance. Please reset the channel name.
  • When the joinChannel 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 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.
  • A user whose role is not audience calls the switchChannel method. Ensure that the user role is audience before calling the switchChannel method.
  • 6The buffer size is insufficient to store the returned data.
    7A method is called before the initialization of RtcEngine. Ensure that the RtcEngine 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 causes include:
  • The user is already in the channel and still calls a method (for example, joinChannel) to join the channel. Stop calling the method to clear this error.
  • The user tries to join a channel during a call test. To join a channel, the call test must be ended by calling stopEchoTest.
  • 18The request to leave the channel is rejected. Typical causes include:
  • The user has left the channel but still calls a method (for example, leaveChannel) to leave the channel. Stop calling the method to clear this error.
  • The user is not in 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.
    21RtcEngine 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.
    103RtcEngine fails to get server resources in the specified region. Try another region when initializing RtcEngine.
    109The 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 the onConnectionStateChanged callback instead.
    110The token is invalid due to one of the following reasons:
  • 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 uid used to generate the token is not the same as the one used to join the channel.
  • Note: This method is deprecated as of v2.4.1. Please use CONNECTION_CHANGED_INVALID_TOKEN(8) in the onConnectionStateChanged callback instead.
    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 method.
    117The data stream transmission times out.
    119Switching roles fails.
    Note: This method is deprecated as of v3.7.0. Use CLIENT_ROLE_CHANGE_FAILED_REASON in the onConnectionStateChanged callback instead.
    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

    Error codeCause
    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

    Error codeCause and troubleshooting tips
    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 on 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. Please check the format.

    Audio errors

    Error codeCause and troubleshooting tips
    160The client is already recording audio. To start a new recording, call stopAudioRecording to stop the current recording first, and then call startAudioRecording.
    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.
    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.
    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.
    1027The application does not have permission to use the microphone. Remind your user to grant permission and rejoin the channel.
    1033The 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.
    1101An error occurs when using Java resources. Check whether the audio device storage is sufficient, or restart the audio device.
    1108An exception occurred in the audio capture thread. Remind your user to rejoin the channel.
    1109An exception occurred in the audio playback thread. Remind your user to rejoin the channel.
    1111Failed to start the local audio capture. Remind your user to rejoin the channel.
    1112Failed to start the local audio playback. Remind your user to rejoin the channel.
    1115Recording fails. Check whether there is permission to record or whether there is a problem with the network connection.
    1153Failed to create Audio Recorder. Remind your user to rejoin the channel.
    1156Failed to start the local audio capture. Remind your user to rejoin the channel.
    1157Failed to create Audio Player. Remind your user to rejoin the channel.
    1160Failed to start the local audio playback. Remind your user to rejoin the channel.
    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 audio device, usually because some audio device parameters are incorrect.
    1213An error occurs when re-initializing the audio device, usually because some audio device parameters are incorrect.
    1214An 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.
  • Upgrade 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.
  • Upgrade 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.
  • Upgrade 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.
  • Upgrade 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.
  • Upgrade 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.
  • Upgrade the audio card driver.
  • 1357Recording fails to start. Possible solutions:
  • Disable and re-enable the audio device.
  • Restart the device on which your app is running.
  • Upgrade 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.
  • Upgrade 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.
    1735The Windows Audio service is disabled. You need to either enable the Windows Audio service or restart the device.

    Video errors

    Error codeCause and troubleshooting tips
    1003The 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.
    1004The video rendering module fails to start.
    1501Permission to access the camera is not granted. Check whether permission to access the camera permission is granted.
    1502The 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.
    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.
    1736The SDK does not support you to set excludeWindowList to block windows on a device with multiple graphics cards.

    Other errors

    Error codeCause and troubleshooting tips
    157The necessary dynamic libraries have not been integrated. For example, you have not integrated the deep-learning noise reduction dynamic library into your project before calling enableDeepLearningDenoise. You have not integrated the super resolution dynamic library into your project before calling enableRemoteSuperResolution.
    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 codes

    Warning codeCause and troubleshooting tips
    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.
    103No channel resources are available, possibly because the server fails to allocate channel resources.
    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.
    105The 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.
    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.
    107The server rejects the request to join the channel because 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 SDK fails to join a channel.
    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.
  • Check whether the audio module is enabled in your app.
  • Try rejoining the channel.
  • 1021The audio recording frequency is abnormal due to high CPU usage. Recommended solutions:
  • Close other apps that are consuming CPU resources.
  • Check whether the audio module is enabled in your app.
  • Try rejoining the channel.
  • 1025The 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.
    1029The 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.
    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 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.
    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 user's video is beyond the range where super resolution can be applied.
    1611Super resolution is already being used to boost another remote user's video.
    1612The device does not support using super resolution.

    Web

    Voice Calling