Log in or register to post comments

DATABASE_LOAD_ERROR

Unity Editor
August 1, 2022 - 3:45am #2

Hi, I am using Vuforia 10.8 Area Target with Unity 2020.3.6f1, Building the app with IL2CPP arm64 in Android.

I want to load the Area Target in run time using VuforiaBehaviour.Instance.ObserverFactory.CreateAreaTarget(path, name).

My path is declared exactly the same with the VuforiaSampleProject:

var FullPath = Path.Combine(Application.streamingAssetsPath, mDataSetUnit.Path);

var pathToTheXML = Path.Combine(FullPath, mDataSetUnit.Name + EXTENSION_FORMAT_XML.Remove(0, 1));

mAreaTargetBehaviour = VuforiaBehaviour.Instance.ObserverFactory.CreateAreaTarget(pathToTheXML, mDataSetUnit.Name, false);



I have tested the app on iOS and the simulator mode in Unity Editor, which are working fine. 

But in Android (I am using S9), it cannot create the AreaTargetObserver as it show the following error:



ObserverNotCreatedException`1: Failed to create AreaTargetObserver: DATABASE_LOAD_ERROR. Vuforia.Internal.Core.ObserverFactory.CreateAreaTargetObserver (Vuforia.Internal.Observers.DeviceObserver deviceObserver, System.String dataSetPath, System.String targetName, System.Boolean requiresExternalPositions) (at <00000000000000000000000000000000>:0) Vuforia.ObserverFactory.CreateAreaTarget (System.String databasePath, System.String targetName, System.Boolean requiresExternalPositions) (at <00000000000000000000000000000000>:0) AreaTargetLoader.LoadAreaTarget (DatasetUnit mDataSetUnit) (at <00000000000000000000000000000000>:0) AreaTarget_MainManager.StartScanning () (at <00000000000000000000000000000000>:0)

Things I have tried: 

- reinstall Vuforia and double checking the licenses is valid.

- I tried just placing the area target in the scene, in the build it is working fine, but the one loading in runtime gives the error.

- I wonder if it is related to the streaming asset path issue on Android, so I tried to copy the XML and DAT files from the streaming asset to persistentDataPath at Start(). Reading the absolute path of the XMLfile, still I am getting the DATABASE_LOAD_ERROR.

 

I wonder what is causing the issue and how can I fix it?

Thanks for your time, any help would be great, have a great day.

 

Platform: 

DATABASE_LOAD_ERROR

August 2, 2022 - 6:17am #1

Hey there,

 

Could you provide us a reproducible case? A simple Unity project with code to create an Area Target within the scene from the StreamingAssets folder would be enough. You could share this via Google Drive or WeTransfer. 

I recently created ATs during runtime on my Google Pixel 3 with success and no errors. 

 

Kind regards,

Patrick Scheper

Technical Community Manager

Log in or register to post comments