This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
The attribute was not found because it was not set before.
Description
This error code is reported when the attribute is not found because it was not set before.
Possible Causes
When an API is called to obtain an attribute value, the attribute was not set through the corresponding setting API before. For example, when OH_ArkUI_NativeModule_PropertyAnimation_GetFromValue is called, the attribute was not set through OH_ArkUI_NativeModule_PropertyAnimation_SetFromValue before.
Solution
Set the attribute through the corresponding setting API first, and then call the API to obtain the attribute value.
Error Message
The sub-animation parameter is invalid.
Description
This error code is reported when the sub-animation parameter added to the animation group is invalid.
Possible Causes
Solution
Error Message
The animation group is not found on the UIContext.
Description
This error code is reported when the animation group identified by the specified key is not found on the UIContext.
Possible Causes
Solution
Confirm that the key has been registered through OH_ArkUI_NativeModule_AddAnimationGroup and that the animation group has not ended yet. After the animation group ends naturally, OH_ArkUI_NativeModule_FinishAnimationGroup is called, or the target node is destroyed, the animation end callback is triggered, and the system automatically removes the animation group after the callback is executed. If necessary, use OH_ArkUI_NativeModule_HasAnimationGroup to check whether the animation group exists.
Error Message
A re-entrant call to animation group APIs is detected on the same thread.
Description
This error code is reported in the following scenario: On the same thread, while a call to an animation group API has not yet returned, the thread makes a nested call to another animation group API.
Possible Causes
On the same thread, while a call to an animation group API has not yet returned, the thread makes a nested call to another animation group API.
Solution
Ensure that the next call to an animation group API is made only after the previous call has fully returned, and avoid nested calls to animation group APIs on the same thread.
Error Message
The animation group is not in the required state for the operation.
Description
This error code is reported when the current state of the animation group does not meet the state required for the API call.
Possible Causes
Solution
Query the current state of the animation group through OH_ArkUI_NativeModule_GetAnimationGroupState, and call the corresponding API only after confirming that the state is correct.
Error Message
The resolved target node does not belong to the same UIContext as the context parameter.
Description
This error code is reported when the resolved target node does not belong to the same UIContext as the context.
Possible Causes
When an animation group is registered through OH_ArkUI_NativeModule_AddAnimationGroup, the UIContext to which the target render node resolved by the sub-animation belongs is inconsistent with the UIContext to which the context parameter belongs.
Solution
Ensure that the target render node set for the sub-animation through OH_ArkUI_NativeModule_PropertyAnimation_SetTargetNode, OH_ArkUI_NativeModule_KeyframeAnimation_SetTargetNode, or OH_ArkUI_NativeModule_PathAnimation_SetTargetNode, or the default target render node of the animation group set through OH_ArkUI_NativeModule_AnimationGroup_SetTargetNode belongs to the same UIContext as the context passed when registering the animation group.