Members
(static) INVALID_PARAMETER
- Default Value:
- 
              - 0x1000
 
Invalid parameter.
(static) INVALID_OPERATION
- Default Value:
- 
              - 0x1001
 
Invalid operation.
(static) NOT_SUPPORTED
- Default Value:
- 
              - 0x1002
 
Not supported. 
              Note: this error is reported when an SDK API is called, indicating that the current browser does not support calling the API. 
              Handling suggestion: use a browser supported by the SDK. Reference: Check supported browsers
(static) DEVICE_NOT_FOUND
- Default Value:
- 
              - 0x1003
 
User's device has not microphone or camera, but trying to capture microphone or camera. Handling suggestion: Guide user to check their microphone or camera. We suggest you check user device before calls. Reference: Environment and Device Check Before Calls
(static) SIGNAL_CHANNEL_SETUP_FAILED
- Default Value:
- 
              - 0x4001
 
Failed to establish the WebSocket signaling channel.
Account errors:
| Error Code | Error Type | Description | 
|---|---|---|
| -8 | Account system | Incorrect sdkAppId. Please check whethersdkAppIdis entered correctly. | 
| 70001 | Account system | userSighas expired. Please generate again. If the signature expires immediately after generation, check whether the validity period is too short or set to 0. | 
| 70002 | Account system | The length of userSigis 0. Please access sign_src to get the source code for signature calculation and check the parameters to make sure that the signature is calculated correctly. | 
| 70003 | Account system | userSigverification failed. Please check whether the content ofuserSighas been truncated due to short buffer length, etc. | 
| 70004 | Account system | userSigverification failed. Please check whether the content ofuserSighas been truncated due to short buffer length, etc. | 
| 70005 | Account system | userSigverification failed. Please check whether theuserSiggenerated is correct with the help of a tool. | 
| 70006 | Account system | userSigverification failed. Please check whether theuserSiggenerated is correct with the help of a tool. | 
| 70007 | Account system | userSigverification failed. Please check whether theuserSiggenerated is correct with the help of a tool. | 
| 70008 | Account system | userSigverification failed. Please check whether theuserSiggenerated is correct with the help of a tool. | 
| 70009 | Account system | Failed to verify userSigwith the business public key. Please check whether the private key andsdkAppIdused to generateuserSigmatch. | 
| 70010 | Account system | userSigverification failed. Please check whether theuserSiggenerated is correct with the help of a tool. | 
| 70013 | Account system | userIdinuserSigis different from that in the request. Please check whether theuserIdentered during login is the same as that inuserSig. | 
| 70014 | Account system | sdkAppIdinuserSigis different from that in the request. Please check whether thesdkAppIdentered during login is the same as that inuserSig. | 
| 70015 | Account system | The verification method for this sdkAppIdand account type was not found. Please check whether account integration has been performed. | 
| 70016 | Account system | The length of the public key pulled is 0. Please check whether a public key has been uploaded. If it was just uploaded, try again in 10 minutes. | 
| 70017 | Account system | Internal validation of third-party ticket timed out. Please try again. If the problem persists after multiple retries, contact TLS account support over QQ at 3268519604. | 
| 70018 | Account system | Internal validation of third-party ticket failed. | 
| 70019 | Account system | The ticket field for HTTPS-based validation is empty. Please enter the correct userSig. | 
| 70020 | Account system | sdkAppIdwas not found. Please make sure you have configured it in Tencent Cloud. | 
| 70052 | Account system | Invalid userSig. Please generate a new one and try again. | 
| 70101 | Account system | Empty request packet. | 
| 70102 | Account system | Incorrect account type in request packet. | 
| 70103 | Account system | Incorrect phone number format. | 
| 70104 | Account system | Incorrect email address format. | 
| 70105 | Account system | Incorrect TLS account format. | 
| 70106 | Account system | Invalid account format type. | 
| 70107 | Account system | userIdwas not registered. | 
| 70113 | Account system | Invalid batch number. | 
| 70114 | Account system | Restricted for security reasons. | 
| 70115 | Account system | The uindoes not match that of thesdkAppIddeveloper. | 
| 70140 | Account system | sdkAppIdandacctypedo not match. | 
| 70145 | Account system | Incorrect account type. | 
| 70169 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70201 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70202 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70203 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70204 | Account system | sdkAppIdhas no matchingacctype. | 
| 70205 | Account system | Failed to find acctype. Please try again. | 
| 70206 | Account system | Invalid batch number in request. | 
| 70207 | Account system | Internal error. Please try again. | 
| 70208 | Account system | Internal error. Please try again. | 
| 70209 | Account system | Failed to get the developer's uin. | 
| 70210 | Account system | The uinin the request is not a developeruin. | 
| 70211 | Account system | Invalid uinin request. | 
| 70212 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70213 | Account system | Failed to access internal data. Please try again. If the problem persists after multiple retries, contact TLS account support over QQ at 3268519604. | 
| 70214 | Account system | Internal ticket validation failed. | 
| 70221 | Account system | Invalid login status. Please authenticate your login with UserSigagain. | 
| 70222 | Account system | Internal error. Please try again. | 
| 70225 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70231 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70236 | Account system | User signature verification failed. | 
| 70308 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70346 | Account system | Ticket validation failed. | 
| 70347 | Account system | Ticket expired and validation failed. | 
| 70348 | Account system | Internal error. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70362 | Account system | Internal timeout. Please try again. If the problem persists after multiple retries, please contact TLS account support over QQ at 3268519604. | 
| 70401 | Account system | Internal error. Please try again. | 
| 70402 | Account system | Invalid parameter. Please check whether all required fields are filled in and the values entered meet the requirements. | 
| 70403 | Account system | The initiator is not the application admin and is not authorized to perform the operation. | 
| 70050 | Account system | The account is temporarily locked due to failed login and multiple retries. Please check whether the ticket is correct and try again in 1 minute. | 
| 70051 | Account system | Blocked account. Please contact TLS account support over QQ at 3268519604. | 
(static) SIGNAL_CHANNEL_ERROR
- Default Value:
- 
              - 0x4002
 
WebSocket signaling channel error.
Note
- Starting from v4.6.5, the SDK does not throw this error anymore.
(static) ICE_TRANSPORT_ERROR
- Default Value:
- 
              - 0x4003
 
ICE Transport connection error, i.e., audio/video data transmission channel error.
              
              This error is mainly caused by UDP port exception on the user side, possibly due to the user's computer firewall or router firewall port restrictions. For port details, see the allowlist of ports。
            
Note
- Starting from v4.6.6, the SDK does not throw this error anymore.
- To listen for user network exceptions, you can use the NETWORK_QUALITY event
(static) JOIN_ROOM_FAILED
- Default Value:
- 
              - 0x4004
 
Room entering failed.
| Error Code | Message |
| 5001 | Server timeout, Please try again. |
              | 10006 | Service is suspended due to overdue payments. Log in to the RTC console, find the application you created, and click Application Info to view the status of your TRTC service.
              | -10011 | Unknown server error. Please try again.
              | -10012 | roomId is not passed in or does not meet requirements. To use roomId of string type, set useStringRoomId to true when calling TRTC.createClient.
              | -10013 | userSig authentication failed.
              | -10015 | Failed to get the server node on the server. Please try again.
              | -10016 | Failed to create the room on the server. Check if roomId meets QoS requirements.
              | -10017 | Room entry timeout or room entry parameters do not match. Check whether the room entry is blocked and whether multiple clients with the same userId are created to execute the room entry logic simultaneously.
              | -10018 | After advanced permission control is enabled, client.join does not carry privateMapKey or privateMapKey is ''. For details, see Enabling Advanced Permission Control.
              | -10019 | After advanced permission control is enabled, privateMapKey carried by client.join does not meet the requirements. For details, see Enabling Advanced Permission Control.
              | -10020 | Server connection timed out. Please try again.
              | -100013 | Service is suspended due to overdue payments. Log in to the Enabling Advanced Permission Control, find the application you created, and click Application Info to view the status of your TRTC service.
              | -100022 | Server assignment failed. Please try again.
              | -100024 | Room entry failed because the TRTC service is disabled. Go to the IM console to enable the TRTC service for your application.
(static) CREATE_OFFER_FAILED
- Default Value:
- 
              - 0x4005
 
Failed to create SDP offer.
(static) SIGNAL_CHANNEL_RECONNECTION_FAILED
- Default Value:
- 
              - 0x4006
 
Failed to reconnect the WebSocket signaling channel. 
              Description: when the WebSocket is disconnected, the SDK retries the connection multiple times and throws this error if all the retries fail. 
              Handling suggestion: remind the user to check the network and enter the room again.
(static) UPLINK_RECONNECTION_FAILED
- Default Value:
- 
              - 0x4007
 
Upstream peer connection retries failed. 
              Description: when the upstream peer connection is disconnected, the SDK retries the connection multiple times and throws this error if all the retries fail. 
              Handling suggestion: remind the user to check the network and perform push again or enter the room again.
(static) DOWNLINK_RECONNECTION_FAILED
- Default Value:
- 
              - 0x4008
 
Downstream peer connection retries failed. 
              Description: when the downstream peer connection is disconnected unexpectedly, the SDK retries the connection multiple times and throws this error if all the retries fail. 
              Handling suggestion: remind the user to check the network and enter the room again.
(static) CLIENT_BANNED
- Deprecated:
- 
              - since v4.14.0
 
- Default Value:
- 
              - 0x4040
 
User was kicked out.
(static) SERVER_TIMEOUT
- Default Value:
- 
              - 0x4041
 
Media transmission service timed out.
(static) SUBSCRIPTION_TIMEOUT
- Default Value:
- 
              - 0x4042
 
Remote stream subscription timed out.
(static) PLAY_NOT_ALLOWED
- Default Value:
- 
              - 0x4043
 
Autoplay disabling error. 
              Description: when you call play() to play audio/video, the autoplay fails due to autoplay policy restrictions.
              Handling suggestion: display a window for users to click to trigger the callback function and call the resume() API in the callback function to resume audio/video playback. For details, see Suggested Solutions for Autoplay Restrictions
(static) DEVICE_AUTO_RECOVER_FAILED
- Default Value:
- 
              - 0x4044
 
Failed to resume camera/mic capturing. 
Note
- This error is thrown when a local stream error occurs.
- When the media device that the user is using for push changes (which may be caused by a loose port or camera/mic plugging/unplugging), the SDK tries to resume capturing and throws this error when the resumption fails.
- Handling suggestion: remind users: The media device fails to automatically resume capturing. Check whether the ports of the camera and microphone are loose and not occupied by other applications.
- You can provide a button on the web page for users to click to retry camera and mic capturing. See the following code sample:
Example
// Retry process
localStream.on('error', async error => {
  if (error.getCode() === 0x4044) {
    const newStream = TRTC.createStream({ userId: 'your userId', audio: true, video: true });
    try {
      await newStream.initialize();
      // Get the camera and mic tracks
      const videoTrack = newStream.getVideoTrack();
      const audioTrack = newStream.getAudioTrack();
      // Replace the camera and mic tracks separately
      localStream.replaceTrack(videoTrack);
      localStream.replaceTrack(audioTrack);
    } catch (err) {
      // Capturing failed. Ask the user to check the camera and mic and then retry the process. For details about the initialization error, see https://web.sdk.qcloud.com/trtc/webrtc/v4/doc/en/LocalStream.html#initialize
    }
  }
});(static) START_PUBLISH_CDN_FAILED
- Default Value:
- 
              - 0x4045
 
Failed to start publishing streams to CDN.
(static) STOP_PUBLISH_CDN_FAILED
- Default Value:
- 
              - 0x4046
 
Failed to stop publishing streams to CDN.
(static) START_MIX_TRANSCODE_FAILED
- Default Value:
- 
              - 0x4047
 
Failed to start mixtranscoding.
(static) STOP_MIX_TRANSCODE_FAILED
- Default Value:
- 
              - 0x4048
 
Failed to stop mixtranscoding.
(static) NOT_SUPPORTED_H264
- Default Value:
- 
              - 0x4049
 
The current device does not support H.264.
(static) SWITCH_ROLE_FAILED
- Default Value:
- 
              - 0x404a
 
Failed to change the role.
(static) API_CALL_TIMEOUT
- Default Value:
- 
              - 0x404b
 
API call timeout. 
Handling suggestions:
- Call the API again for retry. Be sure to control the retry frequency.
- If this error is reported for the Client.publish or Client.subscribe API, it is possible that the user's network environment (usually the enterprise's private network) is restricted by firewalls and cannot connect to the server. 
 You are advised to change to another network and try again or check the network firewall settings to ensure that the ports are in open status on the allowlist of ports
(static) SCHEDULE_FAILED
- Default Value:
- 
              - 0x404c
 
- See:
- 
              - Client#join throws this error
 
Schedule failed
When calling the client.join interface, the SDK first initiates a scheduling request to get information about the nearest access server. This error is thrown when the scheduling request fails.
The error is usually caused by a network reason, and the treatment is recommended:
- Please check the network firewall, refer to WhiteList of firewall。
(static) API_CALL_ABORTED
- Default Value:
- 
              - 0x404d
 
API call was aborted.
eg:
- call client.leave() before client.publish() done, client.publish() will fails and throws this error.
- call client.unsubscribe() or client.leave() before client.subscribe() done(), client.publish() will fails and throws this error.
- remote user unpublish stream when client.subscribe() is pending, client.subscribe9) will fails and throws this error.
Handling suggestions: The business side can evaluate whether the timing of such API calls meets the business expectations. If it does, no processing is needed; if it does not, the calling sequence can be adjusted or a retry can be prompted.
(static) UNKNOWN
- Default Value:
- 
              - 0xFFFF
 
Unknown error.