Last Updated on : 2024-06-17 07:55:25download
This topic describes the error codes for operations supported by the IPC SDK. Certain error codes apply to P2P SDK.
Status code | Description | Possible cause |
---|---|---|
0 | No error has occurred. | - |
-1 | The SDK is uninitialized. | - |
-3 | A connection timeout error has occurred. Try reconnection. | - |
-5 | The parameter is invalid. | - |
-11 | The session is invalid. | - |
-12 | The device closes the connection. | - |
-13 | The session was closed. | - |
-14 | The device closes the session. | - |
-16 | The listener is interrupted. | - |
-19 | The connection is interrupted. | The break() method was called. |
-23 | The number of sessions has reached the upper limit. | - |
-24 | The preconnection is invalid. | - |
-25 | The preconnection was closed. | - |
-26 | The preconnection has been activated. | - |
-29 | The system has run out of memory. | - |
-30 | The API request failed. | - |
-31 | The preconnection is not supported. | - |
-33 | A timeout error has occurred while getting the token. | - |
-38 | DTLS handshake timed out (WebRTC is available). | - |
-39 | The peer did not respond to the preconnection command. | - |
-40 | The number of preconnections has reached its limit. | - |
-50 | An answer or candidate was not received. | - |
-52 | TCP relay socket connect failed. | - |
-53 | TCP relay socket connect to the peer failed. | - |
-55 | The token has expired. | - |
-56 | The token does not match. | - |
-57 | Token verification failed. | - |
-58 | The MQTT message sending failed. | - |
-100 | The peer has terminated the P2P communication. | - |
-102 | The device runs in privacy mode and the requested session is closed. | - |
-103 | Failed to create a data sending thread. The requested session is closed. | - |
-104 | The maximum number of sessions has been reached. The requested session is closed. | - |
-105 | The authentication failed. The requested session is closed. Reconnection is recommended. | - |
-106 | The session is closed as expected. The return value of recv() is -13 . |
- |
-108 | A zombie session that cannot be terminated or rolled back has occurred due to a malfunction or deadlock. The session is closed forcibly. | No data communication occurs for more than 20 minutes. |
-109 | You have called the open API to manually close a session. | - |
-110 | You have called the open API to exit the P2P module. | - |
-111 | You have called the open API to make the device run in privacy mode. | - |
-113 | The device is processing a call. | - |
-114 | Failed to request application resources. | - |
-1000 | The request parameter is invalid. | - |
-1001 | The API request failed. | - |
-1002 | Invalid data was returned in the response. | - |
-1010 | The parameters of the method are invalid. | - |
-1011 | Failed to call the API method. | - |
-1020 | The device information is empty. | Check whether the list of devices was returned. |
-1021 | P2pType is not supported. | A device or configuration error has occurred. |
Status code | Description | Possible cause |
---|---|---|
-1300 | The request parameter is invalid. | - |
-1301 | The API request failed. | - |
-1302 | Invalid data was returned in the response. | - |
-1303 | Required parameters are missing in the IPC SDK API response. | Check the configuration of the device or pair it again. |
-1310 | The parameters of the method are invalid. | - |
-1311 | Failed to call the API method. | - |
-1330 | Failed to create the file. | The path or file name is incorrect. |
-1331 | Failed to write the file to a local directory. | System error. Please try again later. |
-1332 | Failed to compress the image. | System error. Please try again later. |
-1340 | Failed to save data to the system album. | Check whether permissions on the system album are granted. |
-1350 | The device information is empty. | Check whether the list of devices was returned. |
-1360 | The Camera object is uninitialized or destroyed. |
- |
-1361 | Failed to create the Camera object. |
Check whether the device type is correct. |
-1363 | The video talk parameters are not set for the Camera object. |
Check whether the device is connected, or try again. |
-1371 | The connection to the NVR is not supported. | - |
-1372 | The NVR does not support the one-channel connection. | Check whether the device configuration is correct. |
-1373 | The parentId of the sub-device does not match the devId of the main device NVR. |
Check whether the device configuration is correct. |
-1374 | The nodeId of the sub-device is empty. |
- |
-1375 | The sub-device channel is not associated with the IPC SDK. | - |
-1376 | The main device NVR has been connected. When the sub-device called disconnect() , an error message has been returned. |
- |
-1390 | The locally connected device is offline. | - |
-1391 | An error has occurred while processing constructor parameters for a direct connection between the app and the device. | - |
-1392 | Failed to directly connect to the device over a local area network (LAN). | - |
-1400 | The data point (DP) is not supported. | Configure the DP on the Tuya Developer Platform. |
-1401 | The format of the DP sent is invalid. | - |
-1402 | The DP query timed out. | - |
-1430 | PTZ control is not supported. | Configure the DP on the Tuya Developer Platform. |
-1431 | Site favorites cannot be added during panoramic auto-patrol and site favorite auto-patrol. | - |
-1432 | The number of site favorites is less than 2, so site favorite auto-patrol cannot be enabled. | - |
-1440 | Failed to stop previewing. The device is running in the non-previewing state. | - |
-1500 | The message attachment type is not supported. | - |
-1530 | Failed to download the encrypted image. | Check your secretKey or the URL of the encrypted image. |
-1999 | A system error has occurred. | - |
-2000 | The cloud storage configuration configDataTag is empty in the response. |
Invalid data was returned in the response. |
-2001 | The authentication information for cloud storage is empty. | Make an API request to get the time slice first. |
-2002 | Failed to parse the URL for playing cloud-stored resources. | - |
-2003 | Cloud storage does not include any information about extracted frames. | - |
-2300 | Failed to process doorbell calls. |
|
-2301 | The doorbell call was answered by another member when an API request was made to answer it. | - |
-2302 | The doorbell call was canceled on the device when an API request was made to answer it. | - |
-2303 | The doorbell call timed out when an API request was made to answer it. | - |
-2304 | The doorbell call had been answered when an API request was made to answer it again. | - |
-2305 | An API request was made to hang up a doorbell call after it was not answered. | - |
-2306 | The device type is not supported. | Example: doorbell |
-2500 | The parameters are invalid. | - |
-2501 | The API request failed. | - |
-2502 | Invalid data was returned in the response. | - |
-2503 | The call data is invalid. | There is an error in the request parameters for the call initiated on the device or app. |
-2504 | interfaceManager is not registered. |
The call UI is not registered. See Register Call UI. |
-2508 | The sessionId is invalid. |
- |
-2510 | The call was declined. | - |
-2511 | The line was busy. | - |
-2512 | The call was not answered. | - |
-2513 | The call was hung up. | - |
-2520 | On a call. | - |
-2521 | The call was declined on another device. | - |
-2522 | The call was answered on another device. | - |
-2523 | The call was canceled. | - |
-2530 | The call timed out. | - |
-2531 | Failed to create a P2P connection. | - |
-2532 | The P2P connection was disconnected. | - |
-2533 | The call was ended through the cloud. | - |
-2600 | The device does not support continuous playback. | - |
-10000 | The Camera object is not created. | - |
-10001 | The device is not connected. | The camera operations were performed when the device was not connected or was disconnected. |
-10002 | The session is invalid. | - |
-10003 | A timeout has occurred. | - |
-10004 | The P2P connection was canceled. | Check whether P2P API requests have been made in the correct sequence. |
-10006 | The device was offline. | - |
-10007 | The user canceled the operation. | - |
-10008 | A common device error has occurred. | - |
-20001 | The command is invalid. | - |
-20002 | The parameter is invalid. | - |
-20003 | The data is invalid. | There is an error in the media information for cloud storage. |
-20004 | The cloud-stored video playback task in the starting state is interrupted by the Stop operation. |
Check whether cloud storage API requests have been made in the correct sequence. |
-20005 | The operation is not allowed. | - |
-20006 | The current SDK version does not support the specified protocol. | Try upgrading your SDK. |
-20007 | The device service is busy. | The device is on a call. |
-20008 | The system has run out of memory. | - |
-30001 | Failed to download the file. | - |
-30002 | The device is not in the playback state. | Check whether playback API requests are made in the correct sequence. For example, an error will occur if the method of playback at a specified speed is called before the method of starting playback. |
-30003 | Failed to set the playback speed. | - |
-30004 | The device is not in the cloud-stored video playback state. | Check whether cloud storage API requests are made in the correct sequence. For example, an error will occur if the method of cloud-stored video playback at a specified speed is called before the method of starting cloud-stored video previewing. |
-30005 | Failed to delete playback data. | - |
-30006 | The duration of the video clips to be downloaded for playback exceeds the upper limit or is 0. | Check the number of time slices for videos to be downloaded and played back from the device. |
-30007 | Playback images can only be .jpg files. |
- |
-30008 | A status error has occurred while downloading video clips for playback. | - |
-30010 | A curl connection error has occurred. | - |
-30011 | No records found for the current status. | Check whether the recording methods are made in the correct sequence. For example, an error will occur if the method of stopping recording is called before the method of starting recording. |
-30012 | The specified audio and video parameters are incorrect. | - |
-30013 | Failed to write to the MP4 file header. | - |
-30014 | Failed to write to the MP4 file trailer. | - |
-30050 | Failed to start video talk. | - |
-30060 | An error has occurred while processing the response from the device. |
- |
-30061 | An error has occurred while transferring data. | An error has occurred while uploading and downloading data. The network or device is probably disconnected. |
-30062 | The file does not exist. | - |
-30063 | Failed to create a local file. | Check whether the path exists. |
-30064 | The number of downloaded files exceeds the upper limit or is 0. | - |
-30065 | Failed to delete the file. | The device returns the error message. Check the device logs for troubleshooting. |
-30100 | The name of the uploaded file exceeds the length limit. | - |
-30080 | mjpeg2jpeg is not supported. |
- |
-30081 | The MJPEG format is not supported. | - |
-30082 | The first I-frame is not received. | - |
-30083 | Only MJPEG streams are supported. | - |
-30090 | The cloud-stored video clips have changes in audio and video parameters and cannot be downloaded. | - |
-40000 | A common CameraSDK error has occurred. |
- |
-40001 | The request parameter is empty. | - |
-40002 | Failed to parse JSON. | - |
-40200 | A common error has occurred while processing media streams. | - |
-40201 | The network timed out. | - |
-40202 | An error in parsing the media steaming packet. | The media streaming data is incomplete. |
-40203 | Decoding timed out. | - |
-40205 | The user canceled media streaming. | - |
-40206 | A device exception has occurred while processing media streams. | The P2P connection might disconnect while streaming. |
-40300 | A common error has occurred while decoding the data. | - |
-40301 | The request parameters for decoding are incorrect. | - |
-40302 | The response parameters for decoding are incorrect. | - |
-40303 | The pixel format is not supported. | Check whether the pixel format of streams from the device is supported by the mobile phone. |
-40400 | A common error in cloud storage has occurred. | - |
-40401 | The URL of the cloud-stored resource is inaccessible. | - |
-40402 | The metadata for the cloud-stored media does not exist. | The cloud storage data for the specified timeframe does not exist. |
-40600 | A common error in recording has occurred. | - |
-40800 | A common error in uploading and downloading has occurred. | - |
-41000 | A common device error has occurred. | - |
-41001 | No response from the device. | - |
close_reason
and close_reason_local
.close_reason
is 4
, close_reason_local
is valid. You can use close_reason_local
to analyze the cause of a locally closed connection.close_reason
is defined in the following table.
close_reason |
Description |
---|---|
1 | Failed to initialize communication over Interactive Connectivity Establishment (ICE). |
2 | The Datagram Transport Layer Security (DTLS) handshake failed. |
3 | The connection is manually canceled with break() . |
4 | The connection is locally closed with disconnect() . |
5 | The connection is closed by the peer end and the disconnect() signal is received. |
9 | DTLS authentication failed. |
10 | Failed to create an ICE, UPD, or TCP connection. |
11 | The P2P library is reset. |
12 | The number of sessions has reached the upper limit. |
13 | The response to activation or hangup of the preconnection session timed out. |
14 | A timeout error has occurred while getting the token. |
15 | The preconnection session was closed. |
16 | The preconnection is not supported by the peer end. |
17 | The API request failed. |
18 | The preconnection signal is lost. |
close_reason_local
is defined in the following table.
close_reason_local |
Description |
---|---|
2 | The listener for sessions is triggered. The device runs in privacy mode, so the requested session is closed. |
3 | Failed to create a data sending thread. The requested session is closed. |
4 | The maximum number of sessions has been reached. The requested session is closed. |
5 | The authentication failed. The requested session is closed. |
6 | The session was closed as expected. |
8 | No data communication occurs for more than 20 minutes. The session is closed forcibly. |
9 | You have called the open API to manually close a session, for example, during a firmware over-the-air (OTA) update. |
10 | You have called the open API to exit the P2P module. |
11 | You have called the open API to make the device run in privacy mode. |
13 | The device is processing a call. |
14 | Failed to request application resources. |
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback