Shazwazza / Smidge

A lightweight runtime CSS/JavaScript file minification, combination, compression & management library for ASP.Net Core
MIT License
364 stars 47 forks source link

Random 500 errors. #213

Open jasont0101 opened 1 month ago

jasont0101 commented 1 month ago

Ok, I totally understand that is a horrible title for an issue, sorry. I am struggling to understand an issue that we have seen on multiple Umbraco 13 sites that use Smidge. What is so difficult is the issue is not clear and hard to reproduce, nothing in logs that helps. Sites are running on VM's. Everything is fine then out of the blue the bundle starts throwing a 500 error. Seems to happen with CSS bundle mostly. With no changes to the CSS files the bundle just starts to fails. Recycling the app pool fixes the issue. I think it might have something to do with the Smidge cache files. I have tried to removing all config from the app settings, but still has issue. I also think I have a back configuration but not sure what it back with it. We are just using what is in the documentation. We are creating bundles in view and not in the program.cs or startup.cs, similar to how it was done with client dependency. Not sure if you can provided and help here, I know this is not much to go on.

Shazwazza commented 1 month ago

Bundles created in views and trying to make this work like CDF will have problems which are the same problems CDF has/had. Bundles should be created up-front and then used. If you use view based declarations like in CDF, this will heavily depend on when your views are executed and in some cases you cannot control this.

I think there's been recent fixes for a few things so be sure to run the latest version and I'll check if there's any pending fixes that haven't been published yet.

See

jasont0101 commented 1 month ago

Thanks! Seriously, that is very helpful. :-)