Repository navigation
Definition pages timing out or failing to load #1619
Description
Activity
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_FAILEDHere 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.
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-Originheader to the response
- we could configure Cloudflare to may be force this?
- 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?
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
@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.
Reacted by Stefan Gustafsson and naba-runnHey, 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!
Metadata
Metadata
Assignees
Labels
Type
Fields
Estimate
Start date
TargetDate
Description
Definition pages are consistently slow to load and frequently time out entirely, making the UI unreliable for review workflows.
Observed Behaviour
Examples of pages that fail to load entirely
https://clearlydefined.io/definitions/npm/npmjs/-/aws-sdk/2.1067.0