Search Unity

Bug XCode build error after upgrading to 2022.2.0

Discussion in 'iOS and tvOS' started by manuelgoellnitz, Dec 9, 2022.

  1. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    After upgrading to 2022.2.0 I tried to make a ios build.
    When Archiving I immediatelly got the error:
    bee_backend: no such file or directory
     
  2. CameronDWills

    CameronDWills

    Joined:
    Feb 26, 2021
    Posts:
    91
    Last edited: Feb 4, 2023
  3. Juason

    Juason

    Joined:
    Feb 7, 2017
    Posts:
    11
    Same here when compiling iOS on my PC and moving it to my Mac, opening in XCode and building. I installed Unity on my Mac, loaded my project and built the iOS target, opened it in XCode and it is doing really odd things. Tends to hang forever on an early step in the Build Process. Occasionally it will finish, but then it isn't respecting settings in Xcode such as Portrait vs Landscape. Had none of these issues in earlier versions.

    Tried on Windows 10 and 11 with 2022.2.0. Mac is OS 12.6 with Xcode 13.4. Thanks!

    On a whim I reinstalled the Mac OS and XCode 14 from the App store (as I'd read doing it manually can lead to it being in the /Developer folder and not the /Application folder, and Unity may have accidentally hardcoded some paths. This did not change any behavior. I did try moving my Unity iOS build output folder off the desktop and its no longer hanging in the execution of Build scripts, but it is still giving me bee_backend errors.

    Downgrading right now would be time consuming and painful, so I'm hoping someone has some insight here. Thanks!
     
    Last edited: Dec 11, 2022
  4. CameronDWills

    CameronDWills

    Joined:
    Feb 26, 2021
    Posts:
    91
    Here's a clue I'm copying from another post of mine, but I haven't figured out any way around it yet. Maybe someone from Unity can chime in:

    I'm assuming this has to do with this part of the 2022.2 update:
    Code (CSharp):
    1. iOS: Changed IOS Xcode projects to use the il2cpp executable to compile il2cpp sources, so the Xcode doesn't compile the sources directly. This makes iOS consistent with other platforms.
    I'm using Windows 11 Unity to build my iOS project, which I then import onto a Mac OS device (via VMWare virtual machine). I open a new terminal in the project folder and run a pod install command to get the workspace file, then archive. This process has always worked in 2022.1 but now it doesn't.

    I noticed the xCode project is setup differently, with a new target called "GameAssembly" and there's a script attempting to run on it in a file directory that doesn't exist:


    It's looking for the C: drive which doen't exist on this machine. I tried copying over the data file and replacing the file path with the filepath of the data folder on the Mac OS, but that didn't work either.

    I tried copying over the directories it's looking for, even transplanted it into a previous project, but that didn't work either
     
  5. Juason

    Juason

    Joined:
    Feb 7, 2017
    Posts:
    11
    I downgraded my project back to 2022.1.23f1 and confirmed it still builds and runs fine on iOS. And I confirmed a blank Core 2D URP project works as well. So this is certainly specific to 2022.2 and the 2023 beta builds.

    But I duplicated this in Unity running on the Mac directly with a new blank 2022.2 Core 2D URP project, so it seems unlikely to be related to Windows pathing issues or leftover garbage in the build process.

    Are we the only people trying out iOS with 2022.2+ ? I can't believe something this much of a show-stopper was missed in the release... Ahh well, I'm working on a bug report in hopes it catches someone's attention.

    Digging deeper though, my flavor of this issue does appear to be related to messed up pathing/folder naming. The initial error was due to the folder IL2CppOutputProject\...\bee_backend\mac-x86_64 being incorrectly named mac-64. So I manually changed the folder name, and now I get a Parent called on an empty path at NiceIO.NPath.get_Parent() in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Common35/NiceIO.cs

    No clue how to debug that one. None of these errors are resolving to useful stuff on Google or in the Reported Issues database. Hopefully someone comes along with more insight here, but for now I'm just going to hang out on the earlier version.

    Bug Report Sent... though they must have a slow pipe...the 7Zip of my project (300MB) is unlikely to get there anytime soon.
     
    Last edited: Dec 12, 2022
  6. TheScarred

    TheScarred

    Joined:
    Oct 13, 2019
    Posts:
    2
    Same problem here. Looking at release notes for 2022.2 I see that builds are to be made with XCode13 (now replaced with XCode14), however XCode13 doesn't natively support iOS16+ builds so everything's kinda uncertain. Hope this is fixed soon, really annoying not to be able to make use of all new features in 2022.2 for iOS builds.
     
    CameronDWills likes this.
  7. Juason

    Juason

    Joined:
    Feb 7, 2017
    Posts:
    11
    Yeah, you'd think this would be a rather large, showstopper bug. I've not seen any response to the Bug report I submitted from within Unity yet.
     
    CameronDWills likes this.
  8. Kriss-Liu

    Kriss-Liu

    Joined:
    Nov 26, 2022
    Posts:
    1
    I got the same error with 2022.2.1. At first the error says that folder 'mac-x86_64' not existing, and I manully renamed it from 'mac-x64', and then the 2nd error comes:

    System.InvalidOperationException: Parent called on an empty path
    at NiceIO.NPath.get_Parent() in /Users/bokken/build/output/unity/il2cpp/Unity.IL2CPP.Common35/NiceIO.cs
     
  9. ETGgames

    ETGgames

    Joined:
    Jul 10, 2015
    Posts:
    101
    getting similar issue here too for mac builds
     
    Last edited: Jan 1, 2023
  10. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    516
    Not to be mean or anything, but my project has been building just fine with 2022.2 and 2023.1. I was using an Apple Silicon Mac with macOS 13.
     
  11. TheScarred

    TheScarred

    Joined:
    Oct 13, 2019
    Posts:
    2
    Could you tell us more about the project, my issues were ocurring on 2022.2+ using SRP & ARKit/ArFoundation. Perhaps the build issue happens when compiling from a Windows editor, beats me o_O
     
  12. Juason

    Juason

    Joined:
    Feb 7, 2017
    Posts:
    11
    If you'll read my explanation above, I tried compiling blank projects created in Unity on the Mac directly, as well as pre-compiled in Windows with similar results. I've spoken to a handful of people successfully compiling in 2022.2+ but none have yet provided any details that would help identify what is different. In one case I did a fresh install of OSX, XCode, Unity and it still failed with the same mis-named directories.

    What version of MacOS are you running? What version of XCode? Are you doing anything other than opening the XCode project, changing the signing configuration and compiling?
     
  13. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    516
    M1 Max 16-in MacBook Pro, macOS 13.1, Xcode 14.2. My project was brought up all the way from 2021 release, one major version at a time, over time. My project does not use AR features (I specifically disabled any unused packages from the project), but it does have some plugins that do post-build modifications on the Xcode project file. As my signing identity was configured in the Unity player settings, it was set correctly in the Xcode project, and I can simply compile to run.

    As for replicating the issue, I was investigating other Unity issues and made several projects and built them on iOS just fine, so I cannot replicate the issue you are seeing.

    To @Juanson: As for why I mentioned me using Apple Silicon, because I saw you were trying to match a x86_64 path, so I assumed you were building on an Intel Mac. As my Mac is Apple Silicon, it could have been where the difference is, and I thought it would have been obvious for you to notice.
     
    Last edited: Jan 2, 2023
  14. Juason

    Juason

    Joined:
    Feb 7, 2017
    Posts:
    11
    That appears to be the issue. Unity compiles no longer function on Intel based Macs. M1/2 core compilation works fine. Can anyone else please confirm?
     
  15. francineW

    francineW

    Joined:
    Sep 15, 2022
    Posts:
    10
    Just chiming here that we are seeing the same problem. Unable to compile with the following error reported:
    chmod: dropXcode/Builds/Il2CppOutputProject/IL2CPP/build/deploy_x86_64/bee_backend/mac-x86_64/bee_backend: No such file or directory
     
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    To confirm, are you building this on an M1/2 mac?
     
  17. ETGgames

    ETGgames

    Joined:
    Jul 10, 2015
    Posts:
    101
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Thanks for the details. Could you submit a bug report for both issues? I don't think we have a bug report for either of them. Maybe two separate bug reports would be good, as they might be different issues.

    https://unity.com/releases/editor/qa/bug-reporting
     
  19. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Not M1/2 this is in Intel VM hardware and building for iOS.
    Upgraded from 2021.3.11f1

    More information so we are building on Windows Unity to create the XCode project and then running on Mac Intel VM to build for iOS.

    I notice that the UnityHub on Mac now has the option to install silicon Unity and I wonder if this is the difference. I am about to try building on Unity Silicon and see if that changes things.
     
    Last edited: Jan 6, 2023
    JoshPeterson likes this.
  20. francineW

    francineW

    Joined:
    Sep 15, 2022
    Posts:
    10
    I can confirm that the same project built on M1 machine builds with out a problem.

    If I can find the time to put together a sample project, build on Intel and transfer XCode to M1 machine and build see what happens I will.

    But I confirm that project built on 2015 macbook pro failed with:
    dropXcode/Builds/Il2CppOutputProject/IL2CPP/build/deploy_x86_64/bee_backend/mac-x86_64/bee_backend: No such file or directory

    Built on M1 Mac Mini
    Works
    Monterey
    Unity 2022.2.1f iOS
    XCode 14.1
     
    Last edited: Jan 6, 2023
  21. francineW

    francineW

    Joined:
    Sep 15, 2022
    Posts:
    10
    I can confirm this !
     
  22. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    Thanks for all of the details.
     
  23. suhorukovs

    suhorukovs

    Joined:
    Dec 16, 2018
    Posts:
    13
    I have the same error. Please help how to solve it??????
     
  24. suhorukovs

    suhorukovs

    Joined:
    Dec 16, 2018
    Posts:
    13
    Is anyone has created bug report for this bug?:
    XCode build error after upgrading to 2022.2.0 (bee_backend: no such file or directory)

    provide please a link to this issue to watch it.

    Thanks
     
  25. Juason

    Juason

    Joined:
    Feb 7, 2017
    Posts:
    11
    I submitted a bug report inside Unity, but it took many hours to complete because I attached a zip of my project. But I am unable to find it anywhere in the Issue Tracker. I'm not sure if it would necessarily appear there right away, or if it needs to be verified first?
     
    suhorukovs likes this.
  26. Neonlyte

    Neonlyte

    Joined:
    Oct 17, 2013
    Posts:
    516
    An incoming issue would need to be processed and replicated by QA before it is sent to the appropriate team. You’ll know this when they come back to let you know the issue is confirmed and has a different issue ID. As for issue tracker, an issue needs to be manually added into it to be publicly visible. There may be an unknown criteria on what qualifies to be visible, but issues submitted by me have been made visible to track, at least.
     
    suhorukovs likes this.
  27. suhorukovs

    suhorukovs

    Joined:
    Dec 16, 2018
    Posts:
    13
    Is there any progress with the issue ("bee_backend: no such file or directory" on mac os)?
    I don't believe that such a bug still exists without any feedback(((( We can't build a game for IOS on mac((
     
    Last edited: Jan 8, 2023
    fwalker likes this.
  28. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    Unfortunately the M1 / no M1 might be red hearing
    Just spent all my Sat trying to get the build to work on its entirely on an M1 computer using our Azure pipelines build system which is tantamount to getting your teeth pulled while getting your nails pulled at the same time. And all for nothing.

    So building on the M1 with the command line (here is the command we use, using Azure's UnityBuildTask@3 task)

    /Applications/Unity/Hub/Editor/2022.2.1f1/Unity.app/Contents/MacOS/Unity
    -batchmode
    -buildTarget
    iOS
    -projectPath
    /Users/####/Pipeline/Perforce/mfc-client
    -logfile
    /Users/#####/agent/_work/1/s/Logs/UnityBuildLog_2023-01-07-22-45-16.log
    -versionMajor
    0
    -versionMinor
    2
    -buildNumber
    2439
    -nographics
    -overrideMaxTextureSize
    0
    -executeMethod
    AzureDevOps.PerformBuild.

    And then building the XCode using Azures task ends on the same error as building on Unity windows and building the produced xcode project on Intel Mac!

    The error remains:
    /bin/sh -c /Users/####/Library/Developer/Xcode/DerivedData/Unity-iPhone-bymfqdkqamypztdxnoykhotoclrf/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/GameAssembly.build/Script-C62A2A42F32E085EF849CF0B.sh
    chmod: /Users/fwalker/agent/_work/1/dropXcode/Builds/Il2CppOutputProject/IL2CPP/build/deploy_x86_64/bee_backend/mac-x86_64/bee_backend: No such file or directory

    But as I said before, I can build and run (on an iPhone13) on the M1 if all is done from the Unity Editor. No idea if this helps, I just needed this to work this weekend to save my skin for being stupid enough to have upgraded to 2022. It is my penance.
    I have tried downgrading to 2022.1 and it cause so many issue that I figure it would be better to solve this issue, for at least I know that it works on the editor.

    So more later today as my penance continues...

    I will be working on eliminating the Azure pipeline and doing everything on the M1 through the command line.
     
  29. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    I don't think the problem lies on where the build was made.
    I made the iOS Build on a Windows machine and copied it to a macbook where I openend it with xcode and continued.
     
    newguy123 likes this.
  30. T_Isa

    T_Isa

    Joined:
    Nov 14, 2022
    Posts:
    4
    I have the same issue when compiling iOS on my PC (windows 10) with Unity 2022.2.1f1 and moving it to my Mac (MacOS Monterey v12.6.1), opening in XCode (14.1) and build fails with error : ".../bee_backend : No such file or directory".
    Please help how to resolve it?
     
    Last edited: Jan 9, 2023
    fwalker likes this.
  31. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    That's odd since 2022.1. works for me, the bug occurs after upgrading to 2022.2.0. Has anyone tested 2022.2.1?
     
    newguy123 likes this.
  32. T_Isa

    T_Isa

    Joined:
    Nov 14, 2022
    Posts:
    4
    Sorry the version is 2022.2.1.f1 : The version currently available on Unity hub.
    My project was in 2020 and working with this version.
    Works fine with 2022.1.24f1, 2020.3.40f1, 2019.4.40f1.
    Doesn't work with 2022.2.1f1
     
    Last edited: Jan 12, 2023
  33. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    @Juason: Can you send me the incident number for this? I'll have a look at it internally and try to get is escalated.
     
  34. Juason

    Juason

    Joined:
    Feb 7, 2017
    Posts:
    11
    Hello Josh, I just sent you a Conversation with the Incident Report and Title. Thank you for looking into this for me.

    And yes, 2022.1 works fine. 2022.2 and 2023+ beta variants all fail with the same behavior.
     
    CameronDWills, T_Isa and JoshPeterson like this.
  35. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    781
    same here Unity 2022.2.2.1f1 with Android and xCode too
    I can't build to mobiles!
     
    newguy123 likes this.
  36. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I may have a related issue. Building on Windows 10 machine to XCode project using Unity 2022.2.0f1, then copy over to M2 mac and build with XCode 14.2.
    I'm just building the AR Foundation sample scene "BasicImageTracking".

    I get this issue:

    upload_2023-1-11_11-48-5.png
     
    Last edited: Jan 11, 2023
  37. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    This looks like it might be a different issue. Can you submit a separate bug report for this one?
     
  38. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,936
    The issue we have been discussing here should be related to iOS builds only. Can you elaborate on the error you see for Android builds? I wonder if that is something different.
     
  39. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I can confirm, rolling back to Unity 2021.3, fixes the issue. So it seems to be some issue with Unity 2022.2
     
  40. CameronDWills

    CameronDWills

    Joined:
    Feb 26, 2021
    Posts:
    91
    It's probably worth noting also that trying Unity Cloud Build doesn't work either. Just received a bill for a bunch of build attempts that all failed because of this upgrade issue o_O
     
    newguy123 likes this.
  41. fwalker

    fwalker

    Joined:
    Feb 5, 2013
    Posts:
    255
    @JoshPeterson Have you heard anything about this? Is there a bug we can upvote? This along with WebGL taking forever to build is really killing our CI/CD process :(
     
    newguy123 likes this.
  42. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    Has anyone tried 2022.2.2?
     
    aimatme likes this.
  43. aimatme

    aimatme

    Joined:
    Jul 3, 2012
    Posts:
    24
    Unity3d 2022.2.2f1 same error
     
    francineW likes this.
  44. CameronDWills

    CameronDWills

    Joined:
    Feb 26, 2021
    Posts:
    91
    It might be related to this known issue in the patch notes:
    • iOS: [M1] Crash on MTLGetEnvCase when building the project for iOS (UUM-22385)
     
  45. suhorukovs

    suhorukovs

    Joined:
    Dec 16, 2018
    Posts:
    13
    Oh god. Unity please fix this issue!! Start learning Unreal. This is ridiculous to know this bug and do nothing.
     
    antnasce and T_Isa like this.
  46. Spellbook

    Spellbook

    Joined:
    May 21, 2015
    Posts:
    30
    Do you have any update on this? We haven't been able to publish a build for our iOS community in 2+ months. Has a bug report been filed with examples of the problem?

    Yes. Not fixed.
     
    Last edited: Jan 16, 2023
    newguy123 likes this.
  47. francineW

    francineW

    Joined:
    Sep 15, 2022
    Posts:
    10
    Noooooooo... I was so hopeful !
    @JoshPeterson I am also looking forwards to a fix. We are currently stuck building everything by hand on our local machines. Can't build with the pipelines. Makes things hard and disorganized. :(
     
  48. suhorukovs

    suhorukovs

    Joined:
    Dec 16, 2018
    Posts:
    13
    Unity please give an answer when this bug will be fixed:

    (unity 2022.2 build on mac os failed after 2 seconds with a message "...Builds/Il2CppOutputProject/IL2CPP/build/deploy_x86_64/bee_backend/mac-x86_64/bee_backend: No such file or directory")
     
  49. Juason

    Juason

    Joined:
    Feb 7, 2017
    Posts:
    11
    As I posted above, yes a BUG REPORT was filed from within Unity and I DM'd the ticket as requested. Honestly, ya'll should be aggressively ramrodding BUG REPORTs into the pipe if this is actually affecting you as a studio! From all of my testing this is not project specific - I duplicated it with a fresh install of everything (OS, Xcode, Unity, Demo Project) However, having dozens of companies reporting the same BUG will very likely draw Unity's attention more than my indie prototype.

    Hopefully we learn something more here soon.
     
  50. manuelgoellnitz

    manuelgoellnitz

    Joined:
    Feb 15, 2017
    Posts:
    397
    Has anyone tried 2022.2.3?
    Probably not fixed yet, I see nothing related in the changelog. But I have no time to test it myself.