Moros1138 / PGEtinker

Interactively create an olcPixelGameEngine application from inside your browser!
https://www.pgetinker.com
37 stars 0 forks source link

imgur images when Sharing no longer appears in generated screenshots. Bug in Version: 82b4113 #83

Closed sigonasr2 closed 5 months ago

sigonasr2 commented 5 months ago

Describe the bug Shared screenshots generated using imgur links seem to have become broken. See the two PGEtinker instances I included below and the sample screenshots that were shown to me when clicking Share.

Note that other image hosting sites I tried such as imgbb appear to work fine (using a sample URL like https://i.ibb.co/9qnkzjD/tile.png)

To Reproduce Steps to reproduce the behavior:

  1. Start with default code in PGEtinker.
  2. Replace Line 31 that reads:
    FILE_RESOLVE("https://pit.pgetinker.com/MwpptUlwPhnc.png", "assets/gfx/broken.png");

    with an imgur URL. Example:

    FILE_RESOLVE("https://i.imgur.com/zewMrBN.png", "assets/gfx/broken.png");
  3. Hover over the Sharing button on the toolbar and select the Share option.
  4. Observe that images hosted from imgur appear fine when running in the browser, but do not appear in the screenshot preview.

Expected behavior The screenshot is generated normally.

Additional context

Screenshot for PGEtinker code: https://pgetinker.com/s/27nwcNhhbTJ

Running Image

image

Generated Image

Screenshot for PGEtinker code: https://pgetinker.com/s/RxsW55OAA0l

Running Image

image

Generated Image

Moros1138 commented 5 months ago

Well this is gonna be fun to track down, thanks for the report...

Moros1138 commented 5 months ago

Running:

curl -I https://i.imgur.com/zewMrBN.png

Outputs:

HTTP/2 429 
retry-after: 0
cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
accept-ranges: bytes
date: Tue, 04 Jun 2024 03:15:51 GMT
x-served-by: cache-yul1970040-YUL
x-cache: MISS
x-cache-hits: 0
x-timer: S1717470952.787472,VS0,VE0
strict-transport-security: max-age=300
access-control-allow-methods: GET, OPTIONS
access-control-allow-origin: *
server: cat factory 1.0
content-length: 0

Error 429 is Imgur speak for "you can't download from us" .. so you can "see" it in your browser, but the browser in the screenshot service is blocked. Unfortunately the only solution to this is to say not to use IMGUR for PGEtinker shares...