This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Message
Invalid argument.
Description
Invalid argument.
Symptom
This error may occur in the following cases:
If the runApp method throws this error, the input data app path is invalid or the data app file cannot be found.
If the sendData method throws this error, the handle is invalid.
Possible Causes
If the runApp method throws this error, the possible causes are as follows:
The data app file is not included in the HAP.
The file path in the parameters passed to this API is incorrect. (Currently, this API can only load files from the app sandbox directory.)
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
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).
If the SendData method throws this error, do not reuse the data app handle for which the stop method has been called.
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.
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.
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.
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.
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.
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.
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
Shorten the interaction time window of the confidential space and complete communication as soon as possible after the data app is started.
Debug the data app to prevent abnormal app exit.
Message
Communication between client and data manager failed.
Symptom
Communication between the app and data management service fails.
Possible Causes
If the runApp method throws this error, communication between the app and the confidential space manager service fails.
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
If this error is thrown by the runApp method, try again.
If this error is thrown by the sendData method, do not send data too frequently.
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.
Message
Message exceeded size limit.
Symptom
The message is too long.
Possible Causes
If the sendData method throws this error, the input data is too long.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.