# Vuforia not working

**URL:** <https://forum.magicleap.cloud/t/vuforia-not-working/983>\
**Category:** Vuforia Engine\
**Tags:** development, unity\
**Created:** [September 30, 2022, 8:36am UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983 "2022-09-30T08:36:07Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)\
**Post date:** [September 30, 2022, 8:36am UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/1 "2022-09-30T08:36:07Z")

</div>

Versions;  
• Unity 2022.2.0b8  
• Magic Leap SDK 0.53.3  
Magic Leap XR Plugin 7.0.0-exp.3  
• Vuforia Engine AR 10.10.2  
• HMD OS; Build: B3E.220721.07-R.027\_user (Internal device) - SDK Version 29

From our test the MagicLeap 2 Integration is not doing anything. It works fine in the editor through a webcam, and fine on HoloLens, but can't get any image recognition to work on the ML2 HMD.  
What we've tried;  
• The log doesn't give any errors or warnings - just that no pose was found;

Target status: vuforia\_image\_test-2 NO\_POSE -- NOT\_OBSERVED  
DefaultObserverEventHandler:OnObserverStatusChanged(ObserverBehaviour, TargetStatus)  
DefaultObserverEventHandler:Start()

• All permissions are given (including marker tracking and camera).

Although, even though permissions are given in the manifest and requested using MLPermissions.RequestPermission(), and then validated using MLPermissions.CheckPermission(), we can't get permissions for;  
Pupil Size  
World\_Reconstruction  
Write\_External\_Storage  
Although those permissions should not be necessary for vuforia  
• We've tried adding an intermediate scene that launches into the vuforia scene - no changes  
• We've tried using delayed initialization

With manual initialization we're getting this error;

Error: The file '/data/app/com.Laerdal.VuforiaTest-dAaNa5tNMzB1-nQkQAWPGA==/base.apk/assets/bin/Data/level1' is corrupted! Remove it and launch unity again!

when using this script to start up vuforia;

```auto

using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
using Vuforia;

public class CustomVuforiaStarter : MonoBehaviour
{
    private void OnEnable()
    {
        Debug.Log("OnEnable!");
        VuforiaApplication.Instance.OnVuforiaInitialized += OnVuforiaInitialized;
        VuforiaApplication.Instance.OnVuforiaStarted += OnVuforiaStarted;
        VuforiaApplication.Instance.OnVuforiaPaused += OnVuforiaPaused;
        VuforiaApplication.Instance.OnVuforiaStopped += OnVuforiaStopped;
        VuforiaApplication.Instance.OnVuforiaDeinitialized += OnVuforiaDeinitialized;
    }
    private void OnDisable()
    {
        VuforiaApplication.Instance.OnVuforiaInitialized -= OnVuforiaInitialized;
        VuforiaApplication.Instance.OnVuforiaStarted -= OnVuforiaStarted;
        VuforiaApplication.Instance.OnVuforiaPaused -= OnVuforiaPaused;
        VuforiaApplication.Instance.OnVuforiaStopped -= OnVuforiaStopped;
        VuforiaApplication.Instance.OnVuforiaDeinitialized -= OnVuforiaDeinitialized;
    }
    private void OnVuforiaDeinitialized()
    {
        Debug.Log("[Vuforia] Vuforia Deinitialized!", this);
    }

    private void OnVuforiaPaused(bool obj)
    {
        Debug.Log("[Vuforia] Vuforia Paused!", this);
    }

    private void OnVuforiaStopped()
    {
        Debug.Log("[Vuforia] Vuforia Stopped!", this);
    }

    private void OnVuforiaStarted()
    {
        Debug.Log("[Vuforia] Vuforia Started!", this);
    }

    private void OnVuforiaInitialized(VuforiaInitError obj)
    {
        if(obj != VuforiaInitError.NONE)
        {
            Debug.LogError("Error initialing! \n+" +
                           "Error; \n" +
                           obj);
            return;
        }
        Debug.Log("[Vuforia] Initialized!", this);
    }

    private async void Start()
    {
        Debug.Log("Start!");
        await Task.Delay(1000);
        VuforiaBehaviour.Instance.enabled = true;
        VuforiaApplication.Instance.Initialize();
    }
   
   
}

```

Deleting this script from the scene allows the scene to load fine.

---

<div class="post-metadata">

**Author:** ![pscheper](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/pscheper/32/332_2.png) [@pscheper](https://forum.magicleap.cloud/u/pscheper)\
**Post date:** [October 3, 2022, 2:45pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/2 "2022-10-03T14:45:24Z")

</div>

Hi there,

Did you follow the exact steps and workarounds provided in the documentation?

**Note:** I can't seem to share links on the forums, but you can find the alpha documentation via our library on the Developer Portal of Vuforia Engine and go to "Vuforia Engine -\> Getting Started -\> Development Environments -\> Lumin Magic Leap 2".

Thanks!

Kind regards,  
Patrick Scheper  
**Vuforia Engine Product Manager**

---

<div class="post-metadata">

**Author:** ![sengelman](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/sengelman/32/11_2.png) [@sengelman](https://forum.magicleap.cloud/u/sengelman)\
**Post date:** [October 4, 2022, 2:03am UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/3 "2022-10-04T02:03:45Z")

</div>

@pscheper , I've upgraded your trust level. Hopefully, you'll have a better time with links, now.

In the meantime, @TheMunk , I suspect this is what @pscheper was hoping to link:

> **[Getting Started with Vuforia Engine and Magic Leap 2 – Alpha Support |...](https://library.vuforia.com/getting-started/getting-started-vuforia-engine-and-magic-leap-2)**
>
> Set up Vuforia Engine and Magic Leap 2 to track and develop experiences that detect and track physical images and objects on their latest device.

---

<div class="post-metadata">

**Author:** ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)\
**Post date:** [October 5, 2022, 9:34am UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/4 "2022-10-05T09:34:59Z")

</div>

Yes I followed these steps.

---

<div class="post-metadata">

**Author:** ![ababilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/ababilinski/32/79_2.png) [@ababilinski](https://forum.magicleap.cloud/u/ababilinski)\
**Post date:** [October 6, 2022, 3:42pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/5 "2022-10-06T15:42:18Z")

</div>

The guide doesn't mention this window. Should I select **Yes**?

![update-assembles-popup](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/7d8f2c24b385722e8b69fc30100511fedb97f884.png)

---

<div class="post-metadata">

**Author:** ![pscheper](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/pscheper/32/332_2.png) [@pscheper](https://forum.magicleap.cloud/u/pscheper)\
**Post date:** [October 6, 2022, 4:17pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/6 "2022-10-06T16:17:13Z")

</div>

Hey there,

Does that mean that after building the application onto the device you run into this error:

_Error: The file '/data/app/com.Laerdal.VuforiaTest-dAaNa5tNMzB1-nQkQAWPGA==/base.apk/assets/bin/Data/level1' is corrupted! Remove it and launch unity again!_

Thanks!

Kind regards,  
Patrick Scheper  
**Vuforia Engine Product Manager**

---

<div class="post-metadata">

**Author:** ![pscheper](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/pscheper/32/332_2.png) [@pscheper](https://forum.magicleap.cloud/u/pscheper)\
**Post date:** [October 6, 2022, 4:17pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/7 "2022-10-06T16:17:43Z")

</div>

Hi,

Also assuming that you followed all the steps in the guide? Can you share when this window popped up?

I also suggest creating a separate thread.

Kind regards,  
Patrick Scheper  
**Vuforia Engine Product Manager**

---

<div class="post-metadata">

**Author:** ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)\
**Post date:** [October 6, 2022, 4:32pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/8 "2022-10-06T16:32:30Z")

</div>

@pscheper yes, this error happens on builds. Not in the editor.

---

<div class="post-metadata">

**Author:** ![pscheper](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/pscheper/32/332_2.png) [@pscheper](https://forum.magicleap.cloud/u/pscheper)\
**Post date:** [October 11, 2022, 4:15pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/9 "2022-10-11T16:15:41Z")

</div>

Hey,

Could you share some additional details about how you ended up in the current state of your project? Some other questions / feedback that I gathered from our team:

1. What is in your Packages folder on your Unity project? This should contain _com.ptc.vuforia.engine_ directory in there and **not** _com.ptc.vuforia.engine-10.x.y.tgz_.

2. _Packages/manifest.json_ should **not** contain an entry of _com.ptc.vuforia.engine_.

3. 
  - _Assets/Editor/Migration_ should only contain _AddVuforiaEnginePackage_ and **not** _com.ptc.vuforia.engine-10.x.y.tgz_.

Can you check the above?

Kind regards,  
Patrick Scheper  
**Vuforia Engine Product Manager**

---

<div class="post-metadata">

**Author:** ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)\
**Post date:** [October 14, 2022, 9:46am UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/10 "2022-10-14T09:46:32Z")

</div>

1. I don't have the .tgz anywhere in the project.
2. I imported the .unityPackage (but never got the "import warning" prompt), unzipped the .tgz placed it in a folder outside assets (but still in the git project), and then added the package from the packagemanager. So yes, I do have com.ptc.vuforia.engine in the package manager, but it's the local one from disk.
3. This is all I have as well.

During this process I never got the prompts to import the package (may be because I imported and denied the prompt in a previous attempt)  
I did get the API update prompt and seleted "no".

---

<div class="post-metadata">

**Author:** ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)\
**Post date:** [October 14, 2022, 2:00pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/11 "2022-10-14T14:00:45Z")

</div>

Alrighty, so after getting vuforia to work in a fresh project, and checking that every package, playersetting, and SDK was the same, the only difference seemed to be the fact that the package was added from disk using the package manager vs just dropping it in the packages folder.

I don't understand why this makes a difference though - may be because of some internal vuforia scripts that are hardcoded to do changes to "projectRoot/packages/com.ptc.vuforia.engine"?

Can you shine some light on this limitation?

---

<div class="post-metadata">

**Author:** ![pscheper](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/pscheper/32/332_2.png) [@pscheper](https://forum.magicleap.cloud/u/pscheper)\
**Post date:** [October 17, 2022, 2:01pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/12 "2022-10-17T14:01:21Z")

</div>

Hey there,

Yeah, that could very well be. Currently the process is a little wonky at times. This should disappear once the release goes into beta / full release.

Glad you were able to get it to work. Are you saying that going through the workflow by dropping the .unitypackage did not work for you, but from the package manager it did?

Kind regards,  
Patrick Scheper  
**Vuforia Engine Product Manager**

---

<div class="post-metadata">

**Author:** ![TheMunk](https://avatars.discourse-cdn.com/v4/letter/t/c4cdca/32.png) [@TheMunk](https://forum.magicleap.cloud/u/TheMunk)\
**Post date:** [October 17, 2022, 2:06pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/13 "2022-10-17T14:06:35Z")

</div>

No I did use the .unityPackage - what didn't work was adding the unzipped package (that get's imported from the .unityPackage) using the package manager (when the vuforia package was in another location than "projectRoot/packages/com.ptc.vuforia.engine").

---

<div class="post-metadata">

**Author:** ![stuart\_spencer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/stuart_spencer/32/483_2.png) [@stuart\_spencer](https://forum.magicleap.cloud/u/stuart_spencer)\
**Post date:** [October 31, 2022, 4:26pm UTC](https://forum.magicleap.cloud/t/vuforia-not-working/983/14 "2022-10-31T16:26:14Z")

</div>

Your not wrong, I went through this also.
