PHP Fatal error: Uncaught Error: Class 'Whoops\Util\Misc' not found in /kirby/vendor/filp/whoops/src/Whoops/Run.php:302
#0 /kirby/vendor/filp/whoops/src/Whoops/Run.php(353): Whoops\Run->handleException(Object(Whoops\Exception\ErrorException))
#1 /kirby/vendor/composer/ClassLoader.php(444): Whoops\Run->handleError(2, 'include(/home/p...', '/home/xyz/p...', 444, Array)
#2 /kirby/vendor/composer/ClassLoader.php(444): include()
#3 /kirby/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/home/xyz/p...')
#5 /kirby/vendor/filp/whoops/src/Whoops/Run.php(375): spl_autoload_call('Whoops\\Util\\Mis...')
in /kirby/vendor/filp/whoops/src/Whoops/Run.php on line 302
The config of the site has the debug mode turned off:
return [
'debug' => false
];
What might cause this error and why is whoops called at all in live mode?
Does this error only appear once or regularly? Just recently or a while ago? Maybe the class was called while the upload to the remove server was not complete yet.
We only have restricted access to the logs but I saw multiple occurences yesterday, two or three hours before we started pushing updates. But I’ll have to check if I’m mistaken by different timezones.
I’m still interested why Whoops was called at all. The panel might be an idea but still …
No, as I did pause my Kirby 3 projects due to lack of spare time (just reading the forum, Github and some tutorials to build up knowledge and refresh my memory). I always wanna clear up those things before I face it in productive systems causing issues.
Sorry to be late at the “party”. Whoops is also called in live mode. It’s not only there to show the debugger when debug mode is enabled, but handles and intercepts all kinds of errors. The debugger is just one nice feature of Whoops, but it’s also great at reacting to errors in general and handle them gracefully. Kirby’s “white screen of death” with the fatal error message is also displayed by whoops and all API requests with issues also use Whoops to show a json-formatted error response.
This still doesn’t explain why the Misc class in Whoops is not properly loaded. It could be an internal Whoops bug. I have to investigate. Could you open a ticket for it?
We found out today that the site in question was under heavy load from Chinese bots which caused timeouts on the server. So, right now, I’m sure this was a server issue and not a Kirby problem. Especially since I now know that it’s correct that Whoops is used in live mode.
So I don’t think it’s necessary to create an issue in this matter.
Is that okay with you, Bastian?
Hm, it’s still weird why the class could not be loaded to be honest. Let’s create the ticket anyway and maybe you can add a note about the DDOS attack to it.