Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Difficulties in proxy environment

Discussion in 'Package Manager' started by Noblauch, Jan 29, 2020.

  1. Noblauch

    Noblauch

    Joined:
    May 23, 2017
    Posts:
    270
    Hi, I have difficulties getting the Unity Package Manager to work in a new corporate environment. The internet access is highly restrictive and runs via proxy server. However I have almost zero experience with network engineering.

    I previously had the problem, that the package manager couldn't connect to the internet with the red warning saying that I need to setup my proxy variables right.
    So I googled and set up HTTP_PROXY and HTTPS_PROXY with my internal user and password to the corporate proxy server.
    Now the problem is, that the Package Manager seem to have internal problems, which I don't understand:
    PackageManagerError.PNG
    Alt: Could not establish a connection with the Unity Package Manager local server process.

    I found very few hints to that warning, including this post:
    https://answers.unity.com/questions/1606298/could-not-establish-connection-with-unity-package.html

    So I tried the suggested fix via the command:
    setx UNITY_NOPROXY localhost


    That didn't fix it. I can't open no projects anymore and also can't create new ones. Loading hangs while starting the package manager server and then the above popup is shown.
    I ran all diagnostics tools as suggested and attached the results.

    I hope someone can help, these networking errors are really annoying and kind of a blackbox for me.
    Greetings from Germany,
    Nils Ole
     

    Attached Files:

  2. okcompute_unity

    okcompute_unity

    Joined:
    Jan 16, 2017
    Posts:
    756
    Hi @Noblauch,

    UNITY_NOTPROXY
    should be set to
    localhost,127.0.0.1
    . If you forget the 127.0.01 it will fail for sure. Note that
    localhost,127.0.0.1
    is the default value if the environment variable is not set. Also, make sure you restart the Hub and the editor when you configure the environment variable.

    Regards,

    Pascal
     
  3. Noblauch

    Noblauch

    Joined:
    May 23, 2017
    Posts:
    270
    Hey Pascal,
    thanks for the quick response!

    I tried your solution via
    setx UNITY_NOTPROXY localhost,127.0.0.1

    I was wondering, since every post on the internet says the var is UNITY_NOPROXY I also did the diagnostics again and attached it. It seems like the UNITY_NOTPROXY variable doesn't appear in the log.
    I also tried:
    UNITY_NOPROXY localhost,127.0.0.1
    and
    UNITY_NOPROXY 127.0.0.1


    I restarted Unity Hub every time but it still gets stuck while setting up the package manager server.

    I also found this post, and I checked if my localhost is defined right, and it is:
    https://answers.unity.com/questions/1421638/i-keep-getting-an-error-regarding-the-unity-packag.html

    My colleagues are now also trying to help me out, but they never encountered this problem before. We didn't find our way yet :S

    Greetings ;)
     

    Attached Files:

  4. Noblauch

    Noblauch

    Joined:
    May 23, 2017
    Posts:
    270
    UPDATE:

    Well, I just deleted my project and cloned again from git, deleted all environment variables (via regedit).
    Then set
    setx UNITY_NOPROXY localhost,127.0.0.1
    and reopened everything. And out of the sudden it seems to work. I still have to check for consistency, but take that as a fix right now.

    For anyone wondering how to check and remove environment variables without having permissions on the system:
    1. Open Run (win + R)
    2. Type "regedit" and hit ok
    3. Go to HKEY_CURRENT_USER -> Environment

    Thanks again Pascal, I hope I can call that fixed ;)
     
  5. okcompute_unity

    okcompute_unity

    Joined:
    Jan 16, 2017
    Posts:
    756
    I'm so sorry! I made a typo. This is a bad habit of mine :(.
    UNITY_NOPROXY
    is indeed the right name.

    Awesome! Glad the issue is fixed :). Btw, we are having a fix in the work that should prevent everyone from having this issue again for good. We are making sure the
    UNITY_NOPROXY
    setting will never interfere with the Package Manager's local connection.

    Regards,

    Pascal