Skip to content

Search results not appearing due to rate limiting / 429s #1174

Closed

Description

@johnnyreilly

Hello!

I was doing some testing on my phone (android pixel 8a) and found that typing ts-loader (one of my packages) into the search bar lead to no results:

Image

The URL at this point was https://npmx.dev/search?q=ts-loader

If you take the URL and open a brand new browser tab with that URL all behaves as expected:

Image

I'm not sure what the cause of this might be, but I thought I'd raise it. I'll try on a laptop when I get a moment and see if it is the same behaviour there as well.

Activity

  1. serhalp commented on Feb 8, 2026

    @serhalp
    Member

    This is a known issue that occurs when you get rate-limited by npm while searching. We bubbled that up as a 404 and to make matters worse the (client side navigation payload) 404 gets cached, so even backspacing and re-typing the query doesn't fix it.

  2. added theissue type on Feb 8, 2026
  3. johnnyreilly commented on Feb 8, 2026

    @johnnyreilly
    ContributorAuthor

    Oh no! Well at least it's not a mystery. Given rate limiting is involved, this will probably impact anyone typing into the search bar.

    Would it be good to have some kind of client side restrictions on the search http request being sent? For instance denouncing the input box to reduce unnecessary requests when users are typing?

  4. johnnyreilly commented on Feb 8, 2026

    @johnnyreilly
    ContributorAuthor

    I can confirm that this happens on the desktop too - here's some 429s:

    Image

    You can see duplicate requests in the network tab as well

  5. johnnyreilly commented on Feb 8, 2026

    @johnnyreilly
    ContributorAuthor

    Interestingly, running locally with pnpm dev the issue does not present:

    Image

    Same when running locally with pnpm build && pnpm preview:

    Image

    Which kind of makes sense I guess? If it did present locally someone else would have stumbled on this

    It appears to be a heisenbug

  6. johnnyreilly commented on Feb 8, 2026

    @johnnyreilly
    ContributorAuthor

    I experimented with the debouncing approach and it didn't make much difference alas. On the plus side (?) I did manage to replicate the issue locally

    Image
  7. changed the title [-]Search results not appearing[/-] [+]Search results not appearing due to 429s[/+] on Feb 8, 2026
  8. changed the title [-]Search results not appearing due to 429s[/-] [+]Search results not appearing due to rate limiting / 429s[/+] on Feb 8, 2026
  9. johnnyreilly commented on Feb 8, 2026

    @johnnyreilly
    ContributorAuthor

    I made some tweaks on a fork to show a "Hit npm rate limit, try again in a moment" message when 429s happen. I wonder if this would be useful?

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions