Automattic / jetpack

Security, performance, marketing, and design tools — Jetpack is made by WordPress experts to make WP sites safer and faster, and help you grow your traffic.
https://jetpack.com/
Other
1.59k stars 799 forks source link

Fatal error: Uncaught Error: Class 'IXR_Client' not found #16466

Closed devinfd closed 4 years ago

devinfd commented 4 years ago

Just putting this here for anybodies future reference.

Steps to reproduce the issue

  1. Go to 'http://mysite.com/wp-admin/admin.php?page=jetpack#/dashboard'
  2. See Fatal error: Uncaught Error: Class 'IXR_Client' not found

What I expected

Not to get a fatal error

What happened instead

A fatal error

Resolution

I had OPCache enabled. Disabling it resolved the fatal error.

jeherve commented 4 years ago

Also reported here, with a backtrace: https://wordpress.org/support/topic/8-7-update-caused-site-crash/

PHP Fatal error: Uncaught Error: Class ‘IXR_Client’ not found in /home/lamp/wordpress/plugins/jetpack/vendor/automattic/jetpack-connection/legacy/class-jetpack-ixr-client.php:17
Stack trace:
#0 /home/lamp/wordpress/plugins/jetpack/vendor/autoload_packages.php(168): require_once()
#1 [internal function]: Automattic\Jetpack\Autoloader\autoloader(‘Jetpack_IXR_Cli…’)
#2 [internal function]: spl_autoload_call(‘Jetpack_IXR_Cli…’)
#3 /home/lamp/wordpress/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-actions.php(322): class_exists(‘\\Jetpack_IXR_Cl…’)
#4 /home/lamp/wordpress/core/wp5.4/wp-includes/class-wp-hook.php(287): Automattic\Jetpack\Sync\Actions::send_data(Array, ‘deflate-json-ar…’, 1594395441.4734, ‘sync’, 0.012815952301025, 0.028102874755859, 1
034, ‘5f088b3169a0a’)
#5 /home/lamp/wordpress/core/wp5.4/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
#6 /home/lamp/wordpress/plugins/jetpack/vendor/automattic/jetpack-sync/src/class-sender.php(481): apply_filters(‘jetpack_sync_se…’, Array, ‘de in /home/lamp/wordpress/plugins/jetpack/vendor/automattic/jetp
ack-connection/legacy/class-jetpack-ixr-client.php on line 17
jeherve commented 4 years ago

Not sure how we can get to that point yet, especially with the fallback we had added here: https://github.com/Automattic/jetpack/blob/e783446cabd8214aaea261fa5176018b32d9476f/packages/connection/legacy/load-ixr.php

@devinfd Does this happen all the time on your site, as long as OPCache is enabled?

kraftbj commented 4 years ago

Hopefully WordPress 5.5 should help with this. It adds OPCache invalidation of plugin files upon an update: https://core.trac.wordpress.org/changeset/48160

devinfd commented 4 years ago

@jeherve no. After restarting OPCache the problem has not retuned.

jeherve commented 4 years ago

Thanks for the quick reply. I'm going to put this on hold and watch out for more reports of this once WordPress 5.5 is released.

jeherve commented 4 years ago

Closing this for now because of the lack of activity on this. We can always reopen in the future if needed.