Failed to resolve packages: Failed to add editor bundled package


I’ve been making an attempt to make a new unity project but before I can even start I am getting an error about a directory that is nonexistent.

The following packages were added:
com.unity.2d.sprite@1.0.0
com.unity.2d.tilemap@1.0.0
com.unity.ads@3.7.5
com.unity.analytics@3.6.12
com.unity.purchasing@4.3.0
com.unity.xr.legacyinputhelpers@2.1.9
[Package Manager] Done resolving packages with errors in 0.19s seconds
Failed to resolve packages: Failed to add editor bundled package [C:\Program Files\Unity\Hub\Editor\2021.3.8f1\Editor\Data\Resources\PackageManager\Editor\com.autodesk.fbx-4.1.1.tgz] to the package cache:
ENOENT: no such file or directory, mkdir ‘C:\Users\Dillons PC\AppData\Local\Unity\cache\npm\packages.unity.com.tmp-6324-0aMibgL1yJXR’. No packages loaded.
A re-import of the project may be required to fix the issue or a manual modification of C:/Users/Dillon’s PC/My project (3)/Packages/manifest.json file.

What I believe to be the main culprit would be the path that the error describes, “C:\Users\Dillons PC\AppData.…”. This path is incorrect and should be “C:\Users\Dillon’s PC\AppData.…” its a minor difference but it might be what is causing it, unfortunately if it is, I don’t know what steps to take to resolve it.

Hey! I’m just reporting this issue. You’re correct, there seems to be an issue with apostrophe in usernames.
You can work around this by changing your username, or create a new account without an apostrophe for now.

1 Like

Hi @Blackhawk3002 ,

I am very sorry that this issue is affecting you. As noted by @CodeSmile above, this issue is caused by the presence of a single-quote character (') or double-quote character (") in the paths used by the Package Manager. In your case, I would bet that it’s due to an apostrophe (single-quote) in your user name.

It’s a bug that recently slipped by unnoticed in 2021.3.7f1. The fix is currently being integrated in all release branches affected. Until the fix is released with a new version of Unity that you upgrade to, the simplest workaround is to revert to a version prior to when the issue was introduced, if this is possible for you. In your case, it would mean 2021.3.6f1.

You can track the status of the fix for this issue here: Unity Issue Tracker - Package Manager: ENOENT: no such file or directory, mkdir

it’s still not fixed? I had the same issue with 2021.3.x @maximeb_unity , and now 2022.1.15 and 2022.1.16.

+1 @zivshek @maximeb_unity

Same issue still happening on 2020.3.44f1LTS

Rebuilding Library because the asset database could not be found!

[Package Manager] Done resolving packages with errors in 10.74s seconds

Failed to resolve packages: Failed to add editor bundled package [/opt/unity/Editor/Data/Resources/PackageManager/Editor/com.unity.purchasing.udp-2.0.0.tgz] to the package cache:
EINVAL: invalid argument, fchown. No packages loaded.

1 Like

Hi @TelloSoft ,

This looks like it’s a different root cause, though the consequences are the same in the end (not being able to resolve packages). Can you see if there’s any additional information in the upm.log file? (See the Unity Manual for the location of the file.)

This happened with a fresh empty project created with 2020.3.44f1LTS & Build on Android with CircleCi Ubuntu

Upm.log file:
[2023-02-12T19:03:05.955Z][INFO] Command-line: /opt/unity/Editor/Data/Resources/PackageManager/Server/UnityPackageManager -s 230 -p 41923 -l 2
[2023-02-12T19:03:05.956Z][INFO] Detected environment variables:
NO_PROXY=127.0.0.1,localhost,circleci-internal-outer-build-agent
[2023-02-12T19:03:05.959Z][INFO] Creating server instance
[2023-02-12T19:03:06.007Z][INFO] Starting Server
[2023-02-12T19:03:06.010Z][INFO] Server started on port [41923]
[2023-02-12T19:03:06.019Z][INFO] GET ‘/health’ ← Request received
[2023-02-12T19:03:06.020Z][INFO] GET ‘/health’ → 200 (1 ms)
[2023-02-12T19:03:06.127Z][INFO] POST ‘/project/dependencies’ ← Request received
[2023-02-12T19:03:15.648Z][INFO] POST ‘/project/dependencies’ → 500 (9520 ms)

Can you try increasing the log level to see if anything more useful shows up in the upm.log file? Right now the “interesting” part is

[2023-02-12T19:03:06.127Z][INFO] POST '/project/dependencies' <-- Request received
[2023-02-12T19:03:15.648Z][INFO] POST '/project/dependencies' --> 500 (9520 ms)

but it’s pretty light on details :hushed:

You can change the logging level by going to Preferences > General and setting Package Manager Log Level to Debug. Hopefully that will give us a better idea of the issue. If that doesn’t answer the question, you’ll need to open a Bug Report so we can try to reproduce this and investigate more in-depth.

I have now set LogLevel to Debug but nothing change in upm.log

Upm.log file now:

root@959f00040253:/# cat ~/.config/unity3d/upm.log
[2023-02-15T11:29:10.314Z][INFO] Command-line: /opt/unity/Editor/Data/Resources/PackageManager/Server/UnityPackageManager -s 228 -p 44545 -l 2
[2023-02-15T11:29:10.315Z][INFO] Detected environment variables:
NO_PROXY=127.0.0.1,localhost,circleci-internal-outer-build-agent
[2023-02-15T11:29:10.318Z][INFO] Creating server instance
[2023-02-15T11:29:10.368Z][INFO] Starting Server
[2023-02-15T11:29:10.371Z][INFO] Server started on port [44545]
[2023-02-15T11:29:10.562Z][INFO] GET ‘/health’ ← Request received
[2023-02-15T11:29:10.563Z][INFO] GET ‘/health’ → 200 (1 ms)
[2023-02-15T11:29:10.670Z][INFO] POST ‘/project/dependencies’ ← Request received
[2023-02-15T11:29:20.343Z][INFO] POST ‘/project/dependencies’ → 500 (9673 ms)
[2023-02-15T11:29:21.279Z][INFO] Shutting down UnityPackageManager: parent process [228] is no longer running.

Hmm, that’s very strange.

Do you run as root? That might somehow be related - I found a closed issue in the Nodejs Github repo where they were discussing error-handling for chown and the conclusion was that the errors should be bubbled up for root users but silenced for non-root users. Maybe that’s why we never saw that error. Could you try to give it a spin with a non-root user to see if this works?

Sorry, I think I can’t do it because I am using Game/CI with Circle Ci & there is no option to run unity as non root user. they don’t have any parameter like that in their orb
Orb Link: https://circleci.com/developer/orbs/orb/game-ci/unity

Oh, so the failure is happening on game-ci? Sorry, I hadn’t realized that. I know very little about that service so I can’t offer any guidance other than perhaps reaching out to whoever provides and maintains the service to get support for this issue, for instance CircleCI support.

Ok, Thanks for the quick replies.

Faced the same problem. Have you found a solution?