-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin installer throws Unable to determine the base path during composer update #10
Comments
If plugin-installer/src/Installer.php Lines 324 to 327 in 23ec472
If it can’t find one, you will get the “Unable to determine the Plugin class” error. The base path is then set to the directory that contains the Plugin class: plugin-installer/src/Installer.php Lines 329 to 341 in 23ec472
I’m not really sure what to make of this not working inconsistently. Is there any chance we can get SSH access to an environment where this occurs? If so, please send the connection info to [email protected]. |
I've narrowed it down to lines 335-338 Commenting out the One more option that worked was adding In conclusion a suggested fix would be something like: $attempts = 0;
do {
if ($attempts>0) {
sleep(1);
}
if (file_exists($testClassPath)) {
$basePath = $this->_path($vendorDir, $cwd, dirname($testClassPath));
}
$attempts++;
} while (!$basePath && $attempts <= 2); |
Description
When installing plugins, sometimes composer update/install will abort with the following error:
Or
Steps to reproduce
Unfortunately that seems to happen only on some environments, and even then inconsistently, so it might be difficult to reproduce.
I'm running composer update from a laravel homestead VM.
Linux homestead 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
I have traced the error to plugin-installer/Installer.php:124-131
both
$class
and$basePath
are null, because they are not included in the$extra = $package->getExtra();
response.I have run:
But to no avail.
I have noticed this bug was reported on some individual plugins, but it seems like it's a craft issue, since I'm getting this for multiple plugins.
Additional info
"craftcms/redactor": "2.8.8",
"sebastianlenz/linkfield": "^1.0",
"nystudio107/craft-seomatic": "^3.4"
The text was updated successfully, but these errors were encountered: