目录

ArkTS API Error Codes

This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.

1028700001 Invalid Argument

Message

Invalid argument.

Description

Invalid argument.

Symptom

This error may occur in the following cases:

  1. If the runApp method throws this error, the input data app path is invalid or the data app file cannot be found.

  2. If the sendData method throws this error, the handle is invalid.

Possible Causes

  1. If the runApp method throws this error, the possible causes are as follows:

    1. The data app file is not included in the HAP.

    2. The file path in the parameters passed to this API is incorrect. (Currently, this API can only load files from the app sandbox directory.)

  2. If the sendData method throws this error, the possible cause is that the stop method has been invoked and the handle has been reclaimed.

Solution

  1. If the RunApp method throws this error, ensure that the data app file has been packed into the HAP and the RunApp input path is an absolute path in the app sandbox starting with /data/storage/el1/bundle/ (for example, /data/storage/el1/bundle/libs/arm64/libda_demo.so).

  2. If the SendData method throws this error, do not reuse the data app handle for which the stop method has been called.

1028700002 Data App Signature File Not exist

Message

Signature file does not exist.

Symptom

The signature file does not exist.

Possible Causes

The data app signature file is not included in the HAP.

Solution

Ensure that the signature file has been correctly generated and packaged into the HAP. Place the file in the same directory as the data app file, and name the file in the format of complete name of the data app file + .sig.

1028700003 Failed to Start the Confidential Space

Message

Failed to start the confidential space.

Symptom

Failed to start the confidential space.

Possible Causes

The confidential space cannot be started due to an internal system error.

Solution

Try again, or restart the device and try again. If the retry fails, submit a ticket online.

1028700004 Failed to Start the Data App

Message

Failed to start the data app.

Symptom

Failed to start the data app.

Possible Causes

The data app cannot be started due to an internal system error.

Solution

Try again, or restart the device and try again. If the retry fails, submit a ticket online.

1028700005 Access Denied

Message

Access permission denied.

Symptom

The app is not authorized to access the confidential space.

Possible Causes

The app has not applied for the permission to call the kit.

Solution

Apply for the permission to call the kit.

1028700006 Maximum Number of Calls Reached

Message

Call limit reached.

Symptom

The maximum number of calls has been reached.

Possible Causes

The number of calls to the runApp API has reached the upper limit. For details about the API call specifications, see Running Data Apps in Confidential Space - Constraints.

Solution

Reduce the number of API calls per day.

1028700007 Operation Timeout

Message

Operation timed out.

Symptom

The operation timed out.

Possible Causes

The confidential space manager service cannot be started due to an internal system error. As a result, the app connection to the service times out.

Solution

Try again, or restart the device and try again. If the retry fails, submit a ticket online.

1028700008 Data App Stopped Running

Message

The data app has stopped running.

Symptom

The data app has stopped running.

Possible Causes

The data app has exited automatically, or the data app has crashed and exited unexpectedly, or the data app has been forcibly terminated by the confidential space service due to execution timeout.

Solution

  1. Shorten the interaction time window of the confidential space and complete communication as soon as possible after the data app is started.

  2. Debug the data app to prevent abnormal app exit.

1028700009 Communication Failure Between the App and Data Management Service

Message

Communication between client and data manager failed.

Symptom

Communication between the app and data management service fails.

Possible Causes

  1. If the runApp method throws this error, communication between the app and the confidential space manager service fails.

  2. If the sendData method throws this error, the socket for communication between the app and the data management service is abnormal, causing communication failure.

Solution

  1. If this error is thrown by the runApp method, try again.

  2. If this error is thrown by the sendData method, do not send data too frequently.

1028700010 Communication Failure Between the Data Management Service and Data App

Message

Communication between data manager and data app failed.

Symptom

The communication between the data management service and data app fails.

Possible Causes

The socket for communication between the data management service and data app is abnormal. As a result, the data sent by the app to the data management service cannot be forwarded.

Solution

Debug the data app to prevent socket exceptions.

1028700011 Message Too Long

Message

Message exceeded size limit.

Symptom

The message is too long.

Possible Causes

  1. If the sendData method throws this error, the input data is too long.

  2. If the callback registered by the onReceiveDataError method receives this error, the message sent by the data app is too long and cannot be received by the app.

Solution

Limit the length of a single communication to 16 MB. If you have to send data larger than this specification, split the data into multiple parts for sending or receiving.

1028700012 Profile with Invalid Configuration Items

Message

The profile contains invalid configuration items.

Symptom

The profile contains invalid configuration items.

Possible Causes

The profile of the data app contains invalid configuration items.

Solution

Check whether the profile of the data app is correct.

1028700013 Failed to Sign the Received Data

Message

Failed to sign data received from data app.

Symptom

The data received from the data app cannot be signed.

Possible Causes

The device certificate fails to be obtained due to an internal error. As a result, the data sent from the space cannot be signed.

Solution

Try again when the network is connected.

1028700014 Data App Error

Message

Error generated by the data app.

Symptom

An error is generated by the data app.

Possible Causes

A service-level error is generated by the data app.

Solution

The original error code generated by the data app is contained in the dataAppErrorCode attribute of DataAppErrorInfo. You can capture such errors and obtain the original error code of the data app in the callback function registered by onReceiveDataError.

For example, if the parameter list of the registered callback function is (e: BusinessError<DataAppErrorInfo>), you can obtain the original error code of the data app through e.data?.dataAppErrorCode in the ArkTS code.

1028700015 Internal Error on the App Side

Message

Internal error on the client side.

Symptom

An internal error occurs on the app side.

Possible Causes

The confidential space manager service cannot be connected due to an internal error on the app side.

Solution

Try again, or restart the app and try again. If the issue persists, restart the device and try once more. If the retry fails, submit a ticket online.

1028700016 Internal Error of the Confidential Space Manager Service

Message

Internal error on the confidential space manager side.

Symptom

An internal error occurs in the confidential space manager service.

Possible Causes

The confidential space manager service cannot be connected due to an internal error in the confidential space manager service.

Solution

Try again, or restart the device and try again. If the retry fails, submit a ticket online.

1028700017 Invalid Certificate of the Signature File

Message

Invalid certificate of the signature file.

Symptom

Invalid certificate of the signature file.

Possible Causes

The certificate chain contained in the signature file fails the verification. For example, the root of the certificate chain is not the confidential space root certificate, or the upper and lower levels of the certificate chain do not match.

Solution

Check the certificate chain file used for signing the data app to ensure that the root certificate is the confidential space root certificate and the certificate chain can pass the verification.

1028700018 Hash Value in the Signature File Does Not Match the Actual Hash Value of the Data App

Message

The hash contained in the signature file does not match the actual hash of the data app.

Symptom

The hash value contained in the signature file does not match the actual hash value of the data app.

Possible Causes

An incorrect data app file is used to generate the signature file, or the hash value of the data app file changes after the signature file is generated.

Solution

Check the data app file used for signing the data app and ensure that the hash value of the data app file does not change after the signing is complete.

1028700019 Invalid Signature File Format

Message

Invalid signature file format.

Symptom

The format of the signature file is invalid.

Possible Causes

The format of the signature file is damaged.

Solution

Regenerate the signature file of the data app.

1028700020 Number of Data App Sessions Exceeds the Upper Limit

Message

The number of data app sessions exceeds the limit.

Symptom

The number of data app sessions exceeds the upper limit.

Possible Causes

Each app can have only one session opened at a time. A session may have been repeatedly opened, or the previous session has not been closed when a new session is opened.

Solution

Check the runApp call logic to ensure that only one data app session is running.

1028700021 Number of Data Apps Exceeds the Upper Limit

Message

The number of data apps exceeds the limit.

Symptom

The number of data apps exceeds the upper limit.

Possible Causes

The number of data apps running in the confidential space has reached the upper limit.

Solution

Try again, or restart the device and try again.

1028700022 Data App Does Not Contain an Entry or the Entry Is Invalid

Message

The entry of the data app is missing or invalid.

Symptom

The data app does not have an entry or the entry is invalid.

Possible Causes

No program entry is identified for the data app, or the configured program entry is invalid.

Solution

The data app must contain the g_da_entry structure, and the handler field cannot be empty.

1028700023 Failed to Load the Dynamic Library During Data App Loading

Message

Failed to load dynamic library when loading the data app.

Symptom

Failed to load the dynamic library during data app loading.

Possible Causes

The data app dynamically links to a library that is unavailable in the confidential space, or depends on an undefined symbol.

Solution

Avoid depending on unavailable libraries and avoid defining symbols that are not implemented.

1028700024 Confidential Space Memory Exceeds the Upper Limit

Message

Confidential space memory exceeds limit.

Symptom

The memory of the confidential space exceeds the upper limit.

Possible Causes

The total memory of the running data apps is close to the upper limit. The confidential space rejects new data apps to avoid memory shortage, which may cause other data apps in the confidential space to be unavailable.

Solution

Try again, or restart the device and try again.

1028700025 Current Device Is Not Authorized for Debugging

Message

The device is not authorized for debugging.

Symptom

The current device is not authorized for debugging.

Possible Causes

The profile of the current data app is of the debugging type, but the running device is not added to the authorized device list.

Solution

Modify the profile and add the UDID of the device to the authorized device list.

1028700026 Profile Not Within the Validity Period

Message

The profile is not within its validity period.

Symptom

The profile is not within the validity period.

Possible Causes

The time when the device runs the profile is not within the validity period of the profile.

Solution

Modify the validity period of the profile. Ensure that the validity period starts from the current time and ends at the expected end time.

1028700027 Failed to Parse the Profile

Message

Failed to parse profile.

Symptom

Failed to parse the profile.

Possible Causes

The format of the profile is invalid.

Solution

Check the format of the profile and obtain the signed profile again.

1028700028 Profile Signature Verification Failure

Message

Failed to verify the signature of the profile.

Symptom

Failed to verify the signature of the profile.

Possible Causes

The signature of the profile does not match the embedded certificate.

Solution

Obtain the profile with a valid signature again.

1028700029 Invalid Certificate Chain in the Profile

Message

The certificate chain in the profile is invalid.

Symptom

The certificate chain in the profile is invalid.

Possible Causes

The certificate chain in the profile fails the verification. For example, the root of the certificate chain is not the confidential space root certificate, or the upper and lower levels of the certificate chain do not match.

Solution

Check the certificate chain file used for signing the profile to ensure that the root certificate is the confidential space root certificate and the certificate chain can pass the verification. Then, obtain a valid signed profile.

1028700030 Signature File Verification Failure

Message

Failed to verify the signature of the signature file.

Symptom

Failed to verify the signature file.

Possible Causes

The signature value contained in the signature file does not match the embedded data app certificate.

Solution

Regenerate the signature file of the data app to prevent the signature file from being tampered with.