When the SDK is running with network or media-related errors, the SDK cannot be automatically restored and requires APP intervention or user prompts. If there is an error message in the returned result after calling an interface, an error message in the event callback, or an error log in the console log, it means that the interface is called abnormally.
const { errorCode, extendedData } = await zg.setCaptureVolume(stream, result);
// errorCode Is the Error Codes, extendedData is the error Description information
console.log(errorCode, extendedData);
zg.on('roomStateUpdate', (roomID, state, errorCode, extendedData) => {
if (errorCode !== 0) {
// errorCode Is the Error Codes, extendedData is the error Description information
console.log(errorCode, extendedData);
}
})
Generic class Error Codes error Error Codes common interfaces, usually call startPublishingStream , startPlayingStream interfaces will appear, and the following processing according to the corresponding Error Codes.
Error Codes | Description |
---|---|
0 | Successful execution. |
1000002 | Not logged in to the room, please log in to the room before calling publish streams or play streams. |
1000014 | The input stream ID is very long, and the maximum input is 256 characters. |
1000015 | The input stream ID is empty. |
1000016 | The input stream ID contains illegal characters. |
1000017 | The network is down. |
1000018 | Local stream error. |
1000019 | The input stream ID contains illegal characters. |
1100001 | Parameter error. |
1100002 | The request response timed out, possibly due to network reasons. |
1100003 | The socket is closed, possibly due to network reasons. |
1100999 | Unknown error on the server, please contact ZEGOCLOUD technical support. |
Error Codes in the debugging phase refer to the errors that developers tend to make during application development, and are generally manifested as interface parameter errors.
Error Codes | Description |
---|---|
1001004 | Description: Authentication failed. Cause: Incorrect AppID; using AppID in wrong environment. Solutions: Please check AppID is correct or not on ZEGOCLOUD manage console, or check whether the environment configured by AppID is consistent with the environment set by SDK. |
1001021 | Description: Set geo fence failed. Cause: Set geo fence after initialize the SDK. Solutions: Please set geo fence before initialize the SDK. |
1101000 | SDK initialization failed. Please check whether the appID and server format and content are correct. |
1101001 | The call to the getSetting method of the WeChat applet failed to detect whether the Camera and Microphone functions are normal. |
1101002 | Description: Failed to get streaming service configuration. Cause: Failed to obtain streaming media service configuration. Solutions: Please contact ZEGOCLOUD technical support. |
An error occurred when calling the loginRoom interface, usually due to an error in the login room parameter, and an abnormality in the communication between the SDK and the ZEGOCLOUD room server.
Error Codes | Description |
---|---|
1002001 | The number of registered rooms exceeds the upper limit. Currently, only one main room and one multi-room can be logged in at the same time. |
1002005 | Enter the user ID is empty. |
1002006 | The entered user ID contains illegal characters. |
1002007 | The input user ID is too long, and the maximum length should be less than 64 bytes. |
1002008 | Enter the username as blank. |
1002009 | The entered user name contains illegal characters. |
1002010 | The entered user name is too long, and the maximum length should be less than 256 bytes. |
1002011 | Enter the room ID is empty. |
1002012 | The entered room ID contains illegal characters. |
1002013 | The input room ID is too long, and the maximum length should be less than 128 bytes. |
1002014 | The room is not logged in or the room is disconnected. |
1002017 | Description: The number of keys set in the room additional message exceeds the maximum number of supported limits. Cause: called setRoomExtraInfo Different keys have been passed in multiple times. Solutions: please contact ZEGOCLOUD technical support. |
1002018 | Description: In multi-room mode, the user ID or user name logging into the room is different. Cause: In multi-room mode, different user IDs or user names are passed in when logging into multi-rooms. Solutions: In multi-room mode, the user ID or user name passed in must be the same. |
1002031 | The login room timeout may be caused by network reasons. |
1002034 | The number of users logging in to the room exceeds the maximum number of users configured in the room (the default maximum number of users in the room is 50 in the test environment, and there is no limit in the formal environment). |
1002050 | The user was kicked out of the room. It may be that the same user ID was logged in on another device. |
1002053 | Retrying to log in to the room exceeds the maximum retry time. |
1002055 | The business backstage sent a signal to kick out of the room. Please check the reason for the kick. |
1002056 | The user logs in repeatedly. |
1002099 | System internal abnormality causes room login failure, please contact ZEGOCLOUD technical support. |
1102001 | The heartbeat timeout may be caused by network reasons. |
1102011 | The data format is wrong, please contact ZEGOCLOUD technical support. |
1102012 | The login process is being performed. |
1102013 | The room signaling request is incorrect, which may be caused by network reasons. |
1102014 | ZPush failed, please contact ZEGOCLOUD technical support. |
1102015 | User login status is wrong. |
1102016 | Login token error. |
1102017 | Scheduling failed. |
1102018 | Login token timeout. |
1102019 | Subcmd error, please contact ZEGOCLOUD technical support. |
1102020 | Login authentication failed. |
1102021 | biz_channel error, please contact ZEGOCLOUD technical support. |
1102022 | The call request timed out, which may be caused by network reasons. |
1102023 | Failed to connect to the media server, possibly due to network reasons. |
1102025 | Description: Failed to report local logs. Cause: It may be due to network reasons. Solutions: Please try switching the network and try again. |
After calling the publish streams interface, or if an exception occurs during the publish streams process, the developer can obtain the relevant Error Codes from the publisherStateUpdate callback, and please deal with it accordingly according to the following Error Codes.
Handling the case where the publish streams callback Error Codes is not 0:
Error Codes | Description |
---|---|
1103001 | Incorrect publish streams parameters. |
1103002 | HTTPS or localhost is required. |
1103003 | The media connection failed, possibly due to the network. |
1103010 | Screen Sharing failed. |
1103011 | Device information enumeration failed. |
1103020 | Failed to obtain the media service address. |
1103021 | The media service connection failed. |
1103022 | Offer creation failed. |
1103023 | Failed to set local SDP. |
1103024 | SDP sending failed. |
1103025 | Remote SDP error. |
1103026 | The candidate information used by the webrtc connection is incorrect. |
1103027 | The media connection is closed. |
1103028 | ice connection failed. |
1103029 | Incorrect setting of publish streams parameters. |
1103030 | publish streams fails and retry timeout. |
1103040 | Modify the parameters when the stream is not publish streams. Note: The meaning of this error code in versions prior to 3.0.0 was: "The current publish quality is poor, or the network is poor. Please check your network." |
1103041 | The device is plugged in or loosened. |
1103042 | The user actively canceled Screen Sharing. |
1103043 | The current browser does not support Screen Sharing. |
1103044 | Not a stream created by createStream. |
1103045 | The media stream does not contain Video. |
1103046 | The media stream does not contain Audio. |
1103047 | The MediaStreamTrack object could not be found. |
1103048 | The device cannot be found. |
1103049 | Pull the same stream repeatedly. |
1103050 | websocket disconnected. |
1103051 | publish streams retry timeout. |
1103052 | CDN publish streams error. |
1103053 | The HTTPS protocol must be used. |
1103054 | There is no Preview. |
1103055 | The publish streams could not be found. |
1103056 | publish streams. |
1103057 | Audio decoding failed. |
1103058 | The client IP has changed. |
1103059 | publish streams network node expired |
1103060 | The session request timed out. |
1103061 | Failed to get media. |
1103064 | The media stream does not have device permissions. |
1103065 | The device cannot be used to capture media streams. It may be that the camera or microphone is occupied by another application. |
1103066 | The device parameters for creating the stream are wrong. |
After calling the play streams interface, or if an exception occurs in the middle of the play streams , the developer can obtain the relevant Error Codes from the playerStateUpdate play streams state callback. Please deal with the corresponding error code according to the following Error Codes.
Error Codes | Description |
---|---|
1104001 | play streams parameter error. |
1104020 | Failed to obtain the media service address. |
1104021 | The media service connection failed. |
1104022 | Offer creation failed. |
1104023 | Failed to set local SDP. |
1104024 | SDP sending failed. |
1104025 | Remote SDP error. |
1104026 | Wrong candidate. |
1104027 | The media connection is closed. |
1104028 | ice connection failed. |
1104029 | Disconnected from the media service. |
1104030 | The server negotiation timed out. |
1104031 | play streams failed to retry timeout. |
1104032 | Already in the play streams. |
1104033 | The client IP has changed. |
1104034 | The play streams network node has expired. |
1104035 | Reset session push. |
1104036 | The request session timed out. |
1104037 | Quality detection timed out. |
Call the start Stream Mixing stream startMixerTask and stop Stream Mixing stream stopMixerTask interface to return possible errors in the result.
Error Codes | Description |
---|---|
1005000 | No Stream Mixing traffic service, please contact ZEGOCLOUD technical support to enable it. |
1005001 | The Stream Mixing task ID is empty. |
1005002 | The Stream Mixing task ID is too long, with a maximum of 256 characters. |
1005003 | Illegal characters in the Stream Mixing task ID. |
1005005 | The Stream Mixing task configuration does not specify an output. |
1005006 | The Stream Mixing output target is wrong, please check whether illegal characters are passed in when "target" is "streamID". |
1005010 | The request to start a Stream Mixing task failed, which may be caused by network reasons. |
1005011 | The request to stop the Stream Mixing task failed, which may be caused by network reasons. |
1005012 | This Stream Mixing task must be stopped by the user who started the task. |
1005020 | The input stream list of the Stream Mixing task is empty. |
1005021 | The Stream Mixing task output list is empty. |
1005023 | The video configuration of the Stream Mixing Video task is invalid. |
1005025 | The maximum number of input streams is exceeded, and a maximum of 9 input streams are supported. |
1005026 | The input stream does not exist. |
1005027 | The Stream Mixing stream input parameter is wrong. It may be that the layout of the input stream exceeds the canvas range. |
1005028 | Description: Mixed input text watermark is too long. Cause: The length of the text watermark of the mixed stream input parameter exceeds the limit. Solutions: Please make sure the input text watermark length does not exceed 512 bytes. |
1005030 | The maximum number of output streams is exceeded, and a maximum of 3 output streams are supported. |
1005034 | Description: The link to the muxed input image is too long. Cause: The length of the image link of the mixed stream input parameter exceeds the limit. Solution: Please make sure that the length of the input image link does not exceed 1024 bytes. |
1005035 | Description: Failed to mix stream input image. Cause: The image format of the mixed stream input parameter is incorrect. Solution: Use JPG and PNG formats. There are 2 ways to use it: 1. URI: Provide the picture to ZEGOCLOUD technical support for configuration. After the configuration is complete, the picture URI will be provided, for example: preset-id://xxx.jpg. 2. URL: Only HTTP protocol is supported. |
1005036 | Description: Failed to mux input image. Cause: The image size of the mixed stream input parameter exceeds the limit. Solution: Image size is limited to 1M. |
1005050 | Stream Mixing authentication failed. |
1005061 | Description: Failed to start mixed stream. Cause: The input image watermark is empty. Solutions: Please enter the correct watermark parameters [ZegoWatermark]. |
1005062 | Description: Failed to start mixed stream. Cause: The input image watermark parameter is wrong, it may be that the layout exceeds the canvas range. Solutions: Please enter the correct watermark parameters [ZegoWatermark]. |
1005063 | Description: Failed to start mixed stream. Cause: The input watermark URL is illegal. Solutions: The watermark URL must start with preset-id:// and end with .jpg or .png . |
1005067 | Entering the background image URL is illegal. It must start with "preset-id://" and end with .jpg or .png. |
1005070 | automatic Stream Mixing server not found, please contact technical support ZEGOCLOUD configuration. |
1005099 | Stream Mixing internal error. |
The process of publish streams and play streams may cause errors in the audio and Video equipment used. When the developer receives deviceError the "errorCode" of the device exception callback parameter is not 0, please follow the Error Codes below deal with.
Error Codes | Description |
---|---|
1006006 | The device was unplugged. |
Errors in sending IM messages.
Error Codes | Description |
---|---|
1009001 | The message content is empty. |
1009002 | The message content is too long. |
1009010 | Failed to send message. |
1109001 | Message frequency is limited. |
The errors related to the SDK's copyrightedmusic functions.
Error Code | Description |
---|---|
1017000 | Description: The command invalid. Cause: The command entered by the [sendExtendedRequest] function is empty. Solutions: Please check the command entered when calling the [sendExtendedRequest] function to make sure it is not empty. |
1017001 | Description: The params invalid. Cause: The params entered by the [sendExtendedRequest] function is empty. Solutions: Please check the params entered when calling the [sendExtendedRequest] function to make sure it is not empty. |
1017002 | Description: The song_id invalid. Cause: The song_id entered is empty. Solutions: Please check the song_id entered when calling the function to make sure it is not empty. |
1017003 | Description: The share_token invalid. Cause: The share_token entered is empty. Solutions: Please check the share_token entered when calling the function to make sure it is not empty.share_token can be obtained by call [requestResource] |
1017004 | Description: The resource_id invalid. Cause: The resource_id entered is empty. Solutions: Please check the resource_id entered when calling the function to make sure it is not empty.resource_id can be obtained by call [requestResource] [getSharedResource] |
1017005 | Description: The start_position invalid. Cause: The start_position entered by the fuction [loadCopyrightedMusicResourceWithPosition] is invalid. Solutions: Please check the start_position entered when calling the function [loadCopyrightedMusicResourceWithPosition] to make sure it is in 0 ~ song duration. |
1017006 | Description: The position invalid. Cause: The position entered by the fuction [seek] is invalid. Solutions: Please check the position entered when calling the function [seek] to make sure it is in 0 ~ song duration. |
1017007 | Description: The volume invalid.. Cause: The Volume entered by the fuction [setPlayVolume] is invalid. Solutions: Please check the Volume entered when calling the function [setPlayVolume] to make sure it is in 0 ~ 200. |
1017008 | Description: The krcToken invalid. Cause: The krcToken entered is empty. Solutions: Please check the krcToken entered when calling the function to make sure it is not empty.krcToken can be obtained by call [requestAccompaniment] |
1017009 | Description: Copyright music init authentication failed. Cause: Appsign or token is not set. Solutions: When using token authentication, call [loginRoom] before calling [initCopyrightedMusic] or use appsign authentication. |
1017010 | Description: Request copyrighted server fail. Cause: The params entered make mistake or some network reasons. Solutions: Please check the params entered and retry. |
1017011 | Description: Free space limit. Cause: Free space limit. Solutions: Please clean up local files and make sure there is enough free disk space. |
1017012 | Description: Downloading. Cause: Download same resource. Solutions: Please wait for the resource to download successfully. |
1017013 | Description: Resource file not exist. Cause: Resource file has been deleted. Solutions: Please reload resource. |
1017014 | Description: Resource file expired. Cause: The resource file has expired. Solutions: Please request song or accompaniment again. |
1017015 | Description: Resource file invalid. Cause: File is corrupted Solutions: Please call [download] function to reload media resource. |
1017018 | Description: The resource_id unauthorized. Cause: The resource ID is not obtained through [requestResource] [getSharedResource] function. Solutions: Please call the [requestResource] [getSharedResource] function to get valid resource ID. |
1017019 | Description: The copyrighted resource has expired. Cause: The copyrighted resource has expired. Solutions: Please request the copyrighted resource again. |
1017020 | Description: The resource does not support this method. Cause: Wrong resource ID selection. Solutions: Please pass in the correct resource ID. |
1017030 | Description: No copyright, unable to listen to and sing songs. Cause: No copyright. Solutions: Please select another music. |
1017031 | Description: No permissions of accompaniment, can only listen to songs, not sing. Cause: No permissions of accompaniment. Solutions: Please select another music. |
1017032 | Description: Non monthly membership. Cause: Unopened monthly membership. Solutions: Open monthly membership or ues COUNT mode request music. |
1017033 | Description: No accompany. Cause: Music don't have accompany. Solutions: Please choice music have accompany. |
1017034 | Description: Resource not exist. Cause: Resource not exist. Solutions: Please select another music. |
1017040 | Description: Illegal param. Cause: The entered param is incorrect. Solutions: Please check param when entered function to make sure it is correct. |
1017041 | Description: AppID invalid. Cause: The appID is not support copyrighted music. Solutions: Please contact ZEGOCLOUD technical support. |
1017042 | Description: Billing mode invalid. Cause: Billing mode invalid. Solutions: Please select correct billing mode. |
1017043 | Description: Unreasonable_access. Cause: Monthly membership request music by COUNT. Solutions: Please select correct billing mode. |
1017044 | Description: Share token expired. Cause: Share token expired. Solutions: Please select an unexpired sharing token to get resources. |
1017045 | Description: Share token illegal. Cause: Share token illegal. Solutions: Please check songToken when entered by calling [getMusicByToken] to make sure it is correct. |
1017046 | Description: krcToken illegal. Cause: krcToken illegal. Solutions: Please check krcToken when entered by calling [getKrcLyricByKrcToken] to make sure it is correct. |
1017047 | Description: krcToken expired. Cause: krcToken expired. Solutions: Please select an unexpired krcToken to get lyrics in KRC format. |
1017048 | Description: Get lyric fail. Cause: Lyrics not found. Solutions: Please try again later. |
1017049 | Description: Get pitch fail. Cause: Pitch not found. Solutions: Please try again later. |
1017050 | Description: This resource is not shared in the room. Cause: No users in the room share this resource. Solutions: Please any one user in the room to call the [requestresource] function to request resources and share them. |
1017051 | Description: The number of times the resource is free in the room is exhausted. Cause: 1. The shared resources cannot be obtained again; 2. Shared resources have been obtained. Solutions: Please use the acquired resources, or use [requestResource] to share resources again. |
1017052 | Description: The vendor is unavailable. Cause: The vendor ID is passed in incorrectly or the corresponding copyright vendor is not activated. Solutions: Please pass in the correct vendor ID. |
1017053 | Description: This vendor does not support this function. Cause: Wrong vendor selection. Solutions: Please pass in the correct vendor ID. |
1017071 | Description: Vendor ID invalid. Cause: Wrong vendor selection. Solutions: Please pass in the correct vendor ID. |
1017072 | Description: This vendor does not support this song ID. Cause: This song ID does not exist in the copyright music library. Solutions: Please pass in the correct song ID. |
1017073 | Description: master ID invalid. Cause: When billing by owner is selected, master ID is empty. Solutions: Please pass in the correct master ID. |
1017074 | Description: The page parameter is invalid for multiple copyright searches. Cause: The page parameter must be 1 when multiple rights search is called for the first time. Solutions: Please pass in the correct page. |
1017075 | Description: resource has no pitch. Cause: resource has no pitch. Solutions: Please pass in the correct song ID. |
1017076 | Description: scene ID invalid. Cause: scene ID invalid. Solutions: Please pass in the scene ID corresponding to the opened scene. |
1017077 | Description: top ID invalid. Cause: An unsupported top ID was passed in when fetching chart songs. Solutions: Please pass in the correct top ID. |
1017095 | Description: The copyright music module does not support this method. Cause: The copyright music module does not support this function under the current platform. Solutions: Contact ZEGOCLOUD technical support to deal with it. |
1017096 | Description: The copyright music module is not initialized. Cause: The [initCopyrightedMusic] method is not called to initialize the copyright module. Solutions: Please call the [initCopyrightedMusic] method first. |
1017097 | Description: System is busy. Cause: System is busy. Solutions: Please try again. |
1017098 | Description: Failed due to network exceptions. Cause: Unknown internal error. Solutions: Contact ZEGOCLOUD technical support to deal with it. |
1017099 | Description: Failed due to internal system exceptions. Cause: Unknown internal error. Solutions: Contact ZEGOCLOUD technical support to deal with it. |
Error Codes | Description |
---|---|
100001 | Description: Parameter input error. Cause: Wrong parameters were passed in, or the interface was incorrectly called, which was not thrown through onError of the player. Solutions: Please check the incoming interface and its corresponding parameters. |
100002 | Description: Environment error. Cause: The current environment does not support the use of the player and is not thrown through onError of the player. Solutions: Please contact ZEGOCLOUD technical support. |
100003 | Description: Run failed. Cause: Generally, it is an internal error caused by the player itself. Solutions: Please contact ZEGOCLOUD technical support. |
100004 | Description: Network error. Cause: The network is disconnected or the network is abnormal. Solutions: Check whether the network is normal. |
100005 | Description: Media decoding error. Cause: The media cannot be opened, unsupported media format, error during decoding and cannot be decoded. Solutions: Please contact ZEGOCLOUD technical support. |
100006 | Description: Autoplay failed. Cause: due to browser autoplay policy restrictions. Solutions: The user needs to click to trigger the automatic playback of the video, that is, the user's click event triggers the call to the player's play() method. |
Error Codes | Description |
---|---|
1 | Error converting JSON. |
1008 | Token error. |
1009 | Scheduling error. |
10010 | The token expired. |
10011 | The token format is wrong. |
1106007 | Description: Microphone loose or rapid plug and unplug causing abnormal collection. Cause: Microphone unplugged. Solutions: Please check if the microphone is properly connected. |
1106008 | Description: Camera loose or rapid plug and unplug causing abnormal collection. Cause: Camera not connected. Solutions: Please check if the camera is properly connected. |
1106009 | Description: Audio track collection exception detected and stopped. Cause: Audio collection device (such as microphone) connection abnormal. Solutions: Please check if the device is connected properly. If everything is normal, please retry or contact ZEGOCLOUD technical support. |
1106010 | Description: Video track collection exception detected and stopped. Cause: Video collection device (such as camera) connection abnormal. Solutions: Please check if the device is connected properly. If everything is normal, please retry or contact ZEGOCLOUD technical support. |