vuforia-engine
vuforia-engine copied to clipboard
Android Config Initialization Error, Failed to Initialize Vuforia Engine
Summarize the bug: Android app runs succesfully when running for the first time. When closing the app and reopening it, I get "Vuforia Engine Initialization Error"
Observed problem I created a Unity project (2023.2.12f1) with Vuforia Engine 10.21.3, exporting and running it on Android. The first time the app is started, it requests the missing camera permissions as expected and the engine gets initialized. No matter, if I select "only once" or "when using the app", the next time I start the app, there is no request for camera permissions and the app crashes with a vuforia engine initialization error (see Device logs).
If I manually set the camera permissions to none in the android settings for the app, the next time I start the app, permissions get requested again and the engine initializes flawlessly. If I manually change back to other settings then none, app crashes again with the same error. So it only works once after I removed the camera permissions manually.
It seems, vuforia is not initializing correctly, when the app already has camera permissions.
This issue is also described on stackoverflow: https://stackoverflow.com/questions/77759311/vuforia-engine-failed-to-initialize-on-android-in-unity-app
The post there is not mine, but I have the exact same problem.
Expected result I expect the app to run succesfully, without this configuration error every time I start it.
Other observations See detailed description
Reproducible steps
- Create a new 3D app in Unity (2023.2.12f1)
- Add the Vuforia Engine package 10.21.3
- Add a new scene
- Remove the camera
- Add a Vuforia AR Camera
- Build the app
- Install it on an Android device (Pixel 7 in my case)
- Open it. Give the app camera permission "While using the app". => App runs successfully
- Close the app.
- Open it again. =>The app gives "Vuforia Engine Initialization Error"
- Change the app permissions. Set camera permission to "Don't allow"
- Open the app again. Give the app camera permission "While using the app". => App runs successfully
Affected Vuforia Engine version: v10.21.3
Affected platform: Android
Affected device: Google Pixel 7
Screenshots / Video Recordings

Affected database Not applicable
Device or platform logs
2024/01/04 16:02:17.120 21431 21451 Error AR 2024-01-04 16:02:17: Initialization of platform integration failed
2024/01/04 16:02:17.121 21431 21451 Error AR 2024-01-04 16:02:17: Creating Vuforia Engine instance...FAILED
2024/01/04 16:02:17.124 21431 21451 Error Unity Failed to create Vuforia engine: Unknown Vuforia Engine initialization error
2024/01/04 16:02:17.124 21431 21451 Error Unity UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
2024/01/04 16:02:17.124 21431 21451 Error Unity Vuforia.Internal.Core.Engine:InitOnCameraReady()
2024/01/04 16:02:17.124 21431 21451 Error Unity Vuforia.Internal.Utility.ExtensionMethods.IEnumerableExtensionMethods:ForEach(IEnumerable`1, Action`1)
2024/01/04 16:02:17.124 21431 21451 Error Unity Vuforia.Internal.Core.Engine:Init(String)
2024/01/04 16:02:17.124 21431 21451 Error Unity Vuforia.Internal.Core.OneTimeInitialization:Initialize()
2024/01/04 16:02:17.124 21431 21451 Error Unity
2024/01/04 16:02:17.330 21431 21451 Error Unity Vuforia Engine initialization failed: PLATFORM_ANDROID_CONFIG_INITIALIZATION_ERROR
2024/01/04 16:02:17.330 21431 21451 Error Unity
2024/01/04 16:02:17.330 21431 21451 Error Unity PLATFORM ANDROID CONFIG INITIALIZATION ERROR
2024/01/04 16:02:17.330 21431 21451 Error Unity
2024/01/04 16:02:17.330 21431 21451 Error Unity Failed to initialize Vuforia Engine.
2024/01/04 16:02:17.330 21431 21451 Error Unity UnityEngine.DebugLogHandler:Internal_Log(LogType, LogOption, String, Object)
2024/01/04 16:02:17.330 21431 21451 Error Unity DefaultInitializationErrorHandler:SetErrorCode(VuforiaInitError)
2024/01/04 16:02:17.330 21431 21451 Error Unity DefaultInitializationErrorHandler:OnVuforiaInitializationError(VuforiaInitError)
2024/01/04 16:02:17.330 21431 21451 Error Unity System.Reflection.RuntimeMethodInfo:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)
2024/01/04 16:02:17.330 21431 21451 Error Unity System.Delegate:DynamicInvokeImpl(Object[])
2024/01/04 16:02:17.330 21431 21451 Error Unity Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeDelegate(Delegate, Object[])
2024/01/04 16:02:17.330 21431 21451 Error Unity Vuforia.Utility.ExtensionMethods.DelegateHelper:InvokeWithExceptionHandling(Action`1, T)
2024/01/04 16:02:17.330 21431 21451 Error Unity
Workaround Remove the camera permission after every run.
See also issue: https://github.com/PTCInc/vuforia-engine/issues/70 which was closed for not following the guidelines
Is the issue reproducible on the Vuforia Engine core sample? https://assetstore.unity.com/packages/templates/packs/vuforia-core-samples-99026
Hello @slabarque, thank you for the detailed report. The team was able to reproduce this issue and it is currently under investigation. We will keep you posted on the progress.
Hello @slabarque, we have identified the source of the issue as the the new "Application Entry Point" PlayerSettings flags introduced in Unity 2023.1.
The problem only appears when the "Application Entry Point" is set to "GameActivity". Unfortunately, this is the default value for this flag in new Unity projects.
While we work on adding support for this new option, you could try to use the following workaround:
- Open the Project Settings window
- Go to Player
- In the Android tab, expand the "Other Settings" section
- Look for the "Application Entry Point" flag and set it to only "Activity", as shown in the picture
If you try this workaround, please let us know how it goes. We would really appreciate the feedback!
I tried the workaround and it works. Thanks so much! Any idea when a permanent fix will be out?
Glad to know that it works! The permanent fix will be part of the next release of Vuforia, but at the moment I don't have a time-frame for that. We'll update this thread when we have more information.
A fix for this issue was released with 10.25.4 and you should no longer have to manually set the Application Entry Point back to Activity when using Unity 2023.1+.
I'm, therefore, closing this tickets as fixed.