Automattic / Automattic/jetpack

Failed opening required -- from class-php-autoloader.php

Open
#35,348 5 comments 0 reactions 0 assignees View on GitHub
[Package] Autoloader [Platform] Atomic [Pri] Normal [Status] Priority Review Triggered Bug Triaged
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

### Impacted plugin

Jetpack

### Quick summary

We are seeing on the Atomic platform multiple fatal errors where the Autoloader "Failed opening required" files. The interesting aspect is that the file it fails to find can be non-jetpack plugins.

```
PHP Fatal error: require(): Failed opening required '/srv/htdocs/wp-content/plugins/google-listings-and-ads/src/Proxies/Tracks.php' (include_path='/:.') in /wordpress/plugins/jetpack/13.1-a.9/vendor/jetpack-autoloader/class-php-autoloader.php on line 90
```

```
PHP Fatal error: require(): Failed opening required '/srv/htdocs/wp-content/plugins/jetpack-boost/app/lib/class-connection.php' (include_path='/:.') in /wordpress/plugins/jetpack/13.1-a.9/vendor/jetpack-autoloader/class-php-autoloader.php on line 90
```

```
PHP Fatal error: Uncaught Error: Failed opening required '/srv/htdocs/wp-content/plugins/jetpack-boost/app/lib/minify/Concatenate_JS.php' (include_path='/:.') in /wordpress/plugins/jetpack/13.1-a.9/vendor/jetpack-autoloader/class-php-autoloader.php:90
Stack trace:
#0 /srv/htdocs/wp-content/plugins/jetpack-boost/app/modules/optimizations/minify/class-minify-js.php(36): Automattic\Jetpack\Autoloader\jpf11009ded9fc4592b6a05b61ce272b3c_jetpackⓥ13_1_a_9\al3_0_2\PHP_Autoloader::load_class('Automattic\\Jetp...')
#1 /wordpress/core/6.4.2/wp-includes/class-wp-hook.php(324): Automattic\Jetpack_Boost\Modules\Optimizations\Minify\Minify_JS->init_minify('')
#2 /wordpress/core/6.4.2/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#3 /wordpress/core/6.4.2/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#4 /wordpress/core/6.4.2/wp-settings.php(643): do_action('init')
#5 /srv/htdocs/wp-config.php(83): require_once('/wordpress/core...')
#6 /wordpress/core/6.4.2/wp-load.php(55): require_once('/srv/htdocs/wp-...')
#7 /wordpress/core/6.4.2/wp-blog-header.php(13): require_once('/wordpress/core...')
#8 /wordpress/core/6.4.2/index.php(17): require('/wordpress/core...')
#9 {main}
thrown in /wordpress/plugins/jetpack/13.1-a.9/vendor/jetpack-autoloader/class-php-autoloader.php on line 90
```

### Steps to reproduce

Unknown -> can't reproduce on my test sites spun up on various pools.

### A clear and concise description of what you expected to happen.

No Fatals errors should be triggered by Jetpack code flows.

### What actually happened

_No response_

### Impact

Some (< 50%)

### Available workarounds?

No but the platform is still usable

### Platform (Simple and/or Atomic)

Atomic

### Logs or notes

Errors can be see in at-php-errors logstash name=jetpack

Contributor guide

Open the contributing guide

Research direction

Start with vendor/jetpack-autoloader/class-php-autoloader.php at line 90 and compare the reported failures with the Atomic at-php-errors Logstash entries. Trace the calls from jetpack-boost/app/modules/optimizations/minify/class-minify-js.php and determine why missing files from Jetpack Boost and other plugins reach this loader. Done means the failure is reproduced or explained and the affected code flow no longer triggers these fatal errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.