The Agora Interactive Gaming 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 Codes

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, some API relies on a specific module, but the module is not ready yet.
ERR_NOT_SUPPORTED 4 The SDK does not support this function.
ERR_REFUSED 5 The request is rejected. This is for internal SDK 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 use only, and it will not return to the application through any API or callback event.
ERR_TIMEDOUT 10 API timeout. The API requires 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 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 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 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 use only, and it will not return to the application through any API or callback event.
ERR_NET_NOBUFS 15 No network buffers are available. This is for internal SDK 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.
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.
ERR_ALREADY_IN_USE 19 The 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 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_VENDOR_KEY 101 The specified App ID is invalid.
ERR_INVALID_CHANNEL_NAME 102 The specified Channel Name is invalid.
ERR_CONNECTION_INTERRUPTED 111

The CONNECTION_INTERRUPTED callback.

This is only applicable to the Agora Native SDK for the web.

ERR_CONNECTION_LOST = 112 112

The CONNECTION_LOST callback.

This is only applicable to the Agora Native SDK for the web.

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_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_ADM_GENERAL_ERROR 1005 General error in the Audio Device Module (the reason is not classified specifically).
ERR_ADM_JAVA_RESOURCE 1006 Audio Device Module: Error in using 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_PERMISSION 1027 Audio Device Module: The permission to use the Audio Device Module is disabled.
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_PERMISSION 1027 Audio Device Module: The permission to use the Audio Device Module is disabled.

Warning Codes

Warning Code Value Description
WARN_PENDING 20 The request is pending, usually due to some module not being ready.
WARN_NO_AVAILABLE_CHANNEL 103 No channel resources are available. Maybe because the server could not 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 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 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_SET_CLIENT_ROLE_TIMEOUT 118 A timeout when setting the client. The server cannot process this request or the request is illegal.
WARN_SET_CLIENT_ROLE_NOT_AUTHORIZED 119 The user is not authorized to perform the action.
WARN_AUDIO_MIXING_OPEN_ERROR 701 An incorrect or incomplete file is added when calling startAudioMixing().
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_MALFUNCTION 1031 Audio Device Module: Low recording volume.
WARN_ADM_HOWLING 1051 Audio Device Module: Howling is detected.