question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

critical error on this website: An error of type E_COMPILE_ERROR was caused

See original GitHub issue

Bug Description

A support topic was opened in relation to users encountering a critical WordPress error, with 2 users reporting the error coming from Site Kit.

One user has encountered this on all the sites where he has Site Kit active on. Users are unable to access their site, I suspect both front end and admin panel. Once Site Kit is re-activated after “restoring” their site via a recovery link the same issue occurs.

The error appears as below: An error of type E_COMPILE_ERROR was caused in line 34 of the file /var/www/wp-content/plugins/google-site-kit/includes/loader.php. Error message: require_once(): Failed opening required ‘/var/www/wp-content/plugins/google-site-kit/third-party/vendor/composer/InstalledVersions.php’ (include_path=’.:/opt/remi/php73/root/usr/share/pear:/opt/remi/php73/root/usr/share/php:/usr/share/pear:/usr/share/php’)

image

image

There have been other mentions of this on social media. awaiting further insights, unreproducible in support so far.

Support Topic(s): https://wordpress.org/support/topic/error-there-has-been-a-critical-error-on-this-website-3/ - Open - no SH info

Additional Context

  • Site Kit 1.38.0
  • Possible multiple users impacted
  • No obvious cause looking at the front end of one users site. There are ads related console errors

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • Site Kit should not try to autoload classes which are not part of the Site Kit build ZIP.

Implementation Brief

Test Coverage

  • N/A

Visual Regression Changes

  • N/A

QA Brief

  • Verify that the autoloader used in the SK plugin doesn’t include classes that start not from the Google\Site_Kit namespace.

Changelog entry

  • Fix bug where other plugins using an unprefixed version of Composer could cause Site Kit to trigger a fatal error.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
felixarntzcommented, Aug 11, 2021

@eugene-manuilov @bethanylang If this is not caused by some odd edge-case situation, definitely a hot fix candidate. At a minimum, we’d need to include it in 1.39.0.

0reactions
felixarntzcommented, Aug 11, 2021

QA: Eng ✅

Due to the extra logic it’s no longer possible for a non-Site Kit class to be accidentally picked up by Site Kit’s autoloader. Only classes starting in Google\Site_Kit are considered.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the "There Has Been a Critical Error on Your ...
Here we'll go over a variety of ways to troubleshoot this issue and get your site up and running again fast. Table of...
Read more >
We are experiencing a critical error on our website - WPML
There has been a critical error on this website. ... An error of type E_COMPILE_ERROR was caused in line 5 of the file...
Read more >
There has been a critical error on this website. - WordPress.org
An error of type E_ERROR was caused in line 190 of the file /var/www/wp-content/plugins/woocommerce/includes/class-wc-customer.php. Error message: Uncaught ...
Read more >
There has been a critical error on your website - Toolset
An error of type E_COMPILE_ERROR was caused in line 10 of the file /www/wp-content/plugins/types/application/bootstrap.php.
Read more >
There Has Been a Critical Error on This Website: 5 Quick Fixes
A critical error can be frustrating. Learn how to fix "There has been a critical error on your website" error using five different...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found