The Agora Web 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 Code | Value | Description |
---|---|---|
STREAM_ALREADY_PUBLISHED | / | The stream has already been published. |
INVALID_LOCAL_STREAM | / | The stream is illegal. |
INVALID_OPERATION | / | The user has failed to join the channel, or joined the same channel. |
PUBLISH_STREAM_FAILED | / | The user has failed to publish the stream. |
PEERCONNECTION_FAILED | / | P2P connection failed |
STREAM_NOT_YET_PUBLISHED | / | The stream has not yet been published. |
UNPUBLISH_STREAM_FAILED | / | The stream has failed to be unpublished. |
INVALID_REMOTE_STREAM | / | The remote stream is illegal. |
SUBSCRIBE_STREAM_FAILED | / | The user has failed to subscribe to a stream. |
NO_SUCH_REMOTE_STREAM | / | There is no such remote stream in the channel. |
UNSUBSCRIBE_STREAM_FAILED | / | The user has failed to unsubscribe from a stream. |
INVALID_PARAMETER | / | Incorrect parameter type |
JOIN_TOO_FREQUENT | / | The request for joining a channel is too frequent. |
IOS_NOT_SUPPORT | / | The iOS Safari browser does not support the low stream. |
STILL_ON_PUBLISHING | / | Cannot enable or disable the low stream when publishing the stream |
ENABLE_DUALSTREAM_FAILED | / | Failed to enable the low stream |
SHARING_SCREEN_NOT_SUPPORT | / | The screen-share function does not support the low stream |
LOW_STREAM_ALREADY_PUBLISHED | / | The low stream has already been published. |
HIGH_STREAM_NOT_VIDEO_TRACE | / | Unable to obtain the channel of the high stream |
NOT_FIND_DEVICE_BY_LABEL | / | Unable to find the device of the high stream |
DISABLE_DUALSTREAM_FAILED | / | Failed to disable the low stream |
LOW_STREAM_NOT_YET_PUBLISHED | / | The low stream has not been published. |
ERR_JOIN_CHANNEL_TIMEOUT | 2002 | Timeout in joining the channel |
ERR_FAILED | 1 | General error (the reason is not classified specifically) |
ERR_INVALID_VENDOR_KEY | 101 | The specified App ID is invalid. |
ERR_INVALID_CHANNEL_NAME | 102 | The specified Channel Name is invalid. |
ERR_DYNAMIC_KEY_TIMEOUT | 109 | The current Channel Key or Token is invalid. This error occurs if you use the generated Channel Key or Token after one day. |
ERR_NO_AUTHORIZED | 110 | The current Channel Key is not authorized. |
ERR_NO_ACTIVE_STATUS | 116 | The current App ID is not activated. |
ERR_INVALID_UID | 117 | The UID is invalid. |
ERR_DYNAMIC_KEY_EXPIRED | 118 | The current Channel Key or Token has expired, and is no longer valid. |
ERR_STATIC_USE_DYNAMIC_KEY | 119 | The static user has used the dynamic key. |
ERR_DYNAMIC_USE_STATIC_KEY | 120 | The dynamic user has used the static key. |
K_TIMESTAMP_EXPIRED | 2 | The Channel Key or Token has expired, and is no longer valid. |
K_CHANNEL_PERMISSION_INVALID | 3 | The user has no permission to join the channel. Consult the channel manager to solve this issue. |
K_CERTIFICATE_INVALID | 4 | The App Certificate is invalid. |
K_CHANNEL_NAME_EMPTY | 5 | The Channel Name is empty. |
K_CHANNEL_NOT_FOUND | 6 | The specified channnel is not found. |
K_TICKET_INVALID | 7 | The ticket is invalid. |
K_CHANNEL_CONFLICTED | 8 | The channel is conflicted. |
K_SERVICE_NOT_READY | 9 | The service is not ready. |
K_SERVICE_TOO_HEAVY | 10 | The service is too busy. |
K_UID_BANNED | 14 | The UID is banned. |
K_IP_BANNED | 15 | The IP is banned. |
K_CHANNEL_BANNED | 16 | The channel is banned. |
Warn Code | Value | Description |
---|---|---|
WARN_NO_AVAILABLE_CHANNEL | 103 | No channel resources are available. Such as the server cannot 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 too 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 too 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_REQUEST_DEFERRED | 108 | The user’s request is deferred. |