Search Unity

Can't run RunUnityPackageManagerDiagnostics. [ERROR] EISDIR

Discussion in 'Package Manager' started by CDF, Jan 25, 2021.

  1. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    whenever I try and launch RunUnityPackageManagerDiagnostics.bat on Windows I get this output:

    Code (CSharp):
    1. Unity Package Manager Diagnostics
    2. Version 0.1.8
    3.  
    4. Failed to create report at ''.
    5. An error occurred while running the diagnostic tool. See log for details (C:\Users\Chris\AppData\Local\Unity\Editor\upm-diag.log).
    6.  
    7. Press any key to continue . . .
    [2021-01-25T21:28:45.800Z][ERROR] EISDIR: illegal operation on a directory, open 'C:\Program Files\Unity\Hub\Editor\2020.1.14f1\Editor\Data\Resources\PackageManager\Diagnostics'
    [2021-01-25T21:28:45.802Z][ERROR] EISDIR: illegal operation on a directory, open 'C:\Program Files\Unity\Hub\Editor\2020.1.14f1\Editor\Data\Resources\PackageManager\Diagnostics'
     
  2. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    151
    Hi @CDF,

    That is strange indeed. Are you launching
    RunUnityPackageManagerDiagnostics.bat
    manually (e.g. from Windows Explorer or from a command prompt) or is it being launched by Unity (from the "Diagnose" button in an error dialog)?

    For now, if you simply want to run the diagnostics, you can take a look at what the
    .bat
    script is doing; it's a very simple script that launches the diagnostic app like so:
    Code (CSharp):
    1. "<path-to-diagnostics-folder-in-unity-installation>\bin\UnityPackageManagerDiagnostics.exe" -o "<path-to-create-report>" -p "<path-to-upm-executable>"
    You can run this command from a command prompt like cmd or PowerShell and replace the parts in angle brackets. Judging from the logs you provided, the paths would be something like this:
    Code (CSharp):
    1. "C:\Program Files\Unity\Hub\Editor\2020.1.14f1\Editor\Data\Resources\PackageManager\Diagnostics\bin\UnityPackageManagerDiagnostics.exe" -o "<path-to-create-report>" -p "C:\Program Files\Unity\Hub\Editor\2020.1.14f1\Editor\Data\Resources\PackageManager\Server\UnityPackageManager.exe"
    Let me know how you get on. If this works as expected then there may be something wrong with the
    .bat
    script on Windows and we'll need to log a bug.
     
  3. DFEnter

    DFEnter

    Joined:
    Jan 8, 2021
    Posts:
    9
    I get the same error. Can't even run it to find out why my package manager always says I'm offline. So disappointing.
     
  4. supita_unity

    supita_unity

    Unity Technologies

    Joined:
    Dec 13, 2019
    Posts:
    226
    Hey, did you try manually launch the Diagnostic application as suggested in the post above? Do you get the same error?
     
  5. NiQiuNiQiu

    NiQiuNiQiu

    Joined:
    Apr 3, 2019
    Posts:
    1
    I get the same error on ubuntu 20.04lts.
    And I try:
    Code (CSharp):
    1. ./Unity/Hub/Editor/2019.4.24f1/Editor/Data/Resources/PackageManager/Diagnostics/bin/UnityPackageManagerDiagnostics -o ~/log.txt -p Unity/Hub/Editor/2019.4.24f1/Editor/Data/Resources/PackageManager/Server/UnityPackageManager
    It's work.
    It appears that these two environment variables do not exist.
    $UPM_DIAG_REPORT_PATH
    $UPM_DIAG_UPM_PATH
     
  6. CDF

    CDF

    Joined:
    Sep 14, 2013
    Posts:
    1,311
    Hi, sorry I missed this.
    I'm running the .bat script directly in command line.
    @NiQiuNiQiu is right, the "UPM_DIAG_REPORT_PATH" and "UPM_DIAG_UPM_PATH" variables don't exist.
    I made this batch script that does work for my purpose:

    Code (CSharp):
    1. @echo off
    2.  
    3. set unityVersion=2021.1.12f1
    4. set unityDiagPath="C:\Program Files\Unity\Hub\Editor\%unityVersion%\Editor\Data\Resources\PackageManager\Diagnostics\bin\UnityPackageManagerDiagnostics.exe"
    5. set unityPackagePath="C:\Program Files\Unity\Hub\Editor\%unityVersion%\Editor\Data\Resources\PackageManager\Server\UnityPackageManager.exe"
    6.  
    7. echo Running Diagnostic
    8. echo Unity Version: %unityVersion%
    9.  
    10. %unityDiagPath% -o "%~dp0\report.txt" -p %unityPackagePath%
    11.  
    12. set exit_code=%ERRORLEVEL%
    13.  
    14. echo.
    15. pause
    16.  
    17. exit /b %exit_code%
     
    Klimashin, isimarvel and supita_unity like this.