Search Unity

[Azure Artifacts] npm search endpoint unsupported for package listing

Discussion in 'Package Manager' started by ikriz, Dec 1, 2021.

  1. ikriz

    ikriz

    Joined:
    Dec 3, 2009
    Posts:
    98
    Hi There,

    I've got the scopedRegistry configured and everything works perfectly if I add a known package by name through the add from git menu. and instead of entering a url I enter the known package name. lets say pkg.scope.awesomepackage as an example.
    Running in Unity 2019.4f12.
    The one thing that doesn't work is package listing because it seems microsoft doesnt support endpoints /-/all or search. It would be handy if we could disable package listing for scoped registries. Currently we get bombarded with the following error:

    Cannot perform upm operation: Request [GET https://pkgs.dev.azure.com/<companything>/_packaging/<morecompanythings>/npm/registry/-/v1/search?text=pkg.scope&from=0&size=250] failed because it lacks valid authentication credentials [Unknown]
    Error searching for packages.
    0x000002CD6A3DFEFB (Mono JIT Code) UnityEditor.PackageManager.UI.UpmClient/UpmClientInternal/<>c__DisplayClass77_0:<SearchAll>b__0 (UnityEditor.PackageManager.Error)
    0x000002CD546071AA (Mono JIT Code) (wrapper delegate-invoke) System.Action`1<T_REF>:invoke_void_T (T_REF)

    And if I manually go to the url specified im met with the following error:
    {"count":1,"value":{"Message":"No HTTP resource was found that matches the request URI 'https://pkgs.dev.azure.com/_packaging/<companystuff>/npm/registry/-/v1/search?text=pkg.scope&from=0&size=250'."}}

    it seems microsoft is internally redirecting aswell. but if we can by choice disable package search this would help mitigate these errors in the meantime.
     
    astorms likes this.
  2. astorms

    astorms

    Joined:
    Jan 31, 2018
    Posts:
    50
    I am in the same situation
     
  3. astorms

    astorms

    Joined:
    Jan 31, 2018
    Posts:
    50
    Can anyone offer a solution to those above errors when using an Azure Artifacts npm feed?
     
  4. Mr_Master_Matt

    Mr_Master_Matt

    Joined:
    Jul 13, 2018
    Posts:
    1
    Same issue here, but it seems like this is an issue with the way Microsoft has implemented their Azure Artifacts NPM Feeds. I found this GitHub Issue which was turned into a Feedback Item on Microsoft's Developer Community.
     
  5. ikriz

    ikriz

    Joined:
    Dec 3, 2009
    Posts:
    98
    Because nothing is happening on the microsoft front as far as i can tell, we started looking into Verdaccio, solves authentication headaches and supports search without any issues. Hopefully microsoft will change this in the future...