Closed slabarque closed 4 months ago
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:
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.
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
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
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