ScoopInstaller / scoopinstaller.github.io

ScoopInstaller homepage and search engine
https://scoop.sh
MIT License
78 stars 18 forks source link

[Bug] Bucket name not displayed correctly #49

Closed StarsbySea closed 1 year ago

StarsbySea commented 1 year ago

When I use scoop.sh to search for Libreoffice, the web page does not have the correct official Extras name, see the image below https://scoop.sh/#/apps?q=libreoffice&s=0&d=1&o=false Screenshot 2023-02-16 at 16-03-29 Scoop - Apps (libreoffice) If you have time, could you please look at and fix this little problem?

rashil2000 commented 1 year ago

https://scoop.sh/#/apps?q=libreoffice&s=0&d=1&o=false

I opened this link and it displays the bucket extras correctly to me...

StarsbySea commented 1 year ago

After taking a closer look at the network requests, I found the cause. Because my ISP (intermittently) blocks the domain name raw.githubusercontent.com, https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/buckets.json would not load, preventing display the official bucket name correctly.

You can reproduce this problem by blocking access to https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/buckets.json in your browser.

2023-02-17 091619

In fact, in some regions (e.g. China) raw.githubusercontent.com is a blocked or very difficult domain to access, so can I request to hopefully use jsdelivr's cdn to speed up access to buckets.json?

https://github.com/ScoopInstaller/scoopinstaller.github.io/blob/a40087d0074fd5770cf490a612492724570d3373/src/components/Search.tsx#L152

For example, the above code could be changed to

fetch('https://cdn.jsdelivr.net/gh/ScoopInstaller/Scoop/buckets.json')

Thanks again for your testing and feedback.

gpailler commented 1 year ago

Thanks for the investigation and the proposed solution! I will apply the change

StarsbySea commented 1 year ago

Thank you. That solves the problem.