Error Codes

Last Updated on : 2023-05-22 06:38:32download

This topic describes the error codes for operations supported by the IPC SDK. Certain error codes apply to P2P SDK.

Error codes for P2P SDK

Error code Description Possible cause
0 No error has occurred. -
-1 The SDK is uninitialized. -
-3 A connection timeout error has occurred. Reconnection is recommended. -
-5 The parameter is invalid. -
-11 The session is invalid. -
-12 The connection is closed by the device. -
-13 The session has been closed. -
-14 The session is closed by an IPC. -
-16 The listener is interrupted. -
-19 The connection is interrupted. The break() method has been called.
-23 The number of sessions has reached the upper limit. -
-24 The preconnection is invalid. -
-25 The preconnection is closed. -
-26 The preconnection is activated. -
-29 The system has run out of memory. -
-30 The API request failed. -
-31 The preconnection is not supported. -
-100 The peer end has terminated the peer-to-peer (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 in a period of more than 20 minutes.
-109 You have called the open API to manually closed 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. -

Error codes for IPC SDK

Error code Description Possible cause
-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 error has occurred. -
-10004 The P2P connection is canceled. Check whether P2P API requests have been made in the correct sequence.
-10006 The device is offline. -
-10007 The operation is canceled by the user. -
-10008 A global device error has occurred. -
-20001 The command is invalid. -
-20002 The parameter is invalid. -
-20003 The data is invalid. The media information of cloud storage has exceptions.
-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. SDK update is recommended. -
-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 with a specified speed is called prior to the method of enabling 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 with a specified speed is called prior to the method of enabling 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 prior to 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 enable the video talk feature. -
-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. Probably the network or device is 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 error message is returned by the device. 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 global error of CameraSDK has occurred. -
-40001 The request parameter is empty. -
-40002 Failed to parse JSON. -
-40200 A global error has occurred while processing media streams. -
-40300 A global 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 global error of cloud storage has occurred. -
-40401 The URL of the cloud-based resource is inaccessible. -
-40600 A global error of recording has occurred. -
-40800 A global error of uploading and downloading has occurred. -
-41000 A global device error has occurred. -

Error codes of closing connection for P2P SDK

  • To troubleshoot the problems, analyze the debug logs or offline logs and retrieve close_reason and close_reason_local.
  • If close_reason is 4, close_reason_local is valid. You can use close_reason_local to further analyze the cause of 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 has been 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. But 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 has been closed as expected.
    8 No data communication occurs in a period of 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.