目录

AR Engine Error Codes

This section describes only module-specific error codes. For details about universal error codes, please refer to Universal Error Codes.

If the error persists, submit a ticket online. Huawei will get back to you as soon as possible.

1009200001 API Call Failure

Error Message

Failure.

Error Description

The API call failed.

Possible Causes

  1. Failed to create the object internally.
  2. An internal running exception occurs.
  3. The current device may not support this feature.

Solution

  1. Restart the app. If the error persists, submit a ticket online. Huawei will get back to you as soon as possible.
  2. Call HMS_AREngine_CheckSupported to check whether the current device supports this feature.

1009200002 Session Paused

Error Message

Session paused.

Error Description

The session is paused.

Possible Causes

The current session is paused or is not resumed.

Solution

Call HMS_AREngine_ARSession_Resume to resume the session.

1009200003 Session Not Paused

Error Message

Session not paused.

Error Description

The session is not paused.

Possible Causes

The current session is in running status.

Solution

Call HMS_AREngine_ARSession_Pause to pause the current session.

1009200004 Not Tracking

Error Message

Not tracking.

Error Description

The session is not in the tracking state during the process of obtaining the target anchor or plane information

Possible Causes

The current session is abnormal.

Solution

Check whether the current session object (which is of the AREngine_ARSession type) is empty.

1009200005 Texture Not Set

Error Message

Texture not set.

Error Description

No GL texture is set.

Possible Causes

The GL texture used for rendering is not set.

Solution

Check whether the HMS_AREngine_ARSession_SetCameraGLTexture() API is used to set the correct GL texture.

1009200006 GL Context Missing

Error Message

GL context missing.

Error Description

OpenGL context missing.

Possible Causes

The current thread lacks the OpenGL context. The result obtained by calling the eglGetCurrentContext() API is EGL_NO_CONTEXT.

Solution

Check whether the HMS_AREngine_ARSession_Update() API is called in the OpenGL rendering thread.

1009200007 Configuration Not Supported

Error Message

Configuration not supported.

Error Description

AR Engine does not support the current configuration.

Possible Causes

The preview dimensions are not supported.

Solution

Check whether the preview dimensions are supported by calling OH_CameraManager_GetSupportedCameraOutputCapability.

1009200008 Resource Exhausted

Error Message

Resource exhausted.

Error Description

The memory is used up.

Possible Causes

Failed to allocate memory due to memory shortage.

Solution

Check whether the memory is sufficient. If not, prompt the user to clear the memory. If so, submit a ticket online. Huawei will get back to you as soon as possible.

1009200009 Service Unavailable

Error Message

Service unavailable.

Error Description

The service is unavailable.

Possible Causes

The service is not supported by the device.

Solution

Check whether the current device is listed in Hardware Requirements. If the device meets the requirements, submit a ticket online. Huawei will get back to you as soon as possible.

1009200010 Camera Unavailable

Error Message

Camera unavailable.

Error Description

The camera is unavailable.

Possible Causes

  1. AR Engine cannot open the camera as it is occupied by other processes.
  2. Camera service error. The camera cannot be opened.
  3. The camera permission is not properly applied for.

Solution

  1. Check whether the camera is occupied by other processes when your app is using AR Engine. If not, submit a ticket online. Huawei will get back to you as soon as possible.
  2. Ensure that the app has correctly applied for the camera permission.

1009200011 The Number of Images to Be Added Exceeds the Upper Limit

Error Message

The number of images added exceeds the maximum.

Error Description

The number of images to be added exceeds the upper limit.

Possible Causes

The number of images added to the tracking image database exceeds the upper limit.

Solution

Check whether the number of images added to the tracking image database exceeds the upper limit.

  1. If ArkTS is used for development, you can obtain the maximum number of images using ARAugmentedImageDatabase.getCapacity and the number of images stored in the database using ARAugmentedImageDatabase.getImageCount.

  2. If C/C++ is used for development, you can obtain the maximum number of images using HMS_AREngine_ARAugmentedImageDatabase_GetCapacity and the number of images stored in the database using HMS_AREngine_ARAugmentedImageDatabase_GetImageCount.

If the number does not exceed the upper limit, submit a ticket online. Huawei will get back to you as soon as possible.

1009200012 Attempting to Add a Poor Quality Image to the Image Database

Error Message

Attempted to add an image with insufficient quality to the image database.

Error Description

The image with poor quality is added to the image database.

Possible Causes

Attempts are made to add an image with poor quality to the image database.

Solution

Check whether the app adds an image with poor quality to the image database. For details, please refer to ARAddAugmentedImageReason. If no image with poor quality is added, submit a ticket online. Huawei will get back to you as soon as possible.

1009200013 No Valid Image Database

Error Message

No valid image database.

Error Description

No valid image database exists.

Possible Causes

The image database is not created.

Solution

Check whether an image database is created using HMS_AREngine_ARAugmentedImageDatabase_Create.

If the number does not exceed the upper limit, submit a ticket online. Huawei will get back to you as soon as possible.

1009200014 Images Cannot Be Added When the Tracking State Is Running

Error Message

The pictures cannot be added when the tracking state is running.

Error Description

Images cannot be added when the tracking state is running.

Possible Causes

The program is in the tracking state.

Solution

Check whether AREngine_ARTrackingState is set to ARENGINE_TRACKING_STATE_PAUSED or ARENGINE_TRACKING_STATE_STOPPED.

1009200015 NativeBuffer Creation Failed

Error Message

Failed to create nativeBuffer.

Error Description

Failed to create NativeBuffer.

Possible Causes

The heap memory is exhausted.

Solution

Check the device's memory status and ensure that adequate heap memory is available. If the error persists, restart the device.

1009200016 Failed to Write to NativeBuffer

Error Message

Failed to write nativeBuffer.

Error Description

Failed to write to NativeBuffer.

Possible Causes

The heap memory is exhausted.

Solution

Check the device's memory status and ensure that adequate heap memory is available. If the error persists, restart the device.

1009200017 Camera Service Error

Error Message

The camera service is abnormal.

Error Description

The camera service is abnormal.

Possible Causes

The camera service is abnormal, for example, the service restarts or an IPC exception occurs.

Solution

Create the service again.

1009200201 Invalid Operation

Error Message

ARView invalid operation.

Error Description

The ARView operation is not standard.

Possible Causes

The ARViewContext.config/ARViewContext.callback and other related settings are repeatedly performed after ARViewContext is initialized.

Solution

Check whether the sample code is used according to the ARViewContext sample code.

1009200202 AR Scene Missing

Error Message

Graphics3D AR scene required.

Error Description

The AR scene is missing.

Possible Causes

ARViewContext.scene is not set before ARViewContext is initialized.

Solution

Set the AR scene before initializing ARViewContext. For details, please refer to Managing AR Sessions.

1009200203 ARViewContext.config Not Set

Error Message

AREngine config required.

Error Description

ARViewContext.config is not set.

Possible Causes

ARViewContext.config is not set before ARViewContext is initialized.

Solution

Set ARViewContext.config before initializing ARViewContext. For details, please refer to Managing AR Sessions.

1009200204 AR Session Initialization Failure

Error Message

AR session setup failed.

Error Description

The AR session fails to be initialized.

Possible Causes

The AR session fails to be initialized because ARViewContext.config is not correctly set.

Solution

Check the error code returned when the related API is called and reset ARViewContext.config as prompted.

1009200205 AR Scene Camera Node Creation Failure

Error Message

AR scene camera setup failed.

Error Description

The AR scene camera node fails to be created.

Possible Causes

The camera node fails to be created due to resource exhaustion or repeated camera creation.

Solution

Check whether the ARViewContext API has been called and initialization has been performed, whether the camera has been confirmed, and whether the system has sufficient memory before the app uses ARView. If so, submit a ticket online. Huawei will get back to you as soon as possible.