Search Issue Tracker
By Design
Votes
0
Found in [Package]
4.2.1
Issue ID
ARFB-4
Regression
No
ARFoundation/ xcode - Failed to resolve image Library
1. What happened
This report is to do with ARFoundation.
This was the error I was receiving within Xcode when running the app on my iPhone and trying to use the AR feature:
" InvalidOperationException: Failed to resolve image library name of library. There is no matching resource group, or the resource group does not contain any reference images. "
The app I am building allows users to look at landmarks from around the world and see a cartoon/ drawn version in AR. The issue I had came from the way I was naming the image targets, and Windows limiting the length of file names and/or paths (I don't actually know the specifics as to why it breaks).
The name of one of my image targets was 39 characters (32 without spaces), and this was the culprit. when Unity builds the AR Reference Images, it adds a large (seemingly random) string of character and numbers to the file. For example, an Image Target with the filename Alligator becomes Alligator_BB75C797-F69A-8748-A631-C5999486320E.arreferenceimage. Therefore, because one of my image targets already had a large name, when Unity tried creating a file by adding even more characters, Windows must have refused and prevented any more AR Reference Images to be built after that point.
I found that within the build folder, under Unity-iPhone > ARReferenceImages, only some targets were being built. Unity must just stop when it reaches a file that it can't create and carry on with the rest of the build instead of failing and reporting a build error. The app is perfectly usable until you want to use the AR feature, at which point it just doesn't work. In the case of my app, this meant that when I changed the AR Reference Library at runtime, the app could do so and prevent the user from then pressing anything (restarting was the only solution).
Hopefully Unity can fix it so the build fails with an error message.
-----
2. How can we reproduce it using the example you attached
Build the project for iPhone on a Windows machine. I have left the image target with its original name (39 characters long) in the project, so the build should succseed but the app should crash when using the AR feature.
If you build and run the app in Xcode to an iOS device, when using the AR feature and swapping reference libraries (using the tab on the right of the game screen) you should recieve this message in the Xcode console: " InvalidOperationException: Failed to resolve image library name of library. There is no matching resource group, or the resource group does not contain any reference images. "
It would be great if Unity could catch this error and fail the build, letting the developer know that the image target name is too long. It would save a lot of hedaches and confusion.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note:
This is an OS issue. Windows has a hard path limit due to backwards compatibility reasons that the user needs to work around.