Package manager not displaying all packages in scoped registry

I’v been using my own npm package server for a while now and everything has been going smoothly, however, recently I noticed that any new packages i publish are not displayed in the package manager. Older packages in the same scope are able to be updated and behave as expected. Although the packages do not show up in the manager they do work if I add them to the package manifest or add them as dependencies of other packages.

The new packages also look fine on the server, any idea of what could be causing this? Any help is greatly appreciated!

Hi there,

Could you share more information with us regarding what has changed? For instance, did you upgrade your sever? Did you upgrade to a new Unity version (if so, from which version to which version)?

Best,
Ethan

No server changes have been made since it was setup and we have gone from 2019.2 via a few 2019.3betas to finally arrive at 2019.3.0f1. I can’t find any other relevant changes that we have made that could cause this issue. I will do more extensive testing with different unity versions today. Do you have any ideas on what could be causing this behavior server side?

Status update:

I’v confirmed it’s not a server side issue. But I just can’t figure out whats causing the packages not to show up. I have created four separate new projects (2019.3.0f1) on four individual computers and the packages show up on two of them even though they all seem to be identical projects. In projects with 2019.2.12f1 they show up on all four computers.

What can possibly be causing this very unpredictable behavior is beyond me.

What factors influences if a package is displayed or not? I’m guessing this issue is somehow related to the minimum unity version of the package, however the packages missing have mo minimum version defined in the package.json

Hi there,

Thanks for your update! I’ve shared this issue with the team and hopefully we can have some insight. In the mean time, could you file a bug for this so we can look into it further?

To file a bug, you can see the following link:

Best,
Ethan

Has this bug been reported? I’m experiencing this issue as well with our github package registry (not github url packages but actual deployed npm packages on github). Packages don’t appear in the UI but if I add them manually they’re installed just fine. If I then uninstall the package the entry disappears entirely from the UI.

Yes, there was a bug reported similar to this that was reported and fixed in 2019.3.4f1 and 2018.4.18f1.

I’m curious, did you manage to make the Github Packages registry feature work with UPM? If so, can you elaborate on how you manage to do this?

Thanks!

Pascal

So I’ve tried on 2019.3.6f1 and 2020.1.0b4 yet neither of them show my packages either from my github registry OR my public verdaccio registry. Shall I submit another bug report or do I need to downgrade to 2018.4?

Regarding your question, it was pretty easy. You just add a scoped registry to your manifest like normal except the url needs to be suffixed with the repo owner:

"scopedRegistries": [
    {
      "name": "Company Packages",
      "url": "https://npm.pkg.github.com/@USER-OR-ORGANIZATION",
      "scopes": [
        "com.compnay"
      ]
    }
  ],

And for private repos / packages on github. Following the steps highlighted in the pinned thread for npm registry authentication worked just fine for me.

FYI, here’s a criminally easy github action script to automate the package deployment for you. I’d much rather this process be promoted than the github repo itself being used as a package:

name: Publish Unity Package
on:
  release:
    types: [created]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    # Setup .npmrc file to publish to GitHub Packages
    - uses: actions/setup-node@v1
      with:
        node-version: '12.x'
        registry-url: 'https://npm.pkg.github.com'
        scope: '@octocat' # Defaults to the user or organization that owns the workflow file
    - run: npm publish
      working-directory: PROJECT-FOLDER/Assets/PACKAGE-FOLDER
      env:
        NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 Like

Before doing that, can you try to start Unity with the -enablePackageManagerTraces argument and look into upm.log if there is anything related to your problem? This could be helpful.

Nice! I haven’t thought of just suffixing the scope registry URL with the scope! This is brilliant! We were looking into accepting both @ and / characters in package names. This was the current blocker when people tried to set up GitHub Packages registry. I will share this with our users. Thank you very much!

Regards,

Pascal

1 Like

Thanks to your help in using the GitHub packages registry through scoped registries, I was able to reproduce your issue. I’m sorry to tell you, as far as I can see, the Github Packages registry does not support NPM search API endpoints (/-/all and /-/v1/search). Both endpoints return a 405 status code :(. So it won’t be possible to show these packages in the Package Manager UI. You will have to resort to installing them manually and asking your users to use GitHub UI to find available packages.

If I find anything new, I’ll let you know.

Regards,

Pascal

@okcompute_unity RIP my hopes and dreams…but thanks for looking into it for me I really appreciate it!

Neither does Azure DevOps implement the API, and that’s why Artifacts does not work… :frowning: However, but a selfhosted Verdaccio registry works for me and my team. :slight_smile:

Cheers, Khaled.

after upgrading from 2019.3 to 2019.4.14f1, the ‘All packages’ becomes ‘Unity Registry’ in PackageManager, and I could not see all the packages available as it was in 2019.3 (without Proxy setting), with new upgrade 2019.4.14f1, i have to set HTTP_PROXY in system variable to enable the display of all packages available in ‘Unity Registry’, which is annoying. is there some new domain name that i need to add to white list ?or any solutions ?

Thanks

Hi @dormouse ,

That’s strange, the ‘Unity Registry’ refers to https://packages.unity.com but this hasn’t changed from 2019.3 to 2019.4 so I’m not sure why you would now need to set the HTTP_PROXY variable. Just to be sure, have you overridden the main registry in your project e.g. using the “registry” property in the project manifest or the UPM_REGISTRY environment variable?

@samuelb_unity was there a change between 2020.1 and 2020.2? “My Registries” no longer appears in the Package Manager on 2020.2

Unfortunately we currently have this bug, it was reported in this other thread https://discussions.unity.com/t/820251