Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[SOLVED] Issues getting packages from Verdaccio Private Registry

Discussion in 'Package Manager' started by svarmony, Mar 31, 2020.

  1. svarmony

    svarmony

    Joined:
    Jan 23, 2015
    Posts:
    11
    Hi there!

    We are experiencing issues in Unity 2019.3.5 when trying to download packages from our freshly Verdaccio registry (v4.3.4). So far publishing and installing packages via node.js console works fine, but when trying to get those packages from within unity we are experiencing 2 issues:
    • If we set the scope registry to be HTTPS: "unable to verify the first certificate".
    • If we set the scope registry to be HTTP: "Request GET failed. one or more invalid parameters was given".
    Please help, our poor IT guy is banging his head with the the wall without any clue what else might be needing unity package manager to work. Is there anything that we are missing?

    EDIT: I just added the logs and the project manifest in case it is of any help.
     

    Attached Files:

    Last edited: Mar 9, 2021
  2. maximeb_unity

    maximeb_unity

    Unity Technologies

    Joined:
    Mar 20, 2018
    Posts:
    481
    Hi @innovationrocks,

    I'm sorry you're running into these issues, especially since your setup looks legit, and you should normally not be hitting any snags. So let's dive into this.

    The HTTPS error appears to be an SSL setup issue. Apparently the certificate chain cannot be validated, presumably because the root certificate is not recognized by the package manager (i.e. isn't found in its list of known root certificate authorities). I'll take a note to see if this list may have become outdated and needs to be refreshed. In the meantime, you can add that certificate by following the same steps defined for self-signed SSL certificates (see here: https://docs.unity3d.com/Manual/upm-network.html#SSL)

    Re the HTTP errors, it seems that your Verdaccio instance is set to redirect from HTTP to HTTPS and returns a 400 HTTP error when that happens. This is a configuration issue on your end - but I strongly recommend using HTTPS by applying the suggested fix above.

    Hope that helps your poor IT guy! :)
     
  3. svarmony

    svarmony

    Joined:
    Jan 23, 2015
    Posts:
    11
    Hey Hi!

    Sorry i totally forgot to write back :(

    We managed to make it work with the certificates via HTTPS and it now runs like a charm :D

    Thanks a lot!!!
     
    maximeb_unity likes this.
  4. Florian-Nouviale

    Florian-Nouviale

    Joined:
    Mar 14, 2013
    Posts:
    51
    Hi @svarmony ! Can you describe the steps you took to resolve your issue with https? I'm facing the same. I added a NODE_EXTRA_CA_CERTS environment variable which seems to solve the issue with npm in command line, but unity's package manager still doesn't work

    Overall I'm looking for a solution that doesn't require any configuration on the user side (except entering the server in the configuration manager settings), otherwise the whole point of having our own verdaccio server with our packages in it would be pointless and nobody will bother using it
     
    Last edited: Apr 29, 2022
  5. Florian-Nouviale

    Florian-Nouviale

    Joined:
    Mar 14, 2013
    Posts:
    51
    Ok found out the issue was my ca: variable in verdaccio configuration must point to the certificat chain file !