• Remember to address to the Bug Tracking guidelines and to follow the instructions in the post ticket template.
  • Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

JS Crash in CHV.fn.viewerLoadImage (reading 'is_360') causes progressive loading to get stuck

Version
4.3.7
Website URL
https://tobacora.com
PHP version
8.2.29
Database driver
MySQL
Database version
8.4.6-6
Web browser
Chrome

user_83d32

Chevereto Member
I'm encountering a frontend JavaScript crash that causes the progressive image loading to permanently freeze on the blurry placeholder.
Many images are not fully loading and remain blurry. After playing with Cloudflare, nothing really changed, but the inspector showed that JS crashed in CHV.fn.viewerLoadImage.
This issue reliably occurs when serving images via external object storage (in my case, Cloudflare R2).

What I believe is happening, but take it with a grain of salt, when TTFB is slightly elevated (e.g., 500ms - 1s for a cold fetch from R2/S3), the viewerLoadImage function fires, but the image object it expects is currently undefined. Because the script attempts to read the is_360 property without first checking whether the parent object actually exists, it throws a fatal TypeError.

Unexpected result:
When the image gets stuck in the blurry state, the browser developer console always outputs the following fatal error:
Uncaught TypeError: Cannot read properties of undefined (reading 'is_360')
at CHV.fn.viewerLoadImage (chevereto-all.min.js...)

Reproduction steps
  1. Configure Chevereto to use external object storage (S3/R2)
  2. Open the image. The UI will stick on the blurry placeholder, and the is_360 TypeError will appear in the console.
  3. Refreshing the page loads the image instantly from cache, bypassing the race condition and loading successfully.


Error log message

Attached is the Inspector screenshot


Thank you for looking into this!
 
Hi, I've been having exactly the same issue for a little while now.

I just checked and I also get the same error in the console when it happens.
I'm also on R2 and as soon as I refresh the page, the image is no longer blurry.
 
I assume that the website is also under Cloudflare? If that's the case, disable any JS optimization at their end and try again.
 
I assume that the website is also under Cloudflare? If that's the case, disable any JS optimization at their end and try again.

Not sure what @mikaa's situation is, but for this project I use a free-tier Cloudflare account, so the only JS that comes to mind in that setup is Rocket Loader, which is off since day one, and Auto-Minify (JS), which is officially deprecated. Cloudflare AI search showed nothing as well.

So, unless I'm missing something, the code the browser is served is the untouched chevereto-all.min.js file.

 
Quick update on my progress. Having the entire site behind Cloudflare's proxy was definitely the root of the conflicts with Chevereto's core file loading. Switching the main domain to DNS-only solved the functionality issues.

Currently, I'm running a hybrid setup: the VPS handles the core application files directly (no proxy), while the R2 bucket images are still served via the Cloudflare proxy for CDN benefits. It's a functional workaround, but not ideal.

Long term, I'm looking to move everything to Bunny's edge storage and delivery to get back under a full CDN/Proxy setup. Just a heads-up for others: Bunny's S3 compatibility is currently in a closed preview, so I'm waiting on support approval before I can finish the migration.

Given Cloudflare's market share, it would make sense for Chevereto to continue reviewing its compatibility with Cloudflare's proxy settings. But that's just my opinion.
 
Back
Top