devicons / devicon

Set of icons representing programming languages, designing & development tools
https://devicon.dev
MIT License
9.11k stars 2.26k forks source link

[BUG]: Plain icons return 403 #2148

Open jeremygau opened 3 months ago

jeremygau commented 3 months ago

I have searched through the issues and didn't find my problem.

Bug description

I'm using the https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/devicon/devicon-plain.svg like urls But some return 403

Some are :

Possible fixes or solutions

Create plain icons for these icons

Additional information

No response

BalaM314 commented 3 months ago

Same issue There are probably many sites relying on this repo for images, and that commit just broke all of them with no warning please add back the -plain icons

Snailedlt commented 3 months ago

Hi there, thank you for reporting this! This was not intended, and not expected, especially for icons like react, where the icon itself hasn't been removed or changed. It seems like something might have gone wrong with some aliases in the latest release.

@lunatic-fox do you have time to take a look at this ASAP?

Panquesito7 commented 3 months ago

I'm using the https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/devicon/devicon-plain.svg like urls

I'm kind of confused now. 🤔

The file react-plain.svg itself does not exist, and if you try to access it directly, it won't work. If you try to access that file even in the previous version (which had the icons working fine I believe), it won't work: https://cdn.jsdelivr.net/gh/devicons/devicon@v2.15.1/icons/react/react-plain.svg

jeremygau commented 3 months ago

I don't think that these icons have ever existed in plain version. For those that I am talking about, it is not a breaking change. I started to use them yesterday.

Perhaps I should not have report that as a bug But as a request icon

The 403 error code misleaded me

Panquesito7 commented 3 months ago

Perhaps I should not have report that as a bug But as a request icon

AFAIK, the icons you mentioned have aliases on other versions such as plain. See, for example, the react icon. https://github.com/devicons/devicon/blob/6910f0503efdd315c8f9b858234310c06e04d9c0/devicon.json#L8624-L8633

BalaM314 commented 3 months ago

https://github.com/devicons/devicon/commit/1a35e2be4482f169252543f3259db996e2f0b298 this commit deletes the -plain version for Rust, the -plain icons did exist before

lunatic-fox commented 3 months ago

As @jeremygau said it's not a breaking change (with some exceptions), however it's a feature that can be implemented to the project. I mean, since we have aliases to an icon it could fallback to the base icon or to a default icon.

One way that comes to my mind to solve this issue, like the case that @BalaM314 presented, is serving icons by an API. In other words, I could make another API like deviconapi that inherits the functionalities of the current one (which I prefer) or make big changes directly into deviconapi (which can possibly include some breaking changes).

The safest way to use the icons by now is using the devicon.dev site references.

That's weird but I think aliases weren't properly used at all in the project, just like tags.