Skip to content

Definition pages timing out or failing to load #1619

Description

@yashkohli88

Description

Definition pages are consistently slow to load and frequently time out entirely, making the UI unreliable for review workflows.

Observed Behaviour

  • Many times definition pages never finish loading — they hang indefinitely with no content rendered and no visible error
  • Few are extremely slow, taking an unusually long time before showing any content
  • When attempting to preview a file where CD detected license occurrences, the page results in a blank screen (likely a downstream timeout)

Examples of pages that fail to load entirely

https://clearlydefined.io/definitions/npm/npmjs/-/aws-sdk/2.1067.0

Image Image Image

Activity

  1. sgustafsson commented on Aug 14, 2026

    @sgustafsson

    Another example of a page not showing any content: https://clearlydefined.io/definitions/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba

    The browser's (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36) console output:

    3a25a7f1cc446b60678ed25c9d829420d6321eba:1 Access to fetch at 'https://api.clearlydefined.io/suggestions/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba' from origin 'https://clearlydefined.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    api.clearlydefined.io/suggestions/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba:1  Failed to load resource: net::ERR_FAILED
    
    3a25a7f1cc446b60678ed25c9d829420d6321eba:1 Access to fetch at 'https://api.clearlydefined.io/harvest/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba?form=raw' from origin 'https://clearlydefined.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    api.clearlydefined.io/harvest/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba?form=raw:1  Failed to load resource: net::ERR_FAILED
    
    3a25a7f1cc446b60678ed25c9d829420d6321eba:1 Access to fetch at 'https://api.clearlydefined.io/definitions/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba?expand=prs&matchCasing=false' from origin 'https://clearlydefined.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    api.clearlydefined.io/definitions/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba?expand=prs&matchCasing=false:1  Failed to load resource: net::ERR_FAILED
    
    3a25a7f1cc446b60678ed25c9d829420d6321eba:1 Access to fetch at 'https://api.clearlydefined.io/curations/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba?expand=prs' from origin 'https://clearlydefined.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    api.clearlydefined.io/curations/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba?expand=prs:1  Failed to load resource: net::ERR_FAILED
    
    
  2. pombredanne commented on Aug 19, 2026

    @pombredanne
    Member

    Here are some path to resolve some timeouts and some experiments:

    • drop pre-loading the file details and raw data entirely. Either move these to another page entirely, or only load only on demand when the tab is selected.
    • let's deploy a separate frontend on another domain/ip that is NOT served through cloudflare
    • if this works well without cloudflare, stop using it ... and also consider testing the Fastly service through the OSI sponsorship.
  3. pombredanne commented on Aug 19, 2026

    @pombredanne
    Member

    Some other notes:

    • direct API calls seem to be going through OK
    • the common error message in the browser is "CORS Missing Allow Origin" so this is a CORS issue
    • Cloudflare must be the problem, it always is 🐲 ... searching the web shows that it could be a missing Cloudflare injection or our server not attaching the Access-Control-Allow-Origin header to the response
    1. we could configure Cloudflare to may be force this?
    2. we could also avoid CORS entirely by using a single domain for the api, mounting an endpoint to https://clearlydefined.io/api for use in the UI?
  4. sgustafsson commented on Aug 19, 2026

    @sgustafsson

    Reg. "direct API calls seem to be going through OK"

    As I received the notification from GH that you updated this issue, I was trying to call https://api.clearlydefined.io/definitions/npm/npmjs/-/aws-cdk-lib/2.127.0 via curl, no luck.

    https://api.clearlydefined.io/definitions/git/github/dotnet/runtime/3a25a7f1cc446b60678ed25c9d829420d6321eba?expand=prs&matchCasing=false on the other hand immediately came back with a response

    Not sure if this is helpful information, or a totally other issue altogether, but even on API level I do see the "sometimes it works sometimes it doesnt" pattern

  5. pombredanne commented on Aug 19, 2026

    @pombredanne
    Member

    @sgustafsson Thanks. The saying used to be that all networking issues are because of DNS. Now I think that all internet connectivity issues are because of Cloudflare. :D

    https://api.clearlydefined.io/definitions/npm/npmjs/-/aws-cdk-lib/2.127.0 is also hanging for me now.

  6. naba-runn commented on Sep 10, 2026

    @naba-runn

    Hey, happy to help with this if this is still open. If it's the CORS issue from the separate API domain, I could look into moving it under clearlydefined.io/api. Let me know if you guys are okay with that. Thank you!

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

    No type

    Fields

    Estimate

    None yet

    Start date

    None yet

    TargetDate

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions