Unity Build Error: Execution of actool failed with exit code 1

Hi!

I’m getting the following error. I didn’t see this anywhere when using the search feature in the forums so figured I’d ask. Might be something simple I’m doing wrong or missed.

I’m trying to get some thing simple working to test I have everything installed correctly. Trying to Build and Run to the Apple Vision Pro Simulator w/ XCode.

ExecutionFailedException: Execution of actool failed with exit code 1. stderr:

UnityEditor.XR.VisionOS.ACTool.Compile (System.String assetCatalogPath, System.String outputDirectory) (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/ACTool.cs:49)
UnityEditor.XR.VisionOS.XcodeAssetCatalog.ToCar () (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/XcodeAssetCatalog.cs:95)
UnityEditor.XR.VisionOS.ARResourceGroup.ToCar () (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/ARResourceGroup.cs:21)
UnityEditor.XR.VisionOS.VisionOSReferenceImageLibraryBuildProcessor+Preprocessor.BuildAssets () (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/VisionOSReferenceImageLibraryBuildProcessor.cs:102)
UnityEditor.XR.VisionOS.VisionOSReferenceImageLibraryBuildProcessor+Preprocessor.UnityEditor.Build.IPreprocessBuildWithReport.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/VisionOSReferenceImageLibraryBuildProcessor.cs:123)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.<OnBuildPreProcess>b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:499)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List`1[T] oneInterfaces, System.Action`1[T] invocationOne, System.Collections.Generic.List`1[T] twoInterfaces, System.Action`1[T] invocationTwo, System.Boolean exitOnFailure) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:465)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190)

Here’s what I’ve done:

  1. Apple Silicon Mac, Unity Professional license, XCode Version 15.1 beta (15C5028h)
  2. Fresh Core URP project in Unity 2022.3.13f1
  3. Switched to visionOS platform, added scene to build
  4. Package Manager, added Apple visionOS XR Plugin + VR Sample - URP
  5. Project Settings > XR Plug-in Management > Enabled Apple visionOS Plug-in Provider for visionOS platform tab
  6. Project Settings > XR Plug-in Management > Apple visionOS > App Mode → Virtual Reality - Fully Immersive Space, put text in for Usage Descriptions
  7. Project Settings > XR Plug-in Management > Project Validation → Fixed all
  8. Project Settings > Player > Target SDK → Simulator SDK
  9. Scene → Converted Main Camera to XR Rig

Hey there! Sorry you’re running into trouble. This is unfortunately a known issue with com.unity.xr.visionos and Xcode 15.1 beta 2 and above. If your project has an image marker library, you will hit this bug. You can work around the issue by just clicking Build in the Build and Run window. That will pass, even though unfortunately Build and Run will always fail. In fact, I think you might still end up with a working Xcode project in this case, but Unity decides not to try and run because an exception was raised during the build process.

We are working on a fix for this, but unfortunately this affects all versions of com.unity.xr.visionos when Xcode 15.1 beta 2 and above is installed.

5 Likes

Yes, I am having the same problem with the templates visionOSTemplate-0.6.2 with Unity Version 2022.3.11f1
Xcode 15.1 Beta 3
visionOS 1.0 beta 6 (21N5295a) SDK + visionOS 1.0 beta 6 (21N5300a) Simulator (Installed)
Apple Silicon

I checked (Player Settings):

  • Polyspatial is checked
  • Apple Vision Pro is checked in the XR Plugin System

Error Message in Unity :
ExecutionFailedException: Execution of actool failed with exit code 1. stderr:

UnityEditor.XR.VisionOS.ACTool.Compile (System.String assetCatalogPath, System.String outputDirectory) (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/ACTool.cs:49)
UnityEditor.XR.VisionOS.XcodeAssetCatalog.ToCar () (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/XcodeAssetCatalog.cs:95)
UnityEditor.XR.VisionOS.ARResourceGroup.ToCar () (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/ARResourceGroup.cs:21)
UnityEditor.XR.VisionOS.VisionOSReferenceImageLibraryBuildProcessor+Preprocessor.BuildAssets () (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/VisionOSReferenceImageLibraryBuildProcessor.cs:102)
UnityEditor.XR.VisionOS.VisionOSReferenceImageLibraryBuildProcessor+Preprocessor.UnityEditor.Build.IPreprocessBuildWithReport.OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport report) (at ./Library/PackageCache/com.unity.xr.visionos@0.6.2/Editor/ImageTracking/VisionOSReferenceImageLibraryBuildProcessor.cs:123)
UnityEditor.Build.BuildPipelineInterfaces+<>c__DisplayClass16_0.b__1 (UnityEditor.Build.IPreprocessBuildWithReport bpp) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:499)
UnityEditor.Build.BuildPipelineInterfaces.InvokeCallbackInterfacesPair[T1,T2] (System.Collections.Generic.List1[T] oneInterfaces, System.Action1[T] invocationOne, System.Collections.Generic.List1[T] twoInterfaces, System.Action1[T] invocationTwo, System.Boolean exitOnFailure) (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:465)
UnityEditor.BuildPlayerWindow:BuildPlayerAndRun() (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPlayerWindow.cs:189)

I tried cleaning the build (and using Build instead of Build and Run) and it worked twice randomly without giving the error but then the error went back again.
When I didnt get the build error, I got an error on Xcode

Undefined symbol: _SetPolySpatialNativeAPIImplementation
Undefined symbol: _UnityVisionOS_OnInputEvent
Linker command failed with exit code 1 (use -v to see invocation)

Did anyone come across this?

1 Like

I had issues with actool a while back, might not be the same issue.

Mine was solved by going to Xcode > settings > locations and setting command line tools to 15.1 beta - might be worth checking

1 Like

Totally understand! Thank you for your response and the info.

Can confirm the workaround is solid and does produce an Xcode project which can be loaded into the Xcode beta and run in the AVP simulator.

Appreciate you! :pray:

I believe you are seeing this for two reasons:

  • PolySpatial is not enabled
  • Apple visionOS loader is not enabled

You can enable both in Project Settings (Edit > Project Settings...). Check the box for the following:

  • PolySpatial > Enable PolySpatial Runtime
  • XR Plug-in Management > visionOS (blank tab) > Apple visionOS

Hi there! Sorry for the delay in getting back to you on this one. Apple recommended that I clear out the contents of ~/Library/Developer/Xcode/UserData/IB Support/Simulator Devices on my machine. Deleting all the sub-folders at that path resolved the issue on my machine.

This may also resolve an issue in Xcode itself, where builds can fail with the following error:
/path/to/project/LaunchScreen-iPhone.storyboard:: Failed to find or create execution context for description '<IBPlatformToolDescription_xrOS: 0x600002d396e0> System content for IBCocoaTouchFramework-seventeenAndLater <IBScaleFactorDeviceTypeDescription: 0x600002d39080> scaleFactor=2x, renderMode.identifier=(null)'.

Edit: You may also need to reboot your machine after clearing out the Simulator Devices folder.

Please let us know if this works for you.

2 Likes

this also occurs for non visionos just regular arfoundation arkit/arcore

Hey! I think I’ve found a more effective workaround on this issue. It seems like there’s a more thorough “nuclear option” to delete more cached simulators and clear the list of “unavailable” simulators. I followed the instructions on this StackOverflow post and now I no longer see a bunch of unavailable devices when I run xcrun simctl list. That hasn’t eliminated the problem entirely, but I went from a setup where this always failed when running it from Unity to only failing sometimes

I wasn’t courageous enough to try the rm -rf /Library/Developer/** but if you do, you should expect to have to completely re-install Xcode and possibly break some other developer tools that rely on the contents of that folder.

I’m also experimenting with an added argument to the actool command which at first seemed to totally fix this for me, but I still get the same old error from time to time. I was always suspicious about seeing this in the detailed error output:

Failed to find a suitable device for the type IBSimDeviceTypeiPad2x

Why is it looking for an iPad when we’re trying to compile the asset catalog for visionOS? :person_shrugging:

I tried adding "--filter-for-device-model com.apple.CoreSimulator.SimRuntime.xrOS-1-0" to the list of arguments sent to actool in ACTool.cs, and it seems to have helped? Again, I don’t see the issue as frequently now but it still happens sometimes.

I’ll update this thread if/when we end up shipping this change, but you should be able to try in the meantime by moving com.unity.xr.visionos from Library/PackageCache/ to Packages/, and modify that script to include the extra argument. Just add it to the array in the Compile method. If anyone does try these workarounds, and they work for you, please update this thread!