Search Unity

Resource Blocked when Installing Post Processing Package?

Discussion in 'Package Manager' started by TheGameNewBie, Feb 12, 2020.

  1. TheGameNewBie

    TheGameNewBie

    Joined:
    Jul 27, 2017
    Posts:
    92
    I'm using the Universal Render Pipeline in my current project.
    Whenever I try to install the Post Processing Package through Package Manager, It gives me an error saying,

    'EBUSY: resource busy or locked, open "ProjectPath/Library/PackageCache/.tmp......./copy\postprocessing\Textures\LensDirt\LensDirt00.png"

    There isn't any other application which is using the file at that moment.
    Also, I tried going to the path in explorer, and there isn't any folder named ".tmp.......", even with Hidden Files shown.
    I'm having this issue since I upgraded to the 2019 version of Unity.
     
  2. samuelb_unity

    samuelb_unity

    Unity Technologies

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

    The
    .tmp
    directory is a temporary directory created by Package Manager while we copy files to the cache, it gets deleted as soon as the copy is complete. We have seen issues like this before where another process within the Unity editor is keeping track of files in your Project/Library folder and attempts to read the file while it is being written by Package Manager causing the EBUSY error. Could you copy the whole error message that you see in the console so we can identify where it's coming from? Or is that all the error message you're given?
     
  3. TheGameNewBie

    TheGameNewBie

    Joined:
    Jul 27, 2017
    Posts:
    92
    I re-installed Unity and It works now. I can import the Post Processing Package.
    Well, I got a total of 4 error messages.
    Sorry, I don't have any way of reproducing them now.
    Thanks for the reply though.
     
  4. Drakorian-Labs

    Drakorian-Labs

    Joined:
    Feb 23, 2012
    Posts:
    88
    Hi,
    i'm having lots of these errors and i cannot upgrade any package.
    the LWRP is particularly critical for me, i have these errors:
    Code (csharp):
    1.  
    2. Cannot perform upm operation: EBUSY: resource busy or locked, open 'C:\Dev\SpaceFox\Library\PackageCache\.tmp21748DGxqJlpR8RFG\copy\InputSystem\NativeInputRuntime.cs' [NotFound]
    3. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    4.  
    and
    Code (csharp):
    1.  
    2. Cannot perform upm operation: Unable to add package [com.unity.render-pipelines.lightweight@7.2.1]:
    3.   One or more dependencies could not be added to the local file system:
    4.     com.unity.postprocessing: EBUSY: resource busy or locked, open 'C:\Dev\SpaceFox\Library\PackageCache\.tmp21748JZxhnF49luE5\copy\PostProcessing\Editor\Tools\DefineSetter.cs'
    5.     com.unity.render-pipelines.core: EBUSY: resource busy or locked, open 'C:\Dev\SpaceFox\Library\PackageCache\.tmp2174897SqhwAdEqfo\copy\Editor\InspectorCurveEditor.cs'
    6.     com.unity.render-pipelines.universal: EBUSY: resource busy or locked, open 'C:\Dev\SpaceFox\Library\PackageCache\.tmp21748IFm6d1FtW0vF\copy\Runtime\ScriptableRendererData.cs'
    7.     com.unity.shadergraph: EBUSY: resource busy or locked, open 'C:\Dev\SpaceFox\Library\PackageCache\.tmp21748rvJVGN96lQ2t\copy\Editor\Data\Graphs\GraphData.cs' [NotFound]
    8. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    9.  
     
  5. siriusx

    siriusx

    Joined:
    May 26, 2014
    Posts:
    3
    The solution for me if anyone stumbles upon this later was to make sure my IDE was closed as it had a lock on all files in Unity folder somehow
     
  6. franmrt

    franmrt

    Joined:
    Feb 26, 2017
    Posts:
    1
    Thanks, that worked for me
     
  7. samuelb_unity

    samuelb_unity

    Unity Technologies

    Joined:
    Nov 13, 2017
    Posts:
    151
    Ah that is good to know @siriusx, thanks for sharing. We think this issue may sometimes be caused by Unity's script compilation pipeline (the Asset Pipeline team are looking into this) but it is great to have another avenue to investigate and a workaround to recommend :)
     
    VictoryPlayerUmer likes this.
  8. swordmage

    swordmage

    Joined:
    Aug 14, 2018
    Posts:
    1
    I had the same error for many times before, though I still had no idea why this occur, my solution is to disable the anti-virus monitor temporarily while installing package
     
    Cenda likes this.
  9. unayozan

    unayozan

    Joined:
    May 11, 2018
    Posts:
    12
    Got the same error, the workaround worked fine.

    Closing down the IDE is enough.
     
  10. Extelen1

    Extelen1

    Joined:
    Mar 22, 2019
    Posts:
    2
    Yes, that works for me, thanks!
     
    hunter-baun and Kabeza like this.
  11. Armegalo

    Armegalo

    Joined:
    May 14, 2018
    Posts:
    30
    Yup, closed down VS Code and suddenly everyone is playing ball again :)
     
  12. Cenda

    Cenda

    Joined:
    Jun 3, 2010
    Posts:
    66
    Turn off Windows Defender (Real-time protection) is working for me.
     
    DarkenedShade likes this.
  13. nazarre

    nazarre

    Joined:
    Nov 3, 2019
    Posts:
    8
    I'm getting this error when trying to install various packages. I've turned off Windows Defender, reinstalled Unity, closed the IDE -- nothing works. Here are the error messages to the console. Any suggestions?

    Cannot perform upm operation: Unable to add package [com.unity.progrids@3.0.3-preview.6]:
    One or more dependencies could not be added to the local file system:
    com.unity.settings-manager: EBUSY: resource busy or locked, rename 'C:\Users\nazarre\Dropbox\_Game\repos\NetworkTutorial\Library\PackageCache\.tmp2392Vbx2YFUnFtSK\copy' -> 'C:\Users\nazarre\Dropbox\_Game\repos\NetworkTutorial\Library\PackageCache\com.unity.settings-manager@1.0.2' [NotFound].See console for more details
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    Error adding package: com.unity.progrids@3.0.3-preview.6.
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     
    EnlightenmentGames likes this.
  14. nazarre

    nazarre

    Joined:
    Nov 3, 2019
    Posts:
    8
    I've solved the issue -- dropbox was syncing and would lock the folder. I paused dropbox syncing, loaded required assets, unpaused dropbox and everything is working fine.
     
    EnlightenmentGames likes this.
  15. GoStudios_

    GoStudios_

    Joined:
    Dec 4, 2020
    Posts:
    4
    i have the same error

    and i read all of reply and i found to close the IDE is enough @unayozan

    so what is closing down IDE and how can i do this to prevent this error to appear when i install a package
    and i installed cinemachine and that error came one time but not on second try
    but when i tryed to install probuilder the error came but every time i try it appears again and again what should i do

    plzz reply as soon as you can :(
     
  16. visrwill

    visrwill

    Joined:
    Feb 18, 2019
    Posts:
    1
    IDE = Visual Studio (Community or Code), Rider, MonoDevelop etc. Whatever you edit your code files with.
     
  17. flippi273

    flippi273

    Joined:
    Nov 17, 2018
    Posts:
    24
    Had this same error, but when installing the Input System. Closing my IDE, Visual Studio Code, fix it as well.
     
    De_sha likes this.
  18. ThompZon

    ThompZon

    Joined:
    Sep 12, 2018
    Posts:
    7
    When upgrading from 2020.3.2 -> 2021.1.3 I got this issue, solved by closing VSCode.

    Code (Boo):
    1. [Package Manager] Done resolving packages in 10.98s seconds
    2. An error occurred while resolving packages:
    3.   One or more packages could not be added to the local file system:
    4.     com.unity.render-pipelines.core: EBUSY: resource busy or locked, open 'C:\Users\ThompZon\Unity\XXX\Library\PackageCache\.tmp18312Tdg0pp7Ap3OC\copy\Runtime\Common\IVirtualTexturingEnabledRenderPipeline.cs'
    5.     com.unity.render-pipelines.universal: EBUSY: resource busy or locked, open 'C:\Users\ThompZon\Unity\XXX\Library\PackageCache\.tmp18312P168CFt6sc18\copy\Runtime\ScriptableRenderer.cs'
    6.     com.unity.shadergraph: EBUSY: resource busy or locked, open 'C:\Users\ThompZon\Unity\XXX\Library\PackageCache\.tmp18312v0suePVu4A5J\copy\Editor\Generation\Controls.cs'
    7.  
    8. A re-import of the project may be required to fix the issue or a manual modification of C:/Users/ThompZon/Unity/XXX/Packages/manifest.json file.
    9.  
    10. Exiting without the bug reporter. Application will terminate with return code 1
     
    KVTeja_512 and xucian like this.
  19. RaghuvanshAgarwal

    RaghuvanshAgarwal

    Joined:
    May 12, 2021
    Posts:
    2
    It worked for me thanks
     
  20. Bluegru

    Bluegru

    Joined:
    Nov 3, 2018
    Posts:
    2
    Thank you very much,
    this fixed the problem for me
     
  21. ZigZagZat

    ZigZagZat

    Joined:
    Mar 6, 2021
    Posts:
    12
    Using some of the experimental features when installing git caused the issue for me
     
    Ijin likes this.
  22. Ijin

    Ijin

    Joined:
    Nov 4, 2013
    Posts:
    1
    Thank you! It fixed my problem with adding packages from git repositories (via Package Manager window and manifest.json). Problematic option in Git for Windows installer was experimental built-in file system watcher https://github.com/git-for-windows/git/discussions/3251
     
    develmusa likes this.
  23. Naver78

    Naver78

    Joined:
    Oct 26, 2020
    Posts:
    4
    I had the same issue, 2021 now, and reinstalling unity and turning off the windows defender helped. I also instaled the urp before installing Post processing.
     
  24. triangle4studios

    triangle4studios

    Joined:
    Jun 28, 2020
    Posts:
    33
    Correct Answer
     
    Studio923 likes this.
  25. zodok

    zodok

    Joined:
    Jan 12, 2019
    Posts:
    2
    close your code editor and redo it
     
  26. vigneshhbk

    vigneshhbk

    Joined:
    May 24, 2015
    Posts:
    1
    Thank you for this!
     
  27. xucian

    xucian

    Joined:
    Mar 7, 2016
    Posts:
    846
    YES
     
  28. PinguinoSod

    PinguinoSod

    Joined:
    May 26, 2013
    Posts:
    1
    Closing VS Code worked for me
     
    KVTeja_512 and xucian like this.
  29. Studio923

    Studio923

    Joined:
    May 23, 2017
    Posts:
    1
    Worked for me in 2022
     
  30. Nutaaq

    Nutaaq

    Joined:
    Jan 9, 2016
    Posts:
    10
    In my case, this issue came after moving my project using Git to a new laptop. I was using this .gitignore. Git never took part on the issue. (Just in case someone suspected on git).

    IDE was never opened on this laptop either.

    Disabling Real-time Protection on Windows defender worked
    for me on 2020.3.12f1 and Windows 10.
     
    adryyy and MadsRonnow like this.
  31. AnonymousForest

    AnonymousForest

    Joined:
    Oct 23, 2016
    Posts:
    1
    I love you. Thanks!
     
  32. scottdev333

    scottdev333

    Joined:
    Nov 20, 2021
    Posts:
    12
    Thanks so much for this! Something like this should probably make shutting down IDE as a pre-requisite for any package being installed. Problem solved and would save way more hassle and time than one would lose by having to do so.
     
  33. aecanales

    aecanales

    Joined:
    May 27, 2020
    Posts:
    2
    This was my issue too, thanks for sharing! The "quick and dirty" way I solved it was by moving the .git folder outside of my Unity project folder and then moving it back in.
     
  34. KermenTheFrog

    KermenTheFrog

    Joined:
    Mar 1, 2021
    Posts:
    1
    Had gone through trying everything listed here but nothing would work. Ended up being Microsoft power toys. Closing it fixed the problem. Saw the solution on Reddit. hopefully this helps someone
     
  35. Edzard

    Edzard

    Joined:
    Jan 21, 2019
    Posts:
    5
    This worked like a charm for me! Closing Powertoys automatically solved the issue, didn't even need to restart Unity.
     
    asthakapila94 likes this.
  36. KyooSik

    KyooSik

    Joined:
    Aug 20, 2022
    Posts:
    2
    Wow this worked for me also.... Thank you so much
     
    asthakapila94 likes this.
  37. fatheadx

    fatheadx

    Joined:
    Mar 2, 2016
    Posts:
    10
    SOLUTION!!!
     
  38. unity_596068D8C89A965DD854

    unity_596068D8C89A965DD854

    Joined:
    Dec 14, 2022
    Posts:
    3
    Thank you so much.