ZIF App Simulator - incorrect version detected

Unity Editor version (if applicable):
2022.3.10f1

ML2 OS version:
1.4.0-dev2

MLSDK version:
v1.11.0

ML Hub version:
2.0.0

Magic Leap Application Simulator (ZI) Runtime version:
3.7.0.20230919

Magic Leap App Simulator for Unity (if applicable):
3.7.0.20230919

Host OS: (Windows/MacOS)
Sonoma 14.0 (23A344)

Please do not submit without first getting a ZIP of your logs from:

https://developer-docs.magicleap.cloud/docs/guides/developer-tools/ml-hub/app-sim/error-reporting
^^^ got 404 - PLEASE FIX YOUR ERROR-REPORTING LINK!

Don't forget to attach the logs!

^^^ got 404 - PLEASE FIX YOUR ERROR-REPORTING LINK!

@Magic Leap Team: please make this error reporting friction lower. How about your Hub Home screen having a "Report a Problem" button that directly integrates with your forum here? You could streamline getting the relevant version information you're asking for in the above preamble, instead from "aboutVersions.txt"

Now on with the problem...

I get this in the Unity console:

[ZIF] App Sim runtime path discovered: /Users/otri/MagicLeap/tools/zi/v3.7.0.20230814/

When packages are pulling in the newer release "v3.7.0.20230919".

If I try to start a session, it fails:
"No Magic Leap App Simulator session is running. Exit Play mode and start App Simulator before entering Play mode again."

Then after that warning, it tries continuing, but generating more errors:

Error: MLZIIsServerConfigured in the Magic Leap API failed. Reason:

MLResult_NotImplemented 
UnityEditor.XR.MagicLeap.AppSimShimLibSupport:CheckForLibrarySearchPaths () (at ./Library/PackageCache/com.magicleap.unitysdk@ce854badf960/Editor/MLAppSim/AppSimShimLibSupport.cs:111)
Failed to detect running Magic Leap App Simulator session, or a running session if any is not compatible (e.g. protocol version is different between the frontend and the backend).
UnityEditor.XR.MagicLeap.AppSimShimLibSupport:CheckForLibrarySearchPaths () (at ./Library/PackageCache/com.magicleap.unitysdk@ce854badf960/Editor/MLAppSim/AppSimShimLibSupport.cs:111)

.. etc ..

So, it seems some automatic discovery fails (detects older app sim), and then cascades onto the other problems in AppSimShimLibSupport.cs loading the wrong DLL and unable to find the corresponding support functions.

Updates really need to get cleaned up

I find it really tricky whenever a release goes out that we get prompted to upgrade all over the place, but once any part in the stack upgrades, we get a whole heap of pain. Let's get this smoothed out please. ML2 Hub is the one central place that should prompt to download a set of updates.

Platform your releases

ML2 Hub could tell us what the compatible set of packages are that work with a particular release. There's no sense in having modularity if any part of that modularity can break everything. So, when I say Platform your release, it means making a set of modules that all go out in unison. The developer chooses which platform they want to move to, and the platform tells the developer clearly what they need to be working with.

And without further ado, here's the logs, but had to scrub the confidential stuff.
MLHubLogs-20231027-162746-macOS.zip (352.6 KB)

Hi @otri,

Thank you for reaching out regarding this issue. We always appreciate feedback on the ML ecosystem releases and their timings. I will be sure to notify our voice of customer team regarding this and I will report back as soon as I learn more.

Best,

El

I am getting what I think is a related failure - I get a dialog box saying that no AppSim is running (when it is), and I get a message in the console, saying

Multiple ADB server instances found, the following ADB server instance have been terminated due to being run from another SDK. Process paths: 
C:\Users\DaveLeCompte\MagicLeap\MLHub\plugins\com.magicleap.adb.win32.x86_64_1.0.41.28_0_2_202304071616\adb\adb.exe

when I dig into {User}.config\mlvds\logfile.txt, searching for "App Sim", I found these errors:

51534.392 E [VersionCheck.inl:69] [zi.magicleap Shim] App Sim server is running with an newer protocol (running: 25, expected: 24)
151541.346 E [VDSConnectionManager.cpp:114] [Permissions] App Sim server is running with an newer protocol (running: 25, expected: 24)

It really looks like the App Sim that's running is not the App Sim that Unity is expecting.

Magic Leap SDK package (in the Unity Package Manager) is 1.12.1
Magic Leap SDK (from the Magic Leap Project Setup Tool) is 1.4.0
Magic Leap OS (from Device Bridge)
Version 1.4.1
Build B3E.230928.10-R.098
Android API Level 29

Is there any guidance on how to get a working install back again?

1 Like

Regarding the first error, the issue is due to multiple ADB instances running. Make sure you set the path in either Unity or Magic Leap Hub to point at the same installation: Install the Tools | MagicLeap Developer Documentation

Regarding the second error, make sure your App simulator points to the correct version of App Simulator:

Hi Kbabilinski,

EDIT: oops, I see you're talking about @dave.lecompte's post.


In my case, both of these things are set correctly.

  1. ADB is correctly set to the same that Unity uses.
  2. App Simulator picks up the wrong version to the one that's currently running. I had to literally uninstall any possible conflicting version, then the auto-detection picked up the correct version and connected with the correct protocol.

What I'm pointing out here is that there's a real problem with the MagicLeap Hub overly encouraging upgrading, and how any one of these upgrades can spill into a pile of other issues that confuse developers.

I'm pretty well versed in tracing the root issues, and I've solve my particular circumstance. But I'm betting there are plenty of other developers that will just get tripped up quite badly. It would be great if Magic Leap Hub platformed the updates, so each major release is latched into one big simultaneous update all together. And developers just have to ratchet up or down the release they're working with. Always need to be able to roll back, because who knows what a particular release will do to a developer's current workflow. Any number of bugs can trip up development, and with multiple team members needing to replicate the same set-up, it's important that we can all get on the same page together.

Hope that better illustrates what I'm talking about.

All the best,

  • Aaron
1 Like

Make sure you set the path in either Unity or Magic Leap Hub to point at the same installation: Install the Tools | MagicLeap Developer Documentation

I'm not sure what you mean by setting the path in "either" Unity OR Magic Leap Hub to the same installation - same as what? Same as each other? I went into Magic Leap Hub to set the ADB path to the custom path copied from my Unity settings, as described in the linked document.

This does not seem to have made any difference.

You mention making sure my app simulator points at the correct version of the app simulator, which I also find confusing - how do I know what the correct version of the app simulator is? How do I point an app simulator at an app simulator? Wouldn't the app simulator's correct version be itself?

Sorry if my piling on derailed your larger issue. Didn't mean to get your point lost.

Hey no worries, my bad! It was my confusion when I read @kbabilinski response out of context.

So this issue:

I went into Magic Leap Hub to set the ADB path to the custom path copied from my Unity settings, as described in the linked document.
This does not seem to have made any difference.

I have the same problem.

Also this:

You mention making sure my app simulator points at the correct version of the app simulator, which I also find confusing - how do I know what the correct version of the app simulator is? How do I point an app simulator at an app simulator? Wouldn't the app simulator's correct version be itself?

What I had in my Packages/manifest.json:

  "dependencies": {
    "com.magicleap.appsim": "file:../../Packages/ML2/app_sim_unity/v3.7.0.20230919/com.magicleap.appsim.tgz",
    "com.magicleap.unitysdk": "file:../../Packages/ML2/unity/v1.11.0/com.magicleap.unitysdk.tgz",
...
    }

This hard coded the app_sim_unity package to v3.7.0.20230919 release. The ZI simulator package should be explicitly searching for its own release version. Instead, it would load up the wrong version if another was also installed.

I believe this has been address in the very latest release of the Unity packages, maybe? I think they've added a package compatibility checker. Going to check here really soon.

1 Like

I ended up uninstalling all of my Unity versions except for the latest one (fortunately, I think I can get away with a single Unity install - for now).

I uninstalled everything using the ML Hub package manager.

I moved my Magic Leap folder from within my C:\Users{username}\MagicLeap, renaming it, to something like MagicLeapOld, wanting to move stuff out of the way without being entirely destructive.

I reinstalled MLHub, I reinstalled the UnitySDK and AppSim packages from the MLHub Package Manager, and things worked.

Another possible variable was that my company uses Avast antivirus, which insisted on peering over the shoulder as the ML installers (the MLHub installer, as well as the package manager) do their work, sometimes pausing installations to perform a scan. After (some?) scans, I get a dialog prompting me if I want to allow this operation "this time", which I say yes, and then the following dialog says "ok, try your action again", which seems completely inappropriate within a complex installer sequence. I was worried that some piece of the installation was getting blocked by Avast, and the rest of the installation was proceeding forward without a critical piece.

In any case, my own configuration seems to be working (for now), and if stuff breaks again, I'll read @otri 's pointers more carefully to hack my manifest into compliance.

Thanks!

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.