Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hi-res-thumbnails: cat thumbnail bug #7523

Closed
WorldLanguages opened this issue Jun 12, 2024 · 9 comments
Closed

hi-res-thumbnails: cat thumbnail bug #7523

WorldLanguages opened this issue Jun 12, 2024 · 9 comments
Labels
scope: addon Related to one or multiple addons scope: upstream Related to something we depend on (like Scratch, a library, or the browser) source: feedback From the feedback page (https://scratchaddons.com/feedback) or the Discord server status: needs info More information needed type: bug A bug in the addon loader, or in a specific addon

Comments

@WorldLanguages
Copy link
Member

From feedback

image

Apparently wrong project ID:
image

@WorldLanguages WorldLanguages added type: bug A bug in the addon loader, or in a specific addon status: needs info More information needed source: feedback From the feedback page (https://scratchaddons.com/feedback) or the Discord server scope: addon Related to one or multiple addons labels Jun 12, 2024
@ghost
Copy link

ghost commented Jun 12, 2024

can repro on LibreWolf
interestingly enough, console doesnt seem to throw any errors.
kép
However, it does seem like the first four characters of the project ID are in the thumbnail part, but it only seems to happen with this project, which is odd.

@medlans
Copy link

medlans commented Jun 13, 2024

Edit: Nevermind, I couldn't find this project before for some reason, but it does show the thumbnail for me, and I don't have that on.. I thought it might've been a Scratch thing because this has been happening without Scratch Addons in other places too
Browser: Chrome 125
Scratch Addons version: 1.38.2
Operating system: Mac OS 11.3 (Big Sur)

@mxmou
Copy link
Member

mxmou commented Jun 13, 2024

Without the addon, the project ID in the image URL contains a slash:
image

@DNin01
Copy link
Member

DNin01 commented Jun 13, 2024

Those URLs are usually in this form:

https://uploads.scratch.mit.edu/get_image/project/10015857_144x108.png

On the front page right now, they are:

https://uploads.scratch.mit.edu/projects/thumbnails/10015857.png

Did they change recently, or have they always been like this?

With the second URL, you can put one slash anywhere between the digits and the image will still load.

https://uploads.scratch.mit.edu/projects/thumbnails/1/0015857.png
https://uploads.scratch.mit.edu/projects/thumbnails/10/015857.png
https://uploads.scratch.mit.edu/projects/thumbnails/100/15857.png
https://uploads.scratch.mit.edu/projects/thumbnails/1001/5857.png
https://uploads.scratch.mit.edu/projects/thumbnails/10015/857.png
https://uploads.scratch.mit.edu/projects/thumbnails/100158/57.png
https://uploads.scratch.mit.edu/projects/thumbnails/1001585/7.png

I'm not going to question why the front page uses different URLs, but this behavior is very weird. What causes that?

Hopefully this will just be a one-off thing that we don't have to worry about after this project is pushed off the front page, or at least happen infrequently enough to be a tolerable issue.

@DNin01 DNin01 added the scope: upstream Related to something we depend on (like Scratch, a library, or the browser) label Jun 13, 2024
@DNin01
Copy link
Member

DNin01 commented Jun 13, 2024

It looks like we already handle URLs with the projects/thumbnails/ format and convert them to the get_image/ format1, we just never expected to see URLs with a slash between the numbers. This shouldn't even happen in the first place.

Footnotes

  1. https://github.com/ScratchAddons/ScratchAddons/blob/0da7e1c97052f0c02f4f03ff054374163d247fe2/addons/hi-res-thumbnails/userscript.js#L39-L53

@WorldLanguages
Copy link
Member Author

Why does this happen with only one project? I don't get it.

@DNin01
Copy link
Member

DNin01 commented Jun 14, 2024

IMO, I wouldn't bother to solve this unless it happens a few more times.

@WorldLanguages WorldLanguages closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2024
@DNin01
Copy link
Member

DNin01 commented Jul 13, 2024

Even the Scratch REST API documentation has an example response with these weird URLs:
https://github.com/scratchfoundation/scratch-rest-api/wiki/Proxy#example-response

@DNin01
Copy link
Member

DNin01 commented Jul 13, 2024

Potentially related forum topic? https://scratch.mit.edu/discuss/topic/765085/

Alright, I'll stop talking now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: addon Related to one or multiple addons scope: upstream Related to something we depend on (like Scratch, a library, or the browser) source: feedback From the feedback page (https://scratchaddons.com/feedback) or the Discord server status: needs info More information needed type: bug A bug in the addon loader, or in a specific addon
Projects
None yet
Development

No branches or pull requests

4 participants