No Such File or Directory. No .tmp files

Whenever I try to open or create a new project, I get an error:

When I looked at where the files that the packages want are supposed to be, sure enough they aren’t there.

I clicked continue to go into the project manager, I see this:

Each package with an error sign and the one with the update symbol all tell me a different .tmp file is missing.

In the Editor log it says to try reimporting the project, which didn’t work.

What can I do to get these .tmp files? I tried reinstalling Unity in case it was a problem with the installation but that didn’t help.

8401530–1109325–upm.txt (6.08 KB)

I think I found it. You know, the username you meticulously blackened out in the screenshots is also in the logs. :stuck_out_tongue:

But that actually helped, because your username is in the format “Name’s Computer”.

However, in the log where Package Manager tells us this:

An error occurred while resolving packages:
One or more packages could not be added to the local file system:

It actually shows us that it wanted to create files in this path:
mkdir ‘C:\Users*Names Computer*\AppData\Local\Unity\cache\packages\packages.unity.com.tmp-20924-OhltPXxZVeLY’

Note the missing apostrophe!
The reason probably because ’ seems to be a string delimiter, but it wasn’t escaped.

The quick fix for you would be to change the username of the account that you log in with, removing the apostrophe. Alternatively, create a new local user account whose name doesn’t include an apostrophe.

In the meantime I’ll send a bug report because this issue might explain some other bugs users report from time to time where creating projects fail.

1 Like

Hi @[unity_FR-3YCyuo6Wnnw]( No Such File or Directory. No .tmp files members/unity_fr-3ycyuo6wnnw.5094934/),

This is bug in UPM. A library that we use to create temporary folders introduced a regression in its latest version. It removes single and double quotes in the path when trying to create a folder. Incidently, this creates the problem @CodeSmile . Sorry about that. A fix is on the way. In the meantime, remove quotes from your project path.

Note: This is issue will show up if the computer account username has quotes or double quotes. This is because UPM creates temporary folder in the cache which is usually located under user’s folder. In that case, sadly, quotes and double quotes have to be removed from the username until the issue is resolved :frowning:

Pascal

1 Like

I scanned a few topics back and noticed staff is already aware of the issue. :wink:

Hi @[unity_FR-3YCyuo6Wnnw]( No Such File or Directory. No .tmp files members/unity_fr-3ycyuo6wnnw.5094934/),

As mentioned by @okcompute_unity (and @CodeSmile in this and other threads :slight_smile: ), 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, it seems that your user name has an apostrophe (single-quote) in it, which would explain why you are affected by this issue.

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

2 Likes

Thank you! It seems all I needed to do is change the version I was using. I’m glad I don’t have to change my profile file name since it seems that’d be complicated. Hopefully Unity fixes this soon.

Actually, when I created a new account last year and that username had a space and an exclamation mark in it, I thought for a moment what kind of issues this might cause … but then I thought: “Nah, we’re in 2021 now … this shouldn’t be a thing anymore”.

Still can be. Over 25 years after Windows 95 introduced spaces in path names (among other formerly illegal chars). :smile:

That, and long paths. :stuck_out_tongue:

1 Like

Where long.MaxValue equals 260. That’s not nearly long enough! :smile:

MS shows a possible issue that I’ve ran into actually:

1 Like