**READ ME FIRST** Troubleshooting connection/loading project issues with Package Manager

Sections in this post:

  • Unity 2022.1 and up
  • LTS Releases

  • Firewall Suggestions

  • Blocked Ports & Timeout Suggestions

  • Legacy

  • Proxy Suggestions

  • Unity Hub Suggestions

  1. Unity 2022.1 and up

In Unity 2022.1.0a14, we removed the HTTP communication layer between Unity and the Unity Package Manager. We now use an OS-level IPC approach in order to solve a number of connectivity issues.

For older Unity versions where HTTP is still used, please see the sections “LTS Releases” and/or “Legacy” below.

  1. LTS Releases

This section applies to Unity LTS releases:

  • 2018.4 (2018.4.18f1 and up)
  • 2019.4 (2019.3.4f1 and up)
  • 2020.3 (since 2020.1)

In these Unity versions, the Unity editor communicates with the Unity Package Manager over HTTP. Under some scenarios, this can lead to connectivity issues resulting in the following error message:

Could not establish a connection with the Unity Package Manager local server process. This is most likely due to a proxy or firewall configuration. Make sure the process [...] is reachable via HTTP on the IP address 127.0.0.1.

Below are some troubleshooting tips for HTTP connectivity issues.

2.1 Firewall Suggestions

On Windows, there is often a firewall enabled by default called Windows Defender Firewall. This firewall can prevent inbound and outbound HTTP connections for specific applications. For this reason, when installing a Unity editor via the Unity Hub, the Hub automatically adds a rule to Windows Defender Firewall which allows inbound connections to the Unity editor:

To view your inbound rules:

  • Control Panel > Windows Defender Firewall > Advanced settings > Inbound Rules

If you see your Unity editor version is blocked (red circle icon), click “Properties” in the right-hand pane and under “Action”, select “Allow the connection”.

If you don’t see a rule for your Unity editor version, try creating one with the steps below:

  • Click “New Rule…”
  • For “Rule Type”, select “Program”
  • For the program path, enter the complete path to the Unity editor installation
  • For “Action”, select “Allow the connection”
  • For “Profile”, select all rules (Domain, Private, Public)
  • Give the rule a name e.g. “Unity 2019.3.0a1 Editor”

Important: Some users have reported that even with an existing rule for their Unity editor version, it appears that Windows Defender Firewall is still preventing inbound connections coming from UPM. Some users have found that deleting the existing rule and re-creating it has fixed this.

2.2 Blocked Ports & Timeout Suggestions

Some users have reported that Unity is not able to start communicating with Package Manager in the allotted 10 seconds that we allow during startup. To find out whether this is happening, you can try starting Package Manager manually and then connecting to Unity. In a terminal or command prompt, run the following:

Windows
<path-to-unity-installation-dir>\Data\Resources\PackageManager\Server\UnityPackageManager.exe
Mac
<path-to-unity-installation-dir>/Unity.app/Contents/Resources/PackageManager/Server/UnityPackageManager

By default, this will start Package Manager on port 10010. You can also specify your own port with -p e.g:

UnityPackageManager -p 3000

Now that Package Manager is running, try browsing to http://localhost:10010/health (replacing 10010 with your own port number if needed) to check that Package Manager is responding.

Finally, you can tell Unity to connect to your instance of Package Manager by running the following command:

Windows
<path-to-unity-installation-dir>\Unity.exe -upmServerPort 10010
Mac
<path-to-unity-installation-dir>/Unity.app/Contents/MacOS/Unity -upmServerPort 10010

Make sure to replace 10010 with your own port number if you set one.

If you are able to start Unity with the above steps, that means either the 10 second timeout we allow to start Package Manager is not enough or that a port (or range of ports) was blocked by a firewall. Please tell us on the forums or submit a bug and include this information.

Note: As of the versions below, the 10 second timeout was removed:

  • 2020.2.0f1
  • 2020.1.8f1
  • 2019.4.12f1
  1. Legacy

The following section applies to Unity releases before 2020.1.0f1, 2019.3.4f1 and 2018.4.18f1.

3.1 Proxy Suggestions

A proxy server (for example on a corporate network) may be redirecting HTTP traffic from your machine. If the proxy is intercepting traffic on http://127.0.0.1 then the Unity editor may be unable to communicate with UPM. For this reason, Unity automatically bypasses the proxy for Unity Package Manager requests.

However, in previous Unity versions, the proxy bypass could be overridden using the environment variable NO_PROXY or UNITY_NOPROXY. If you have these variables set, please ensure that their values include 127.0.0.1. For example:

UNITY_NOPROXY=localhost,127.0.0.1,google.com,my-no-proxy-domain.com

Important: Some users have reported that even without setting the UNITY_NOPROXY variable, Unity could not communicate with UPM and that explicitly setting the variable like so fixed their issue:

UNITY_NOPROXY=localhost,127.0.0.1

Important: Some users have said to ensure both localhost and 127.0.0.1 are present, and localhost is listed first.

To set environment variables on Windows:

  • Via command line:

  • Open Start menu > Type “cmd” > open Command Prompt

  • Type the following command and press enter:

  • setx UNITY_NOPROXY localhost,127.0.0.1
    
  • Via Windows settings:

  • Open Start menu > Search “Edit environment variables for your account”

  • Under “User variables”, click “New…” > For “Variable name”, type “UNITY_NOPROXY” > For “Variable value”, type “localhost,127.0.0.1”

To set environment variables on Mac, see the instructions in this post .

3.2 Unity Hub Suggestions

Unity Hub version 2.2.0 changed the way that environment variables were passed to the Unity editor. This caused issues for some users since the user's own environment variable values might get overridden. If these were proxy-related environment variables, this may have prevented Unity from connecting to UPM.

Unity Hub version 2.2.2 fixed this issue so that user and system environment variables were preserved when starting the Unity editor. If you have an older version of Unity Hub, please consider upgrading to version 2.2.2 or greater.

7 Likes

The only thing I've found that worked for me is to close every application that might also be accessing the internet, and try Unity again. It's, as most might think, not an ideal solution for me, as having even just a browser window is part of how I work, and having to close it every time I want to open a project or start a new project is a mild pain

3 Likes

im getting this error after updating to 2019.3.13f1for mac unityhub 2.3.1
im at home, dont have any proxy, dont have firewall, no anti virus
what can i do :(

4 Likes


I was struggling with the exact same problem till 5 minutes ago. That version is bugged and didn't include the Server files inside the PackageManager's folder, just uninstall the 2019.3.13 version and install the 2019.3.12 from the archive list.

5 Likes

issue is resolved for me. I uninstalled / deleted everything unity from my Mac (besides my projects) and reinstalled unity hub and latest version. everything worked fine this time.

not sure what the issue was before, but perhaps when unityhub was uninstalling my pervious version, it decided to uninstall the package manager required for the new version?

try uninstalling... if on Mac delete the unity files in ~/Library and application support folders. and reinstall. worked for me

3 Likes

I'm having the same issue as this. WIndows 10 x64 latest update, Unity hub 2.3.1 UNITY_NOPROXY set to localhost,127.0.0.1 all connections relating to unity in defender are allowed... starting to really pull my hair out now.

UPM diag report attached. any ideas?

5868043--624442--diagnostic_report_Tue_19_05_2020__91949_51.txt (1.53 KB)

3 Likes

I'm having the same issue. I have done everything but I'm still having it, I tried with different Unity versions, allowing everything about Unity in the firewall settings and deactivating the antivirus but nothing works, help.

This worked for me after I updated I was getting the same error. I don't know why or how this worked, but it may help.

Go to C: Users / "UserName" / AppData / Roaming / Delete Unity folder.

I did this and restarted Unity and it worked.

Note: make sure your files/folders are not hidden.

2 Likes

I'm still having this problem

2 Likes


cannot find it lol

1 Like

Hi I am also having the same issue.
Installed unity just today.
I have tried installing other versions even 2018 but also same issue.
All firewall and anti-virus turned off.

It works for me by opening the editor directly without using the hub for editor 2018.

5921912--632807--diagnostic_report_31_05_2020_Sun_151257_50.txt (1.51 KB)
5921912--632810--upm-diag.txt (1.34 KB)

Same issue from mac book pro :
- Unity HUB 2.3.2
- 2020.2.0a12

5926583--633584--diagnostic_report_20200601-231201.txt (1.6 KB)
5926583--633587--upm-diag.txt (1.27 KB)

To remove every versions of Unity and then HUB, reboot, download/install HUB again then Unity fixed the issue.
Now getting a new error and which google doesn't get much search :

Deterministic compilation failed. You can disable Deterministic builds in Player Settings
Library/PackageCache/com.unity.multiplayer-hlapi@1.0.2/Editor/Tools/Weaver/AssemblyInfo.cs(22,28): error CS8357: The specified version string contains wildcards, which are not compatible with determinism. Either remove wildcards from the version string, or disable determinism for this compilation
3 Likes

i am having a problem with the editor.It cant find the unity.exe

Tried what you suggested and now everything works!! Spent all day trying to get a project to open

Thank you so much for the tip. I spent the better part of a day trying to get Unity to load. Followed all the instructions from Unity. Nothing. Deleted the Unity folder and now I am up and running. Thank you!!!

2 Likes

Thanks for the feedback @timroye and @hwhikes . One question, did you guys only deleted the Unity folder under AppData/Roaming ? Or did you also deleted the UnityHub ones?

1 Like

Great tutorial!
i just download unity Unity 2019.3.0f6 and Unity 2019.1.0f2 and works!
but in some of the other versions it didn't work! the funny thing is that it worked on these versions without any intervention on the proxy or firewall.

https://unity3d.com/pt/get-unity/download/archive

3 Likes

A Solução abaixo me ajudou. Muito Obrigado.

5992400--644594--upload_2020-6-17_18-8-44.png

Hello, I only have one version of Unity running on Windows 10.

I tried what is suggested here and I still get the same message. And it running diagnostics it came up with an 'X' for Running the UPM health check.

What should I do?

5993264--644783--diagnostic_report_2020-06-17_163209_09.txt (1.48 KB)

1 Like


For me it was just the one. And for context, I had 2019.2 installed and that version worked fine. After downloading and trying to run 2019.3 there was an error, which the package manager health check failed. After deleting the folder in Roaming it launched. I'm trying to remember if I did anything else but it was a couple weeks ago and I'm still working out of .2 at the moment.

1 Like