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

Cannot connect to Package Manager through Proxy

Discussion in 'Package Manager' started by MatthewSanders, Jan 24, 2019.

  1. MatthewSanders

    MatthewSanders

    Joined:
    Jan 24, 2019
    Posts:
    3
    Hi,

    I've been trying to use new versions the Package Manager for quite some time at each release, but haven't ever been able to get them to run through our proxy, and at this stage it's getting impossible to work around. We're using Unity 2018.3.0f1

    Trying to load a project that has a manifest.json with packages that need downloading (in this case com.unity.entities) gives the attached error image

    upm.PNG

    The Editor.log shows similar:
    [Package Manager] Done resolving packages in 7.89s seconds
    An error occurred while resolving packages:
    Project has invalid dependencies:
    com.unity.entities: Cannot connect to 'undefined' (error code: ECONNRESET).
    Package com.unity.transport@file:C:\dev\git_projects\unity-multiplayer\com.unity.transport has invalid dependencies:
    com.unity.collections: Cannot connect to 'undefined' (error code: ECONNRESET).


    The upm.log seems fine:
    {"level":"info","message":"Starting Server","timestamp":"2019-01-24T15:13:03.317Z"}
    {"level":"info","message":"Health Request received","timestamp":"2019-01-24T15:13:04.166Z"}


    Connecting to http://127.0.0.1:[port]/health shows everything's okay:
    {"status":"OK","nodeVersion":"v8.11.3","upmVersion":"v2.7.2"}


    I've tried setting HTTP_PROXY and HTTPS_PROXY, but they don't appear to have an effect, but testing the environment variables with curl seems to confirm that both the proxy and environment variables work.


    C:\>set HTTPS_PROXY=
    C:\>curl https://google.com
    curl: (7) Failed to connect to google.com port 443: Connection refused
    C:\>set HTTPS_PROXY=ip:port
    C:\>curl https://google.com
    <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
    ...


    And setting UNITY_NOPROXY (or not setting it) does not appear to have any effect.

    Is there anything else I can begin to try?
     
  2. okcompute_unity

    okcompute_unity

    Joined:
    Jan 16, 2017
    Posts:
    756
  3. MatthewSanders

    MatthewSanders

    Joined:
    Jan 24, 2019
    Posts:
    3
    Hi @okcompute_unity . Indeed, I have read through and tried the launch script (which is just setting the environment variables), launching both the Hub, and the Editor directly, with no luck, and our proxy server is not using a self-signed certificate.
     
  4. okcompute_unity

    okcompute_unity

    Joined:
    Jan 16, 2017
    Posts:
    756
    And can you update the proxy/firewall configuration to let the required domains to go through? At least for testing?
     
  5. MatthewSanders

    MatthewSanders

    Joined:
    Jan 24, 2019
    Posts:
    3
    I can use HTTP(S)_PROXY and cURL to successfully access all 5 (both HTTP and HTTPS) domains listed in the FAQ (well, 4/5, I can sucessfully connect to dl.bintray.com, but it does return a 404) -- would there be something that cURL does, that the UPM does/can not?
     
  6. okcompute_unity

    okcompute_unity

    Joined:
    Jan 16, 2017
    Posts:
    756
    It is possible that something unique to our tech stack is causing the issue for you. We would have to get more info on your environment to replicate the behaviour and debug the system for that scenario. Would you mind giving us a bit more details? You can contact me directly through a conversation if you like.

    Thanks a lot!

    Pascal
     
  7. febozzo

    febozzo

    Joined:
    Feb 26, 2018
    Posts:
    3
  8. okcompute_unity

    okcompute_unity

    Joined:
    Jan 16, 2017
    Posts:
    756
  9. NOP_W

    NOP_W

    Joined:
    Jul 25, 2018
    Posts:
    5
    I find what the problem on my PC is that Windows(10) blocks the connection between VPN and local networks.

    Maybe you can try to set up Windows Proxy.

    Go Windows Setting -> Network & Internet -> Proxy, and uncheck the radio "don't use proxy the server for (intranet) local address" if it is checked and delete text in the input field before it, then save. It should work now.

    It seems that some VPN software will change this setting.
     
    Last edited: Oct 8, 2019
  10. shahiltp_aramco

    shahiltp_aramco

    Joined:
    Apr 5, 2020
    Posts:
    4
  11. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227