Symptoms:
- I cannot open my Unity Project.
- Whenever I open Unity, I get an error saying “Could not establish a connection with the Unity Package Manager local server process".
Cause:
This error occurs when the Unity Editor starts the Unity Package Manager process, but is not able to communicate with it over the address http://127.0.0.1.
There could be a number of causes, such as HTTP traffic being blocked on this address by a firewall or that HTTP traffic is being re-routed from this address by a proxy.
Resolution:
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:
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 as below 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.
For instructions on setting environment variables, see the article, 'I need to start Unity with an environment variable(s) set, how can I do that?'
As of the following Unity versions, the proxy bypass behavior can no longer be overridden using environment variables. Unity will always bypass a proxy for connections with UPM:
Unity 2020 - 2020.1.0a24 and up
Unity 2019 - 2019.3.4f1 and up
Unity 2018 - 2018.4.18f1 and up
If you are on an earlier Unity version, please consider upgrading to one of the above versions. This way you can set UNITY_NOPROXY; how you like without worrying about interfering with connections to UPM.
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:
1) 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 do not 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, for example “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.
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 the Unity Hub, please upgrade to version 2.2.2 or greater.
More Information:
Comments
4 comments
This doesn't work on Monterey 12.1 Unity 2021.2.28 on M1 Max (even with setting environment variables). Tons of "Failed to get ipc connection from UnityShaderCompiler"
WARNING: Shader Unsupported: 'MK/Glow/UI/Unlit/Text Detail' - All subshaders removed
WARNING: Shader Did you use #pragma only_renderers and omit this platform?
WARNING: Shader If subshaders removal was intentional, you may have forgotten turning Fallback off?
Shader 'Effects/Distortion/CullOff': fallback shader 'Effects/Distortion/Free/CullOff' not found
Shader 'MK/Glow/UI/Lit/Detail': fallback shader 'MK/Glow/UI/Lit/Transparent' not found
Shader 'Effects/Mobile/Distortion/CullOff': fallback shader 'Effects/Distortion/Free/CullOff' not found
Shader 'Unlit HDRP SHADOWS SM': fallback shader 'Hidden/Shader Graph/FallbackError' not found
Shader 'TMPro/Distance Field 3': fallback shader 'TMPro/Mobile/Distance Field' not found
Shader 'MoreMountains/MMRipple': fallback shader 'Particle/AlphaBlended' not found
Launching external process: /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
No explicit failure code handling for error of type 22
Failed to get ipc connection from UnityShaderCompiler shader compiler! /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
Launching external process: /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
No explicit failure code handling for error of type 22
Failed to get ipc connection from UnityShaderCompiler shader compiler! /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
Launching external process: /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
No explicit failure code handling for error of type 22
Failed to get ipc connection from UnityShaderCompiler shader compiler! /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
Launching external process: /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
No explicit failure code handling for error of type 22
Failed to get ipc connection from UnityShaderCompiler shader compiler! /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
Launching external process: /Applications/Unity/Hub/Editor/2021.2.8f1/Unity.app/Contents/Tools/UnityShaderCompiler
No explicit failure code handling for error of type 22
F
After diagnosing checks all boxes without errors, I can confirm that my case is due to an [accidental?] IP block since a VPN fixes it. Using a VPN resolves it for me. It may not be you. I tried contacting Unity to resolve this - we'll see what happens.
Hi Dylan,
Thanks for reaching out.
I am glad to see that your problem has been resolved on Ticket# 1175212. If you have any further questions, please contact us.
Ingrid I did not resolve it. This is an inefficient workaround with breaking side-effects. I can only get this working when I VPN outside of Taiwan (a region without censorship, meaning that all signs point to Unity servers doing the blocking).
This seems to be a Unity-server-side geo-blocking issue, since:
1. No proxy
2. Firewall disabled
3. Diagnostic tool 100% passes
4. USA VPN is a confirmed workaround.
5. Reproduced on a fresh install of Windows 11 (with the latest version of Hub).
This can be further backed by the licensing bug(?) that only allows Taiwan IP addresses to hold a license for a few days at a time (before forcing a reapply), worked around with a VPN outside of TW.
This can further be confirmed via this thread: https://forum.unity.com/threads/do-i-need-to-renew-my-license-every-week.747794/
Are any other users here operating out of Taiwan?
Please sign in to leave a comment.