App Sim Device View Empty + Error Message in new project

Give us as much detail as possible regarding the issue you're experiencing.

Unity Editor version (if applicable): 2022.3.5f1
Magic Leap Application Simulator (ZI) Runtime version:
Magic Leap App Simulator for Unity (if applicable): 3.6.0-187.zi3b19841
Host OS: Windows

ML Hub Version
Magic Leap Application Simulator Module Version
Magic Leap Application Simulator Runtime Version
Server: 3.6 (built Jun 9 2023), Protocol: 19
ZIF (bundled): Version
ZIF (runtime): Version

I followed the instructions for setting up a sample project. Installed all the tools and everything seems to work except for the app simulator. It will play some default office sim but it does not play the scene I have open in Unity. Sometimes the App Sim Device View is empty, other times it shows the rendered office scene.

There is an error in the Unity console: [ZIF] Android SDK not found: expected contents are missing from the location; see ZI logs for more information

Thank you, I'll gladly attach any logs you'd like but the link below is broken.

Thank you!

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

Don't forget to attach the logs!

^^ Log link is broken.

Hi @ewokthegreat Great username and welcome to the Magic Leap 2 forum. When installing the Unity Editor, there is an option to install support for Android Build Support. That seems to be missing here. Second, once Unity is installed, select "android" as the target platform for your project.

The device view will show the office by default. That's the simulated environment you'll run your app inside. The unity scene contains UI and other elements that the app will render. The app's rendered images will also appear in device mode as an overlay on top of the office scene.

Thank you for the response!

Unfortunately, Android support is installed and the target platform is set to Andriod.

Are there any other suggestions? Will the logs be of any help?

Thank you again!

From what I can tell it's likely you have Android SDK installed on your machine, but the install location is missing the "platform-tools" subfolder.

Please look to see if you have an environment variable named "ANDROID_HOME" or "ANDROID_SDK_ROOT" that points to a directory that exists on your machine. There should be a subfolder named "platform-tools," which is an install option within the android-sdk install.

You can either re-install the android-sdk with platform-tools enabled as a standalone install outside of unity, or point your environment variable to the android sdk embedded within the unity install (which should be C:\Program Files\Unity\Hub\Editor\2022.3.5f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK )

Please let me know if this helps.

It seems like everything is in order with the SDK but the error persists and my test project still will not play in the application simulator.

Thank you for the update @ewokthegreat. Yes please do submit your diagnostic logs to help determine why your rendered scene is not showing up within the device view. The Android Sdk error will likely prevent device mode from working correctly, but shouldn't prevent simulator mode from working.

You can find the diagnostic logs in the Magic Leap Hub, under the Home menu > Save Diagnostic Logs.

Here's the Error Reporting link for reference, I'll get that link you reported fixed asap: Error Reporting | MagicLeap Developer Documentation

Logs attached. Thank you for your assistance with this! (1.7 MB)

Thank you, received. I'll talk with the team and respond shortly.

@ewokthegreat Question, do you have a dedicated or integrated graphics card? The logs you sent point to a graphics issue, our graphics team is taking a look now.

If you have a dedicated graphics card, can you please run dxdiag.exe to collect system info, and send us that output file?

If you do in fact have an integrated graphics card, unfortunately it won't work with App Sim.

It's a dedicated card. Dxdiag output attached. Thank you again!

DxDiag.txt (142.1 KB)

Thank you for the info @ewokthegreat.

We see the issue is because the ZISimulator service is sending a late message to Unity but instead of trying to get the message again, the Unity implementation ends up in a bad state and will effectively go into an infinite loop.

154739.562 <Unity.exe:14516~ZIFViewerWorker> E [GLRenderDeviceContext_win_linux.cpp:95] Failed to initialize external memory

154739.572 <Unity.exe:14516~ZIFViewerWorker> E [Transport.cpp:212] Failed to deserialize data 1

154741.137 <Unity.exe:14516~6c68> ZIF E [MessageUtils.h:258] timedOut to receive expected reply for

154744.165 <Unity.exe:14516~6c68> W [ZMQMessagePipes.cpp:361] ZMQ_POLLOUT timed out for SOCKET:localhost:56053

094638.190 <VDCLI.exe:37044~6f14> 'VDCLIApplication::ProcessPrintParams' I [VDCLIApplication.cpp:259] VDCLI Version: 3.6 (built Jun 9 2023) *** ZIServer.exe pid 37124 started logging at Tue Jul 25 09:46:38 2023

We have reproduced this in testing and are working on a fix for this for late August timeframe. In the meantime, our best advice is:

  1. Use the Java AppSim or keep trying with Unity, since this generally happens when Unity starts App Sim.

  2. Potential workaround: Try to exit App Sim for Unity without stopping the simulator and then try launching Unity editor again. (Since the simulator is already running, it might not send a late message due to its slow startup performance.)

  3. Upgrade to our latest release when it comes out Aug. 2. Our fix isn't in that release, but the release does contain stability upgrades and you may notice increased performance.

We apologize for the inconvenience, I hope the above can provide a stop-gap workaround until our official fix is out.

@kdowney thank you a ton for looking into this for us! Looking forward to the updates. :slight_smile:

Sorry to necro this issue but, we're still struggling with getting the Application Simulator working. We've followed the setup instructions according to the documentation and we are getting the following message:


This persists if our target is either the Simulator or the Device.

When the target is Simulator, after clicking OK on the dialog pictured above, we get this (our scene is just a cube, set up as directed in the documentation).

When the target is Device, after clicking 'OK' on the dialog, we can see our cube but it's fixed in our FOV, it moves with our head movements and the direction "laser" of the controller is offset by quite a bit, it also moves in step with our head movements.

I'd love to get this worked out and start developing with this device, any suggestions will be most appreciated and welcome!

Hi @ewokthegreat,

Thank you for reaching out regarding this issue. Would you kindly create a new thread for this?

We are going to close this issue.