I accessed my website today and the following error was displayed on a white screen.
Fatal error: Uncaught Error: Class "Symfony\Component\ErrorHandler\ThrowableUtils" not found in /home/customer/www/mydomain.com/public_html/libraries/vendor/symfony/error-handler/ErrorHandler.php:563 Stack trace: #0 [internal function]: Symfony\Component\ErrorHandler\ErrorHandler->handleException(Object(Error)) #1 {main} thrown in /home/customer/www/mydomain.com/public_html/libraries/vendor/symfony/error-handler/ErrorHandler.php on line 563
No changes have been made to my site, and I haven't updated anything. It appears to be intermittent, I've checked and it's now online again, but I've made no changes. Not sure why it's not working one minute, then suddenyl everything appears ok without any changes made.
I am able to login to the Joomla admin area ok.
When I check the administrator/logs/everything.php the most recent entry is below. I'm not sure if this is relevant?
2023-02-06T12:28:53+00:00 CRITICAL 207.46.13.160 error Uncaught Throwable of type Joomla\CMS\Router\Exception\RouteNotFoundException thrown with message "Page not found". Stack trace: #0 [ROOT]/libraries/src/Application/SiteApplication.php(736): Joomla\CMS\Router\Router->parse(Object(Joomla\CMS\Uri\Uri), true) #1 [ROOT]/libraries/src/Application/SiteApplication.php(224): Joomla\CMS\Application\SiteApplication->route() #2 [ROOT]/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\SiteApplication->doExecute() #3 [ROOT]/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute() #4 [ROOT]/index.php(32): require_once('/home/customer/...') #5 {main}
Joomla 4.2.5 and PHP 8.0.27
My webhost (siteground) have confirmed everything looks ok at their end, and suggested a restore from backup.
I'm reluctant to upgrade anything until I understand what's going on.
Any ideas?
Labels |
Added:
No Code Attached Yet
|
Yes, there is a file in libraries/vendor/symfony/error-handler/ThrowableUtils.php
The contents are below.
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\ErrorHandler;
use Symfony\Component\ErrorHandler\Exception\SilencedErrorContext;
/**
* @internal
*/
class ThrowableUtils
{
/**
* @param SilencedErrorContext|\Throwable
*/
public static function getSeverity($throwable): int
{
if ($throwable instanceof \ErrorException || $throwable instanceof SilencedErrorContext) {
return $throwable->getSeverity();
}
if ($throwable instanceof \ParseError) {
return \E_PARSE;
}
if ($throwable instanceof \TypeError) {
return \E_RECOVERABLE_ERROR;
}
return \E_ERROR;
}
}
I haven't experienced this issue in a while, but I'd like to figure out why it happened if possible.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-02-19 05:29:45 |
Closed_By | ⇒ | joomdonation |
I'm afraid of something is broken in libraries
of your Joomla installation makes that class not auto-loadable. If you really want to fix this issue, the best thing you can do in this case is updating your site to Joomla 4.2.8, then follow the instructions at https://ltheme.com/reinstall-core-files-in-joomla-4/ to re-install Joomla core files. That should address your issue
As this is something special with your Joomla installation, and not with Joomla core, I'm closing the issue. If you still need more help, try to use Joomla forum .
The same thing is happening on my site today. I have updated to 4.2.8 and reinstalled the core files. Same error.
Any ideas?
@qublibjohnny Sorry, I don't have any other idea. For this special case, I'm afraid of you will need to find a developer to help you to check and solve it
On my local Joomla installation, I even added some code to check to make sure that class Symfony\Component\ErrorHandler\ThrowableUtils
is available and autoloadable, so must be something special on your site somehow.
@joomdonation Is this likely to be caused by something on my home page? A third party plugin?
I should add, this is only affecting my home page - all other pages are accessible.
I've also noticed that the http:// (non-secure) version of my home page loads ok.
Fixed. I had to enable 'force https' at the web server (siteground). The Joomla error message didn't help much though.
I'm seeing the same problem when attempting to access the Events Booking extension - Configuration. I don't go there often so I don't know when this problem may have begun. The problem existed with Events Booking v4.4.1 and and when I installed v4.4.2 nothing got any better. I already had "Force HTTPS" set for this domain in Siteground's admin dashboard. And it is also set at the JOOMLA Global Configuration level. SO that is clearly NOT the solution.
This is not going to be easy for somebody to figure out and fix because it is so difficult to reproduce - but it seems likely that it will take some bodies on the Joomla development team to do that.
The exact error I saw was
Fatal error: Uncaught Error: Class "Symfony\Component\ErrorHandler\ThrowableUtils" not found in /home/customer/www/myhost.org/public_html/libraries/vendor/symfony/error-handler/ErrorHandler.php:563 Stack trace: #0 [internal function]: Symfony\Component\ErrorHandler\ErrorHandler->handleException(Object(TypeError)) #1 {main} thrown in /home/customer/www/myhost.org/public_html/libraries/vendor/symfony/error-handler/ErrorHandler.php on line 563
@davidascherG The error from Configuration page of Events Booking is very likely comes from editor you are using. Or in some cases, causes by outdated Joomla language packages (sometime, after updating from Joomla 3 to Joomla 4, customers forgot to update language package and it causes fatal error in Code Mirror editor if I remember correctly, seen that few times during my support life)
If the issue could be seen on your site, could you please submit a support ticket at https://joomdonation.com ? I will try to take a look at it to see why there is fatal error with that class not found like that and hopefully, could come up with a solution.
@davidascherG I don't have Events Booking installed, although that is the exact same error I was seeing on my home page. Strangely, all my other pages were accessible (e.g. /about, /contact)
The only @joomdonation extension I have installed is OSMap (free).
Can this issue be re-opened as it's clearly a Joomla bug?
The only @joomdonation extension I have installed is OSMap (free)
That's not our extension :)
Just for information, I spent sometime today to check the site from @davidascherG but could not figure out the reasons yet. The php file is there, I tried to use class_exist function to check and it returns true when the code is run outside the file ErrorHandler but inside that ErrorHandler class, it return false for some reasons.
Really don't know what to do next, so strange. One thing is the site I checked is using PHP 8.0.x, maybe you can try to use a different PHP version like PHP 8.1 to see if the error still happens?
@joomdonation Apologies, I thought it was.
Just to clarify, my issue appears to be fixed, by forcing https on siteground. But, this still doesn't explain why it was happening, or the vague and misleading error message that I included above.
@davidascherG Appears to be seeing the exact same error, although seems to think it's related to Events Booking - an extension I don't have installed.
My site is running PHP 8.0.28
I could upgrade to 8.1, but if it resolves the issue, it still doesn't explain the cause. Wouldn't it be best if we could find the Joomla bug and resolve?
Just to clarify, my issue appears to be fixed, by forcing https on siteground. But, this still doesn't explain why it was happening, or the vague and misleading error message that I included above
I'm unsure if the issue is really fixed on your site. You just don't see it now because force https somehow, prevent the error from happening, so the error/exception is not caught/handled by the error handle anymore. So the issue, from what I can see, is just hidden on your site now, not really fixed.
I could upgrade to 8.1, but if it resolves the issue, it still doesn't explain the cause. Wouldn't it be best if we could find the Joomla bug and resolve?
I wish it is easy like that. If the issue is easy to re-procedure, of course Joomla can fix it. But it seems happens in some special conditions which is very hard to see, especially with a fresh Joomla installation. I even tried to restore the site on my local computer, but no error like that anymore. Everything is working well here.
Technical, the class is there, it is loaded OK everywhere, not just inside ErrorHandler
is something difficult to understand :(.
I'm unsure if the issue is really fixed on your site. You just don't see it now because force https somehow, prevent the error from happening, so the error/exception is not caught/handled by the error handle anymore. So the issue, from what I can see, is just hidden on your site now, not really fixed.
So, do you imagine I will see this error again at some stage?
How does Joomla normally handle issues such as this? I would have thought there was some sort of additional logging, or test I could run to help troubleshoot the issue?
I'd imagine if unresolved, this will affect many other users of Joomla.
I don't know how to solve this issue yet. I will wait for @davidascherG to see if he could update to use PHP 8.1 to see if it solves the issue first and report the result back
As I said, this happens in very special conditions, otherwise, we would have many reports here already. I will keep you updated.
@joomdonation Thanks
Since we've established it is an issue, can we re-open this?
Yes. I will re-open it. But I'm unsure if we could come up with a solution. Without being able to re-procedure the issue on a fresh Joomla installation in a local environment, it will be hard to check, find the root reason of the error and got it sorted.
Status | Closed | ⇒ | New |
Closed_Date | 2023-02-19 05:29:45 | ⇒ | |
Closed_By | joomdonation | ⇒ |
I have tried upgrading to PHP 8.1 - that was no help at all. I tried updating to PHP 8.2 - that at least produced the error on a Joomla error page that says something like "Sorry there was a problem we could not recover from" - which is not terribly useful. So I am back at PHP 8.0.28.
The problem comes and goes for no apparent reason - at least nothing apparent to me. At this point, my site is completely screwed because suddenly I cannot access the home page - I get a white page (with no Joomla 'chrome') that says:
Fatal error: Uncaught Error: Class "Symfony\Component\ErrorHandler\ThrowableUtils" not found in /home/customer/www/peacecoalition.org/public_html/libraries/vendor/symfony/error-handler/ErrorHandler.php:563 Stack trace: #0 [internal function]: Symfony\Component\ErrorHandler\ErrorHandler->handleException(Object(Error)) #1 {main} thrown in /home/customer/www/peacecoalition.org/public_html/libraries/vendor/symfony/error-handler/ErrorHandler.php on line 563
However, if instead of going to https://peacecoalition.org I go to https://peacecoaltion.org/**home**, the I CAN access the home page. At this point, however, I am unable to make any of the techniques I thought I knew work to make requests going to https://peacecoalition.org get redirected to https://peacecoalition.org/home.
To find out what cause error that cause this error,
Edit libraries/vendor/symfony/error-handler/ErrorHandler.php lina 563
before
$type = ThrowableUtils::getSeverity($exception);`
add:
var_dump($exception->getMessage());
var_dump($exception->getFile() . ':' . $exception->getLine());
var_dump($exception->getTrace());
exit;
$type = ThrowableUtils::getSeverity($exception);
You will get a message with original error, and full trace.
Copy the whole message, and then revert this changes.
I have made the modification you suggested but nothing at all changed... except it now appears that the home page can no longer be reached at https://peacecoalition.org/home but it CAN be reached at https://peacecoalition.org/home.html.
This behavior is completely bizarre and seems to be in contradiction to everything that I've learned about websites and Joomla over the past almost 20 years. I don't understand what is happening - at all.
Strange enough, as of today, everything on @davidascherG 's website is working as expected without us doing anything :D .
@qublibjohnny As you also use Siteground hosting (someone mentioned that, I'm unsure if it is right), maybe you should check it again. Maybe it is gone for you, too :D.
@davidascherG has your site started working since your forced https on Siteground ?
My site started working as expected when I enabled this. Before this, I was able to access the http version of my site, but the https version produced the error.
In any event, forcing https on Siteground appears to have resolved the issue.
Does anybody know why? Does the Joomla error message need to be changed/reviewed - as it stands, it's not a very useful indication of what the issue is.
Does the Joomla error message need to be changed/reviewed - as it stands, it's not a very useful indication of what the issue is.
Normally, that ugly error won't be displayed. A more friendly message tells you the reason of the error will be displayed. That ugly fatal error message is displayed in this case because the class Symfony\Component\ErrorHandler\ThrowableUtils
could not be found for unknown reason (the file is there, the class is there, so under normal condition, it must be found, and no fatal error). That's the reason I said this is a strange issue.
In case @davidascherG 's website, suddenly it works. We did not really do anything.
I was not sure exactly what you meant :/ forcing https on site ground. I thought this was something that Theis support folks bad to to since the switch to force https on the site was already set. I found, just to male it more interesting, that not only did the problem occur on different pages each time i visited the site or the backend, it would appear sometimes when accessing a specific page one time and then not appear the next time i went to the same page. It was entirely bizarre.
The Situation was made more bizarre by the fact that the behavior was more consistent when using the Opera browser (no laughing, please). Ali seemed good with Opera.
And with Firefox, all was much worse. Once thaterror occurred on one page, it occurred on every page.
Finally, using Chrome on my Android tablet showed almost no errors on either the fronte or backend.
I was close to deciding to find another line of works like leasing tours of the sewers of Prague, or becoming a circus clown, when i decided to try turning off the siteground switch to force https and then turn it back on.
Since then, things appear to be working properly on ali the browsers i've tested on ali the platforms ive tested (no Apple).
I dunno show long this will continue to work correctly, since none of this makes any sense. Ad all.
One more thing. Prior to "fixing" this problem, of i tried to access the site backend From Chrome on Windows 10, i would get either a blank page or a page rating gateway error - error 504. Of i refreshed a lot of times, eventually, i'd get to log on to the backend. Sometimes i'd get another blank page and sometimes i'd get to the dashboard. If i refreshed the black page a bunch of times, i would eventually get to the dashboard. Only on Windows ranking Chrome.
Since jiggling the siteground force https switch, thing seem to be ok...
I am also still concerned that the modification suggested :/ @Fedik did nothing at all to change the info displayed. It weeks that there must be some line of cache ad some level that is not turned off or flushed. I thought i knew where they all are in siteground and joomla bug i must have overlooked something.
Something weird is clearly happening, and since so far all the reports seem to come from sites hosted on SG, ... Need i say more?
@davidascherG Just to confirm, when you enabled the setting 'Force HTTPS' on the siteground web host, everything has been working since?
If so, I can confirm the same on my site. So far.
@joomdonation What do you suggest regarding the error?
from the description it is related to their cache system
They probably had som fancy configuration for opcache, eg huge time etc.
in reply to @qublibjohnny - Nope. I have to repeatedly toggle the stupid setting of HTTP Force off and on. Sometimes the error clears simply by refreshing the page a few dozen times. If somebody told me what I am reporting I would be extremely skeptical.
Siteground knows nuthin'. Everything 'looks okay' at their end.
I took a backup of the live site and restored it to a new test domain using a new MySQL database in a freshly created subdomain. Things appeared to work - i.e. I could access all the pages on the site I dared to try without encountering the Fatal Error report. I focussed primarily on pages relating to an upcoming event but also checked some pages that have failed to load with that Fatal Error report appearing (in a white page with no Joomla Chrome). All seemed to be working. I then cleaned out the db used by the domain as well as the file system used by the domain. I took a backup of the test site and very carefully restored it to the live site. This was all done at about 9:30-10:00PM ET (last night). This morning, so far, the pages that we need to be working right now seem to be working. I've seen no Fatal Error messages, blank pages, or other oddities.
I can only guess that either Siteground found and fixed something that they are too embarrassed or modest to admit or somehow I was sharing a single database between the live site and one of my earlier test domains - which is okay - but I might have used the same table name prefix for both test and live site. At this point, it would be very difficult if not impossible to determine what the previous situation was as I have cleaned out the content of old the test sites. Of course, this is a pretty basic dunderhead thing to do, but I find that nobody is incapable of dunderheadedness from time time. All we can do it concentrate on avoiding such errors. I'm still a bit afraid to take full breaths lest the problems come roaring back, but so far so good.
The behavior of the error reporting code still appears to be a problem. I am unable to explain at all why modifying the code as as @Fedik suggested above didn't result in any changes as far as how the errors were reports nor anything else. I think some investigation into how that night have occurred in still warranted as it is clear that something is amiss there and if it is not a problem for most sites today, it may become a problem for most (or all) sites as Joomla continues to move forward.
I opened this case originally because I was seeing an error which didn't provide me with any valuable information. I wasn't able to troubleshoot the issue based on the error.
My site is now working again, after forcing HTTPS on siteground. I can only assume this has resolved my issue, I still don't know why. I'm confident I could reproduce the issue on siteground if I disabled force HTTPS
Should the Joomla error I posted originally contain more useful information?
@qublibjohnny Under normal conditions, there would be a friendly message tell you the reason of the error. However, in this case, a PHP class could not be loaded (although it is there) and that's why there is ugly fatal error message displayed. It is an issue from the server where your site is hosted, it could not load an existing php class, so Joomla could not do anything better.
In short, it's a server problem, not Joomla problem.
are you suggesting the class is supppposed to be loaded by something on the server?? it seems to me the 'missing' class is a Joomla defined class, defined in the file named in the error message. How is that a siteground problem?
Because flicking ssl in the hosting platform fixes it (which doesn’t involve touching joomla at all). And also because as above changing the file had no impact which implies the server is caching the files (but could be the output we suppose) somewhere too. The fact it also magically fixes itself at times also points to it being caching because the joomla file system hasn’t changed.
Of course none of this is conclusive proof. But when it’s all on the same hosting provider and no others it certainly points that way
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-03-25 14:19:08 |
Closed_By | ⇒ | joomdonation |
Closing this because there is nothing we can do in Joomla core for this kind of issue.
hey guys, I have the same issue using Siteground as well and I did what @Fedik mentioned above and here is the result I get after that:
string(66) "Call to undefined method Joomla\CMS\Event\GenericEvent::getError()" string(92) "/home/customer/www/website.com/public_html/libraries/src/Application/CMSApplication.php:323" array(2) { [0]=> array(6) { ["file"]=> string(60) "/home/customer/www/website.com/public_html/includes/app.php" ["line"]=> int(61) ["function"]=> string(7) "execute" ["class"]=> string(37) "Joomla\CMS\Application\CMSApplication" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [1]=> array(4) { ["file"]=> string(53) "/home/customer/www/website.com/public_html/index.php" ["line"]=> int(32) ["args"]=> array(1) { [0]=> string(60) "/home/customer/www/website.com/public_html/includes/app.php" } ["function"]=> string(12) "require_once" } }
I already had forced https, disabled and enabled and did not solve the issue. The issue happens after installing SP Pagebuilder, I have PHP 8.1 and Joomla 4.2.9, I already cleared Cache and disabled and enabled the component without sucess on this issue.
hey guys, I have the same issue using Siteground as well and I did what @Fedik mentioned above and here is the result I get after that: string(66) "Call to undefined method Joomla\CMS\Event\GenericEvent::getError()" string(92) "/home/customer/www/website.com/public_html/libraries/src/Application/CMSApplication.php:323" array(2) { [0]=> array(6) { ["file"]=> string(60) "/home/customer/www/website.com/public_html/includes/app.php" ["line"]=> int(61) ["function"]=> string(7) "execute" ["class"]=> string(37) "Joomla\CMS\Application\CMSApplication" ["type"]=> string(2) "->" ["args"]=> array(0) { } } [1]=> array(4) { ["file"]=> string(53) "/home/customer/www/website.com/public_html/index.php" ["line"]=> int(32) ["args"]=> array(1) { [0]=> string(60) "/home/customer/www/website.com/public_html/includes/app.php" } ["function"]=> string(12) "require_once" } }
I already had forced https, disabled and enabled and did not solve the issue. The issue happens after installing SP Pagebuilder, I have PHP 8.1 and Joomla 4.2.9, I already cleared Cache and disabled and enabled the component without sucess on this issue.
According to our AI assistant =D : It looks like the getError() method is being called on a GenericEvent object, but that method does not exist for that object.
It is possible that this error is related to a conflict with a Joomla extension or plugin that is trying to use the getError() method. You could try disabling any recently installed extensions or plugins to see if that resolves the issue.
I found this same error in my everything.php file when trying to figure out why my Joomla Update wasn't working. Every time I tried to update Joomla, it would just fail but with no specific error. Turns out this was caused by directories with the wrong permissions. On my server, the directories run as 755, but many were set to 777 after I made a copy of my site using Akeeba Backup moved it to a different subdomain. Once I corrected the permissions, I no longer received the error and my Joomla Update actually works now.
Just thought I would share in case this is helpful for anyone else.
Oops, sorry, turns out the Joomla Update issue and directory permissions weren't connect to the error, which is still showing in the log file but doesn't seem to cause any issues on the site at the moment.
I'm experiencing the very same issue with all my Joomla sites hosted on SiteGround.
Has anyone figured out a solution for this ?
@daycounts I contacted SG and they had to force https at their end (somehow?) which seems to have worked. I had already enabled this setting in Joomla but it seems they also had to do it.
You should ask SG. Hope this helps.
So I had the chance to catch the error and SiteGround support in the mean time and they discovered the issue might be completely different from the "Force https" but instead due to a limitation of number of nodes (files) open on their server
PHP Warning: include(/home/customer/www/uniforlocal4270.ca/public_html/libraries/vendor/symfony/error-handler/ThrowableUtils.php): Failed to open stream: Too many open files in /home/customer/www/uniforlocal4270.ca/public_html/libraries/vendor/composer/ClassLoader.php
It appears that your application is trying to open more than 5060 files when your website is being browsed causing this issue.
I have contacted our system administrators and they have increased the number of maximum allowed open files to 10000.
I'm not surprised by this. We know Joomla 4 loads a ton of files...
The log, unfortunately is not relevant. That's just symptomatic of someone trying to access the Joomla api from a web browser and failing to match a route so won't be related to your administration access.
Your main error is unfortunately a fatal error thrown when trying to run the main error handler. Can you check there is a file in libraries/vendor/symfony/error-handler/ThrowableUtils.php