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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question UWP build failing when Copying Resources

Discussion in 'Windows' started by soleron, Jan 29, 2021.

  1. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    524
    These are the 2 errors I get.


    01. This one says 13 errors. There are no 13 errors as far as I can see.
    What could this be?

    UnityEditor.BuildPlayerWindow+BuildMethodException: 13 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002ca] in <1e441e8684a14fe4b8f8a926d91afc3a>:0
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <1e441e8684a14fe4b8f8a926d91afc3a>:0
    UnityEngine.GUIUtility: processEvent (int,intptr,bool&)


    02.As far as I know there is no such thing with an empty filename...

    ArgumentException: An empty file name is not valid.
    Parameter name: sourceFileName
    System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.IO.File.Copy (System.String sourceFileName, System.String destFileName) (at <9577ac7a62ef43179789031239ba8798>:0)
    PostProcessWinRT.CopyTestCertificate () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1579)
    PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:185)
    UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:86)
    Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
    UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:90)
    UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <1e441e8684a14fe4b8f8a926d91afc3a>:0)
    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 <1e441e8684a14fe4b8f8a926d91afc3a>:0)
    UnityEngine.GUIUtility: processEvent(Int32, IntPtr, Boolean&)



    upload_2021-1-29_22-19-40.png
     
    Last edited: Jan 29, 2021
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    In the UWP player settings, what is the certificate field configured to?
     
  3. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    524
    It is configured using a certificate I created with Unity.

    (Which gives me trouble down the line in Visual Studio but is the only way I could make it build properly.)

    upload_2021-1-30_1-48-1.png
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    Could you try recreating it? For some reason it seems the path to it is empty or corrupted.
     
  5. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    524
    It happened several times in a row.
    In general, I never post about something with a single incident. Has to be over 4-5 times of failure and attempts to fix it, before I make a post.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    Does that mean it's not happening every time you build?
     
  7. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    524
    It happens every time in Unity. Older versions too. (i.e. 2018 and 19 series)
    Then I start the project in VS and associate the build with the Windows Store product that I have already published so the new build from VS uses the store certificate and builds properly.
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    Can you report a bug report on that? You should be able to delete all the assets in your project except the offending certificate before submitting it.
     
    soleron likes this.
  9. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    524
    I suppose I could also do it in an empty project with a template scene. I do not have reasons to believe it would not happen the same. It happens on all the projects. Not just that one.

    The problem for the end user is that there are workarounds, (like in the case with the dedicated GPU in UWP)
    And when there are workarounds usually teams do not bother much; even though the workflow is broken.

    Teams often take for granted (and that applies for Unity too) that the user will eventually get to know about the workaround and perform their tasks. While from my perspective (as producer and product manager) the problem is that there are countless hours lost on silly issues and that people get to generate support/QA tickets again and again, over trivial matters that could have been resolved from the engine side.
     
  10. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,522
    I wouldn't ask you for a bug report if I wasn't interested in fixing it. My team is responsible for that piece of product. If you report a bug and give me the case number, I'll make sure it's handled properly.
     
    soleron likes this.
  11. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    524
    For the sake of testing,
    I setup a brand new empty project with the default HDRP Template in Unity 2020.2.2f1.

    Even this comes with its own set of issues.

    Default UWP Release Build in VS2019 - Without Copying References (cert with password)
    upload_2021-2-4_11-35-10.png
    Cert without password
    upload_2021-2-4_12-16-5.png

    Unity Console + Build and Play with Copy References On
    upload_2021-2-4_11-43-4.png

    upload_2021-2-4_11-47-22.png

    Debug Build
    upload_2021-2-4_12-26-52.png

    Unlimately when the build successfully deployed, It would not function properly.
    The app started but was stuck on the splash screen.

    I will be preparing my project for a bug report the next days.
     
  12. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    524

    After cleaning up all the assets and tools the error is similar to the empty scene.

    This is with "copy references" disabled
    upload_2021-2-4_15-49-54.png

    This is with copy references enabled.
    upload_2021-2-4_15-51-37.png


    The previous error is now gone, but same as above happens in the actual project.


    upload_2021-2-4_17-13-33.png

    upload_2021-2-4_17-14-33.png