Search Unity

Resolved Failed to resolve packages: Registry configuration is invalid

Discussion in 'Package Manager' started by SolarianZ, Jun 6, 2020.

  1. SolarianZ

    SolarianZ

    Joined:
    Jun 13, 2017
    Posts:
    238
    I am trying to load packages from a scoped registry server based on Verdaccio:

    upload_2020-6-6_14-51-46.png
    And here is my manifest.json:

    Code (CSharp):
    1. {
    2.     "scopedRegistries": [
    3.         {
    4.             "name": "My Custom Registry",
    5.             "url": "http://localhost:4873",
    6.             "scopes": [
    7.                 "com.mycompany"
    8.             ]
    9.         }
    10.     ],
    11.     "dependencies": {
    12.         ...
    13.     }
    14. }
    But Unity always give same errors:

    Code (CSharp):
    1. Failed to resolve packages: Registry configuration is invalid:
    2.   Scoped registry at position 1 is invalid:
    3.     Unable to connect "http://localhost:4873". No packages loaded.
    4.  
    5. A re-import of the project may be required to fix the issue or a manual modification of D:/PROJECTS/Unity/Test2019/Packages/manifest.json file.
    Code (CSharp):
    1. Cannot perform upm operation: Registry configuration is invalid:
    2.   Scoped registry at position 1 is invalid:
    3.     Unable to connect "http://localhost:4873" [InvalidParameter]
    4. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    Code (CSharp):
    1. Error fetching package list.
    2. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    Code (CSharp):
    1. [PackageManager] Error Registry configuration is invalid:
    2.   Scoped registry at position 1 is invalid:
    3.     Unable to connect "http://localhost:4873"
    4. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    I have tried replacing url with "http://localhost:4873/registry", "http://localhost:4873/all", "http://localhost:4873/-/all" and "http://localhost:4873/packages", but none of them worked.

    What should I do to make it works?
    Thanks!
     
  2. SolarianZ

    SolarianZ

    Joined:
    Jun 13, 2017
    Posts:
    238
    And Verdaccio didn't print any request logs after I change manifest.json and refresh Unity.
     
  3. Thermos

    Thermos

    Joined:
    Feb 23, 2015
    Posts:
    148
    Same here, some of our machines have this issue after upgrade from 2019.2.21 to 2019.3.15.
     
  4. SolarianZ

    SolarianZ

    Joined:
    Jun 13, 2017
    Posts:
    238
    Are you using Unity China Enhanced Edition?
     
    Last edited: Jun 8, 2020
  5. SolarianZ

    SolarianZ

    Joined:
    Jun 13, 2017
    Posts:
    238
    Problem was solved. Private npm server has been banned by Unity China.
     
    LoxodonStudio likes this.
  6. JokeMaker

    JokeMaker

    Joined:
    Sep 9, 2019
    Posts:
    19
    Failed to resolve packages: Registry configuration is invalid:
    Scoped registry at position 1 is invalid:
    Unable to connect "https://unityregistry-pa.googleapis.com". No packages loaded.

    Unity v2019.4.0f1
     
    Melons-unity likes this.
  7. UnityMaru

    UnityMaru

    Community Engagement Manager PSM

    Joined:
    Mar 16, 2016
    Posts:
    1,227
    Hi there,

    The scope registry you're having issues with is owned by Google. I'd suggest you talk to Google about this issue :)
     
  8. LoxodonStudio

    LoxodonStudio

    Joined:
    Nov 1, 2016
    Posts:
    41
    So, can I only use the non-Chinese version?
     
  9. SolarianZ

    SolarianZ

    Joined:
    Jun 13, 2017
    Posts:
    238
    If you want to use a private npm server in Unity China Edition, you need to apply a license from Unity China.
    But last month Unity China mentioned that they will remove this limitation, so in the feature we should be able to use private npm servers in Unity China Edition without special license.
     
    LoxodonStudio likes this.
  10. SolarianZ

    SolarianZ

    Joined:
    Jun 13, 2017
    Posts:
    238
    LoxodonStudio likes this.
  11. LoxodonStudio

    LoxodonStudio

    Joined:
    Nov 1, 2016
    Posts:
    41
  12. shibi2017

    shibi2017

    Joined:
    Jan 18, 2018
    Posts:
    153
    same here, i hate unity china
     
  13. JokeMaker

    JokeMaker

    Joined:
    Sep 9, 2019
    Posts:
    19
    F*ck Unity China!!!
     
    SolarianZ likes this.
  14. LinuxKer

    LinuxKer

    Joined:
    Nov 4, 2015
    Posts:
    1
    Hi, Friend, Did you Slove The problem?
     
  15. JokeMaker

    JokeMaker

    Joined:
    Sep 9, 2019
    Posts:
    19
    No, problem is not solved.
     
  16. JokeMaker

    JokeMaker

    Joined:
    Sep 9, 2019
    Posts:
    19
    I think this is not Google's issue, 'cause I can get correct CURL response with Google LLC's registry URL.
     
  17. supita_unity

    supita_unity

    Unity Technologies

    Joined:
    Dec 13, 2019
    Posts:
    226
    Hello everybody,

    I've checked and this issue with the scope registries should be fixed in 2019.4.1 and above. If the problem is still present for you, please let us know what version of Unity you are using and include the Editor.log

    Cheers,

    Supi
     
    richardfu71 and UnityMaru like this.