Search Unity

Publish to UWP platform by IL2CPP throws error: "IOException: Win32 IO returned 234"

Discussion in 'Windows' started by DataMeshDev, Jan 24, 2019.

  1. DataMeshDev

    DataMeshDev

    Joined:
    Nov 16, 2017
    Posts:
    5
    We met a strange problem, please help us~~
    We want to publish our project to UWP platform by IL2CPP. It works fine on some of our computer, but on others, it throws a strange exception, as follow:

    Unity version: 2018.3.0~2018.3.1
    VS version: 15.9.5
    Api Compatibility Level: .Net standard 2.0

    This problem will appear even we try a Empty project on some computer, and it will never appear on other computer. We can't find the different between these computers, they have same version of Unity/VS/Windows.

    And, if we change the target SDK to lower (i.c. 14393), it will work. but, we must use target higher than 16299, so we can't fix it by this way.

    Could anybody help us to fix this problem? Thanks a lot~~~
     

    Attached Files:

  2. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    4,034
  3. DataMeshDev

    DataMeshDev

    Joined:
    Nov 16, 2017
    Posts:
    5
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,443
    Can you record a Windows Performance Trace of the build failing using Windows Performance Recorder with File I/O checkbox checked and then send me the resulting file via a private message? A guide how to record it can be found here: https://files.unity3d.com/zilys/ETWPerfGuide/data/RecordingTraceOnPC.html


    By the way, is it always the same file it fails to copy?
     
  5. DataMeshDev

    DataMeshDev

    Joined:
    Nov 16, 2017
    Posts:
    5
    OK, we can record the trace for you.
    It's always failed on the same file.

    By the way, in our 5 computers, 2 of them build success only installed Unity2018.3.0, and 3 build failed has installed Unity2018.3.1. And, it seems that, if a computer has installed 2018.3.1, it will failed even use 2018.3.0 version.
     
    Last edited: Jan 25, 2019
  6. alpahbeta2000

    alpahbeta2000

    Joined:
    Sep 11, 2013
    Posts:
    8
    I have some error on 2018.3.7 and 2018.3.3 with different windows sdk(17763,17134,16299)
     
    Last edited: Mar 7, 2019
  7. wechat_os_Qy05YERT1W-oBLkdKibbzpvH0

    wechat_os_Qy05YERT1W-oBLkdKibbzpvH0

    Joined:
    Mar 26, 2019
    Posts:
    1
    Has the problem been solved?
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,443
  9. dyhd

    dyhd

    Joined:
    Apr 4, 2019
    Posts:
    1
    i meet it too, Win32 IO returned 234. Path:
    when this error is happened i use File.Delete to delete a file,
    that file is named too long, and file size is zero,
    i saw other people meet it and solved this problem, that is Shorten file path
    so i think some string in the API cannot to long
    Unity 2018.2.21,

    otherwise, i use Unity2018.2.6 is fine,
    Weird
     

    Attached Files:

  10. JEDIWOLF_CN

    JEDIWOLF_CN

    Joined:
    Apr 6, 2019
    Posts:
    2
    me 2...

    IOException: Win32 IO returned 234. Path: C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract\2.0.0.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd" or "Temp\StagingArea\Data\Managed\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd
    System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
    PostProcessUAPIl2Cpp.CopyFrameworkAssemblies () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUAPIl2Cpp.cs:339)
    PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:160)
    UnityEditor.WSA.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:122)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    Build completed with a result of 'Failed'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00234] in D:\unity\Editor\Mono\BuildPlayerWindowBuildMethods.cs:191
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in D:\unity\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  11. JEDIWOLF_CN

    JEDIWOLF_CN

    Joined:
    Apr 6, 2019
    Posts:
    2
    I delete the file " C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract\2.0.0.0\Windows.ApplicationModel.CommunicationBlocking.CommunicationBlockingContract.winmd" to build successfully.
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,443
    How deeply nested your Unity projects on your filesystem? Did you try putting them at the root of the drive or something?
     
  13. jediwolf

    jediwolf

    Joined:
    Jul 17, 2014
    Posts:
    2
    D disk root directory
    Project name capitalized
     
  14. jediwolf

    jediwolf

    Joined:
    Jul 17, 2014
    Posts:
    2
    Doubt that the name of the duplicated file is too long, Because this file name is the longest in the entire SDK directory...
     
  15. zzimagination

    zzimagination

    Joined:
    Nov 28, 2017
    Posts:
    2
    i also delete the file,and build success;
     
  16. edwardbaoli1

    edwardbaoli1

    Joined:
    Jun 12, 2018
    Posts:
    3
    I met the same problem, but after I delete the file, I won't debug any errors until I open the project by VS2017, and it warning: "Cannot find Visual Studio 2015 (v140) generating tools. Install Visual Studio 2015 (v140) can use Visual Studio 2015 (v140) generating tools to generate",
    If I ignore the warning and keep going, it won't receive any errors until I install the AppDevPackage on UWP by powershell, then the powershell feedback, I translated part of it in English is :"Add-AppxPackage: Deployment Failure, reason is HRESULT:0x80073CF3...", then, the app installed failure,I have no idea with that, please help me.
     
  17. WuHaoDataMesh

    WuHaoDataMesh

    Joined:
    Jan 30, 2019
    Posts:
    1
    Finally, we found the solution of this issue.
    The reason of this error is, the full path of the file in Windows SDK is too too too long... The length of the path in default install folder is 231 characters. System.IO.File.Copy can't handle this.

    To fix it, you can install windows SDK in a shorter folder, like "C:\Z\", to reduce the length of file path. but, unfortunately, you can't change this install path when you have installed any windows SDK. so, you must do as follow:

    1. Uninstall Visual Studio and all windows SDK.
    2. Install windows SDK FIRST, and you can select a short root path. ( Important! if you install VS first, it will install a set of windows SDK to default folder and you can't change it!)
    3. Install Visual Studio

    And then, you can publish UWP project again! Hooooooray~~~
     
  18. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    6,443
    I'm still trying to chase this down. I've never received a trace from @DataMeshDev and we haven't been able to reproduce this locally either. Could anyone that can reproduce this record a windows performance trace for me?
     
  19. wizard_ll

    wizard_ll

    Joined:
    Apr 16, 2018
    Posts:
    1
    just delete it.