PTCInc / vuforia-engine

Bug and feedback issue tracker for the Vuforia Engine SDK
https://developer.vuforia.com
20 stars 0 forks source link

Failed to load database and failed to create ImageTargetObserver #84

Closed el-mimoso closed 10 months ago

el-mimoso commented 10 months ago

Summarize the bug: Failed to Failed to load database and failed to Create ImageTargetObserver.

Observed problem Vuforia is not able to load the databases to create imageTargets therefore there is no tracking of image targets.

Expected result Vuforia should be able to track images and display the 3D models.

Other observations

Reproducible steps Followed tutorial from here : https://www.youtube.com/watch?v=XKnzW9Z1gU0 at the last step change from ground plane to image target. Using on device database.

Steps to reproduce the behavior: Followed tutorial from here : https://www.youtube.com/watch?v=XKnzW9Z1gU0 at the last step change from ground plane to image target. Using on device database. export to xcode build to physical device error apears at run time.

Affected Vuforia Engine version: v(10.19.3)

Affected platform:

Platform version :

Affected device:

Screenshots / Video Recordings

Captura de pantalla 2024-01-11 a la(s) 5 14 40 p m Captura de pantalla 2024-01-11 a la(s) 5 21 52 p m

works at unity editor

Captura de pantalla 2024-01-11 a la(s) 5 22 40 p m

issue with iphone IMG_D087D1673201-1

Affected database Prueba

Device or platform logs

INFO/AR(20316) Activating observer...
INFO/AR(20316) Activated observer with ID '1'
INFO/AR(20316) Activating observer...SUCCESS
INFO/AR(20316) Starting Vuforia Engine instance...
INFO/AR(20316) Starting camera with profile for iPhone12,8, 800.1
INFO/AR(20316) Starting Vuforia Engine instance...SUCCESS
Creating dataset: Vuforia/Prueba.xml/Trex
Vuforia.Internal.Utility.UnityLogger:LogInfo(String, Object[])
Vuforia.Internal.Utility.Log:Info(String, Object[])
Vuforia.ImageTargetBehaviour:CreateObserverFromDataset(IObserverFactory)
Vuforia.ImageTargetBehaviour:CreateFromSerializedTarget()
Vuforia.ObserverBehaviour:OnVuforiaStarted()
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action)
Vuforia.Internal.Core.Engine:OnStart()
Vuforia.Internal.Core.Engine:Start(Action)
Vuforia.Internal.Core.Engine:Start()
Vuforia.VuforiaBehaviour:AfterVuforiaInitialized(VuforiaInitError)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Core.Engine:InitOnCameraReady()
Vuforia.Internal.ExternalCamera.NullExternalCamera:Init(Func`1)
Vuforia.Internal.Core.Engine:<Init>b__160_0()
Vuforia.Internal.Core.EnginePermissions:OnPermissionRequestFinished(Boolean)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Permissions.<>c__DisplayClass0_0:<CreateRequester>b__0(Boolean)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Permissions.IOSPermissionRequester:Finish()
Vuforia.Internal.Permissions.<RequestPermissions>d__15:MoveNext()
INFO/AR(20316) Creating ImageTargetObserver...
ERROR/AR(20316) Failed to load database 'Vuforia/Prueba.xml'.
ERROR/AR(20316) Creating ImageTargetObserver...FAILED
Vuforia.Internal.Utility.UnityLogger:LogError(String, Object[])
Vuforia.Internal.Utility.Log:Error(String, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action)
Vuforia.Internal.Core.Engine:OnStart()
Vuforia.Internal.Core.Engine:Start(Action)
Vuforia.Internal.Core.Engine:Start()
Vuforia.VuforiaBehaviour:AfterVuforiaInitialized(VuforiaInitError)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Core.Engine:InitOnCameraReady()
Vuforia.Internal.ExternalCamera.NullExternalCamera:Init(Func`1)
Vuforia.Internal.Core.Engine:<Init>b__160_0()
Vuforia.Internal.Core.EnginePermissions:OnPermissionRequestFinished(Boolean)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Permissions.<>c__DisplayClass0_0:<CreateRequester>b__0(Boolean)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Permissions.IOSPermissionRequester:Finish()
Vuforia.Internal.Permissions.<RequestPermissions>d__15:MoveNext()
Vuforia Started
Vuforia.Internal.Utility.UnityLogger:LogInfo(String)
Vuforia.Internal.Utility.Log:Info(String)
Vuforia.Internal.Core.Engine:Start(Action)
Vuforia.Internal.Core.Engine:Start()
Vuforia.VuforiaBehaviour:AfterVuforiaInitialized(VuforiaInitError)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Core.Engine:InitOnCameraReady()
Vuforia.Internal.ExternalCamera.NullExternalCamera:Init(Func`1)
Vuforia.Internal.Core.Engine:<Init>b__160_0()
Vuforia.Internal.Core.EnginePermissions:OnPermissionRequestFinished(Boolean)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Permissions.<>c__DisplayClass0_0:<CreateRequester>b__0(Boolean)
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
Vuforia.Internal.Permissions.IOSPermissionRequester:Finish()
Vuforia.Internal.Permissions.<RequestPermissions>d__15:MoveNext()
Vuforia.Internal.Utility.UnityLogger:LogInfo(String)
Vuforia.Internal.Utility.Log:Info(String)
Vuforia.MonoCameraConfiguration:ConfigureVideoBackground(Matrix4x4)
Vuforia.MonoCameraConfiguration:CheckForSurfaceChanges(Matrix4x4)
Vuforia.CameraController:UpdateCamera(Matrix4x4)
Vuforia.Internal.Core.StateProcessor:ProcessState(IVuState, IDictionary`2, IVideoBackgroundRenderer, IVBAugmentationRenderer, ICameraController, IWorldOriginProvider, DeviceObserver)
Vuforia.Internal.Core.Engine:UpdateState()
Vuforia.Internal.Core.Engine:OnUnityUpdate()
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action)
Vuforia.Internal.Core.UnityLifeCycleListener:Update()
19  UnityFramework                      0x000000010ba8e898 VuforiaBehaviour_AfterVuforiaInitialized_m496A0E0ABF4D1C1306BB9875824DF84957DF1E44 + 152
35  UnityFramework                      0x000000010a8bce5c _Z146DelegateHelper_InvokeWithExceptionHandling_TisVuforiaInitError_t3C5C78DBB18E9AFDA795BBDF4A176F8C96A5BC88_m27CAC8CEB1E2CACE9FF1499178F59125E8F1C4C7P50Action_1_tF4CAAB52A69FEBB4D629E2D59C8EE77A263FEE43iPK10MethodInfo + 44

Other observation:

ptc-ddowning commented 10 months ago

Hello,

The video referenced is a bit dated, thus the workflow may have changed since Engine's 10.0 release.

Have you tried your device database in the latest version of the Core Samples? This is a more appropriate test to determine if the issue is actually related to a problem with Vuforia Engine and/or the device database.

Thanks, Vuforia Engine Support

el-mimoso commented 10 months ago

Hi! Thanks for the feedback.

So I imported the core samples into unity but no luck, the Same error as before. Works at editor, wont work at device.

Error at xcode while running:

Captura de pantalla 2024-01-12 a la(s) 6 25 42 p m

Screencap from device.

image
ptc-emaggio commented 10 months ago

Are the .xml and .dat files present on the device app storage after the app is deployed to the device?

ptc-epassaro commented 10 months ago

Hello @el-mimoso, the procedure of the tutorial in the description also involves manually changing the Xcode project generated by Unity. Specifically, in the video they remove the Data folder from the Unity-iPhone target. Are you also applying those changes? If so, please try to build without that change.

The dataset files are stored in the StreamingAssets folder in the Unity project. While building, Unity copies the content of StreamingAssets in Data/Raw in the Xcode project. Removing the Data folder as a member of the Unity-iPhone target results in its content not being accessible by the app, and by Vuforia.

Please let us know how it goes or if you experience other issues. Thanks!

el-mimoso commented 10 months ago

Are the .xml and .dat files present on the device app storage after the app is deployed to the device?

Hi @ptc-emaggio thanks for keeping up. In order to see the files inside the app i did xcode > product > archive then in the finder showed the files inside the archive build and found them inside the unity.framework>data>raw>vuforia. I'll attach the folder structure.

image

Hello @el-mimoso, the procedure of the tutorial in the description also involves manually changing the Xcode project generated by Unity. Specifically, in the video they remove the Data folder from the Unity-iPhone target. Are you also applying those changes? If so, please try to build without that change.

The dataset files are stored in the StreamingAssets folder in the Unity project. While building, Unity copies the content of StreamingAssets in Data/Raw in the Xcode project. Removing the Data folder as a member of the Unity-iPhone target results in its content not being accessible by the app, and by Vuforia.

Please let us know how it goes or if you experience other issues. Thanks!

hi @ptc-epassaro thanks for the feedback. I just compiled but same story (also cleaned the build folder via xcode>product>clean build folder. We are planing to use vuforia within a larger app (using the beforementioned tecnologies) but this particular issue is holding us back 😞

image image
ptc-epassaro commented 10 months ago

@el-mimoso thank you for the detailed update! We will continue looking into this, though unfortunately we were not able to reproduce the issue on our side. In the meantime, one more thing you could try is to use Unity 2022.3.16f1. Other developers and ourselves have encountered issues with previous versions of the Unity LTS and Xcode 15 which resulted similar consequences.

el-mimoso commented 10 months ago

I just Downloaded Unity 2022.3.16f1 without luck. Any other sugestion? Maybe I can zip it and share the project folder?

Captura de  pantalla 2024-01-18 a la(s) 3 45 51 p m

IMG_5645

ptc-emaggio commented 10 months ago

@el-mimoso are you able to reproduce the issue on more than a single device? If yes this would rule out a device configuration/permission problem

el-mimoso commented 10 months ago

@el-mimoso are you able to reproduce the issue on more than a single device? If yes this would rule out a device configuration/permission problem

You mean in another iphone, if so I can test with some of my buddys phones...

ptc-emaggio commented 10 months ago

@el-mimoso are you able to reproduce the issue on more than a single device? If yes this would rule out a device configuration/permission problem

You mean in another iphone, if so I can test with some of my buddys phones...

Yes a different iPhone or iPad, same or different model. Just to rule out a permission issue specific to the device

el-mimoso commented 10 months ago

ion issue specific to the

Built for an ipad same error as before.

Captura de pantalla 2024-01-23 a la(s) 3 38 15 p m

Buuuut find a similar error for a different framework, tried their propossed solution and now it works! Here is the solution in case somebody else has the same error: https://github.com/f111fei/react-native-unity-demo/pull/16

IMG_EDECF62128FD-1

Thanks for the feedback and have a nice day!

PeakPei commented 3 months ago

Have you solved it already? I have the same problem

ptc-thesbyro commented 3 months ago

Hi @PeakPei,

As mentioned by the creator of this issue, they found a workaround - "tried their propossed solution and now it works! Here is the solution in case somebody else has the same error: https://github.com/f111fei/react-native-unity-demo/pull/16"

If this did solution did not solve your problem, please create a new ticket and reference this issue for clarity.

Thank you,

PeakPei commented 3 months ago
截屏2024-08-23 20 19 29 截屏2024-08-23 20 19 57

I solved it.