Error codes

Updated

Error codes returned by IoT SDK during runtime, their meanings, and solutions.

This page lists the error codes IoT SDK returns during runtime, along with their meanings and, where applicable, how to resolve them.

General errors

CodeEnumExplanationSolution
0ERR_OKAYNo error.
1ERR_FAILEDA generic error. Check the log files to troubleshoot the issue.
2ERR_INVALID_PARAMAn API call used an invalid parameter, for example a channel name that contains illegal characters.Correct the parameter and try again.
3ERR_INVALID_STATEThe API call is invalid in the current state, for example calling a publish method after disabling local capture.
4ERR_NOT_SUPPORTEDThe operation isn't supported in the current state.
6ERR_NOT_IN_CHANNELThe connection hasn't successfully joined a channel.Join a channel first.
7ERR_NOT_INITIALIZEDThe service isn't initialized.Call agora_rtc_init first.
8ERR_NOT_EXIST_CONNECTIONThe connection doesn't exist.
10ERR_TIMEDOUTThe API call timed out because processing took longer than 10 seconds.
11ERR_NO_MEMORYThe device is out of memory.Free up memory.
12ERR_CALL_FAILEDThe API call failed.Retry with valid parameters.
14ERR_NET_DOWNThe network is unavailable.Check the device's network connection.
17ERR_JOIN_CHANNEL_REJECTEDThe join channel request was rejected. The local user may already be in the channel.Avoid joining the same channel more than once.
18ERR_LEAVE_CHANNEL_REJECTEDThe leave channel request was rejected. The local user has already left the channel.
23ERR_LICENSE_VERIFICATION_FAILURESDK initialization failed because the license didn't pass verification.Verify that the license is valid.
30ERR_ENCRYPTIONAn encryption error occurred.Check your encryption settings.
31ERR_DECRYPTIONA decryption error occurred.Check your decryption configuration.
CodeEnumExplanationSolution
101ERR_INVALID_APP_IDThe App ID isn't valid.Replace it with a valid App ID and rejoin the channel.
102ERR_INVALID_CHANNEL_NAMEThe channel name isn't valid, or the parameter's data type is incorrect.Use a valid channel name and rejoin the channel.
103ERR_NO_SERVER_RESOURCESIoT SDK can't obtain server resources for the specified region.Retry, or select a different region.
105ERR_LOOKUP_CHANNEL_REJECTEDThe Agora server rejected the request to look up the channel.Check whether the RTC token is valid.
107ERR_OPEN_CHANNEL_REJECTEDThe Agora server rejected the request to create the channel.Check whether the RTC token is valid.
109ERR_TOKEN_EXPIREDThe RTC token has expired.Generate a new RTC token on your server, and rejoin the channel with it.
110ERR_INVALID_TOKENThe token isn't valid.Make sure token authentication is enabled in Agora Console, and that the UID used to generate the token matches the UID used to join the channel.
115ERR_DYNAMIC_TOKEN_BUT_USE_STATIC_KEYToken authentication is enabled, but the join channel call passed an App ID instead of a token.Pass a token to the join channel call.
119ERR_SET_CLIENT_ROLE_NOT_AUTHORIZEDSwitching the user role failed.Rejoin the channel.
120ERR_DECRYPTION_FAILEDDecryption failed. The user may be using an incorrect encryption key or salt.Check your encryption settings, or rejoin the channel.
121ERR_OPEN_CHANNEL_INVALID_TICKETA signaling error occurred while opening the channel.Rejoin the channel.
122ERR_OPEN_CHANNEL_TRY_NEXT_VOSIoT SDK is switching servers.No action is usually needed; IoT SDK retries automatically.
123ERR_CLIENT_IS_BANNED_BY_SERVERThe server banned this client.Check whether the license is correct.
CodeEnumExplanation
200ERR_AUDIO_CODEC_NOT_SUPPORTIoT SDK doesn't support the audio codec you're using.
201ERR_AUDIO_INVALID_PCM_LENThe PCM audio data length isn't valid.
202ERR_AUDIO_INVALID_CODEC_PARAMThe audio codec parameters aren't valid.
CodeEnumExplanation
300ERR_VIDEO_SEND_OVER_BANDWIDTH_LIMITVideo data is sending too fast and exceeds the bandwidth limit. Packet loss is likely at the current sending rate.
301ERR_VIDEO_SEND_PACKETIZE_FAILEDPacketizing the video data failed.
CodeEnumExplanationSolution
600ERR_RDT_USER_NOT_EXISTThe peer user doesn't exist in the channel.
601ERR_RDT_USER_NOT_READYThe RDT connection with the peer user isn't established yet.Wait for the RDT channel state to become RDT_STATE_OPENED, then retry.
602ERR_RDT_DATA_BLOCKEDThe send buffer is full.Wait for the RDT channel state to become RDT_STATE_OPENED, then retry.
603ERR_RDT_CMD_EXCEED_LIMITThe number of control messages exceeds the limit of 100 packets per second.
604ERR_RDT_DATA_EXCEED_LIMITThe data message traffic exceeds the limit of 4 Mbps per second.
CodeEnumExplanationSolution
1001ERR_RTM_NOT_LOGINEDThe device isn't logged in to the RTM system.
1002ERR_RTM_HAD_LOGINEDThe device is already logged in to the RTM system.
1003ERR_RTM_SEND_TO_SELFThe rtmUid parameter was set to the local user's own user ID by mistake.
1004ERR_RTM_EXCEED_MSG_SIZEThe RTM message exceeds the maximum length of 31 KB.
1005ERR_RTM_EXCEED_MSG_CNTThe RTM message sending rate exceeds the limit of 60 messages per second.
1006ERR_RTM_EXCEED_SND_BUFFERThe message channel is full.Wait one second, then retry.