Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Build error: source path cannot be empty

Discussion in 'Editor & General Support' started by MichaelTGD, Apr 16, 2020.

  1. MichaelTGD

    MichaelTGD

    Joined:
    Oct 24, 2019
    Posts:
    16
    Hey guys,

    I've put together just a little GUI based game, just one scene, barely any functionality even at this point. I wanted to build and put it on my phone to test how some of the movements felt, but I'm hitting a wall on this build error I can't figure out.

    I've built other projects before on this machine, no problem. I had thought it might be related to RenderPipeline related, as I had not installed or setup URP yet, and I was seeing "BuildPostProcessor" a lot in the errors. (I don't know enough about this area, yet, sadly). I have since installed URP, set it up in Player options, but am getting the same errors.

    • Unity 2019.3.9f1
    • OS: Windows 10
    • Build Platform: iOS
    Thanks for any help!

    Michael



    -----------------------------------------------------------------------------------------------------------
    Error #1:
    ArgumentException: source
    Parameter name: The source path cannot be empty.

    Code (CSharp):
    1. ArgumentException: source
    2. Parameter name: The source path cannot be empty.
    3. UnityEditor.FileUtil.CheckForValidSourceAndDestinationArgumentsAndRaiseAnExceptionWhenNullOrEmpty (System.String source, System.String dest) (at <bf679006b1b84db2a5a44842ef13dc36>:0)
    4. UnityEditor.FileUtil.CopyFileOrDirectory (System.String source, System.String dest) (at <bf679006b1b84db2a5a44842ef13dc36>:0)
    5. UnityEditor.FileUtil.ReplaceFile (System.String src, System.String dst) (at <bf679006b1b84db2a5a44842ef13dc36>:0)
    6. UnityEditor.iOS.PostProcessiPhonePlayer.AddLaunchScreenFilesCustomStoryboard (UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.iOS.PostProcessiPhonePlayer+IncludedFileList includedFiles) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:1894)
    7. UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessiPhonePlayer+BuildSettings bs, UnityEditor.iOS.PostProcessiPhonePlayer+ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport buildReport) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:775)
    8. UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (UnityEditor.iOS.PostProcessorSettings postProcessorSettings, UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:660)
    9. UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:45)
    10. Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    11. UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:49)
    12. UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <bf679006b1b84db2a5a44842ef13dc36>:0)
    13. UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <bf679006b1b84db2a5a44842ef13dc36>:0)
    14. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    Error #2
    Code (CSharp):
    1. Build completed with a result of 'Failed' in 116 seconds (115623 ms)
    2. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    3.  
    Error #3: UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    Code (CSharp):
    1. UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    2.   at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in <bf679006b1b84db2a5a44842ef13dc36>:0
    3.   at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <bf679006b1b84db2a5a44842ef13dc36>:0
    4. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    5.  
     
    ChHammad likes this.
  2. MichaelTGD

    MichaelTGD

    Joined:
    Oct 24, 2019
    Posts:
    16
    Oops! Of course, as soon as you get frustrated enough to reach out and ask for help, you find the problem yourself!

    In the rare instance that someone in the future makes the same mistake I did, I suppose I'll leave this up here to explain what happened.

    Project Settings>Player>iOS>Splash Image>Use Storyboards for Launch Screen
    Turn that off, unless you have the custom Storyboards ready to choose!

    In my other projects, Xcode always gave me warnings about wanting these storyboards. This time I'd thought I would check that box in Unity, and assumed (hoped?) that it would just convert whatever it does to storyboards. I guess that's not the case. No big deal, just turned it off, and viola! Built!

    Good luck, future fellow idiots!
     
  3. mykhailenkoa

    mykhailenkoa

    Joined:
    Oct 24, 2019
    Posts:
    1
    Hi @
    I also fell into this trap)))
    Michael, Thank you for describing the solution to the problem and leaving it here!
     
    pistoleta and MichaelTGD like this.
  4. Lajo

    Lajo

    Joined:
    Dec 23, 2016
    Posts:
    24
    Same here and your post saved me a lot of time.....
     
    MichaelTGD likes this.
  5. sicklepickle

    sicklepickle

    Joined:
    Apr 8, 2012
    Posts:
    44
    Thank you!
    I really didn't know where to start with that one.
    Seems like it snuck in during the jump from 2019.2 -> 2019.4.
     
    MichaelTGD likes this.
  6. florinel2102

    florinel2102

    Joined:
    May 21, 2019
    Posts:
    75
    Thanks :)
     
    MichaelTGD likes this.
  7. RowDaBonk

    RowDaBonk

    Joined:
    Jul 19, 2012
    Posts:
    3
    THANKS! I fell into this very same trap. Dude, that error feedback is BAD.
     
    Gametyme and MichaelTGD like this.
  8. ftorelli

    ftorelli

    Joined:
    Aug 10, 2017
    Posts:
    1
    Thanks a lot!
     
    MichaelTGD likes this.
  9. unitydev112

    unitydev112

    Joined:
    May 29, 2019
    Posts:
    14
  10. LymanInBole

    LymanInBole

    Joined:
    Dec 31, 2020
    Posts:
    8
    Thanks!
    I meet this problem when upgrade Unity from 2019.2 to 2019.4.