Problem/Motivation
Composer 2.2 introduced a new plugin security setting. Starting July 1, 2022, composer stopped executing plugins that weren't allowed but only printed a warning. Composer 2.3.9 was updated to throw an error if there are unallowed plugins. This means builds are failing with:
SIMPLYEST_STAGE_DOWNLOAD
62cf484bdbc27ce0f901c097# /bin/sh -c composer global require szeidler/composer-patches-cli:~1.0
Changed current directory to /root/.composer
./composer.json has been created
Running composer update szeidler/composer-patches-cli
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
- Locking cweagans/composer-patches (1.7.2)
- Locking szeidler/composer-patches-cli (1.0.6)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
- Downloading cweagans/composer-patches (1.7.2)
- Downloading szeidler/composer-patches-cli (1.0.6)
0/2 [>---------------------------] 0%
2/2 [============================] 100%
In PluginManager.php line 769:
cweagans/composer-patches contains a Composer plugin which is blocked by yo
ur allow-plugins config. You may add it to the list if you consider it safe
.
You can run "composer config --no-plugins allow-plugins.cweagans/composer-p
atches [true|false]" to enable it (true) or disable it explicitly and suppr
ess this exception (false)
See https://getcomposer.org/allow-plugins
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]
Command Failed (Tugboat Error 1064): Exit code (1)
Steps to reproduce
Go to https://simplytest.me/
Try to launch a project sandbox (eg with the fontawesome module) and see that it fails
Proposed resolution
Update the builds so that installed composer plugins are marked as allowed.
Remaining tasks
Needs testing on more Drupal versions.
Comments
Comment #2
cainaruDitto, I’m getting the same error as well.
Comment #3
thhafner commentedsame errors here.
Comment #4
capysara commentedLooks like it's new composer requirements, see https://magento.stackexchange.com/questions/352353/why-composer-install-.... Is it as simple as adding composer-patches to the allow-plugins?
Comment #5
djschoone commentedMy colleague Lara informed me that it is working again. Just tested myself with the Umami demo and it works again!
Comment #6
capysara commentedI see that the Umami demo build works, but I'm not able to apply patches.
I tried
https://www.drupal.org/project/drupal/issues/3268983 with https://www.drupal.org/files/issues/2022-07-12/core-3268983-43-10.x.patch
and
https://www.drupal.org/project/drupal/issues/2350939 with https://www.drupal.org/files/issues/2022-06-23/2350939-228.patch
and the build ended in an error both times:
Comment #7
byrond commentedI didn't notice this existing issue before I created a duplicate #3295760: Builds are failing due to "allowed plugins" and submitted a patch over there.
Comment #9
rocketeerbkw commentedI started an issue fork to fix the issues. I have one commit that allows the composer-patches related plugins, which fixes the errors described here and in other issues. I think this would fix the majority of users problems.
I think there are other potential problems I'm not able to test so I'm not willing to say this is ready yet:
Comment #10
alina.basarabeanu commentedI'm getting the same error when trying to test a contrib module patch
Comment #11
jonathan_hunt commentedI'm getting this error when trying to launch Drupal 9.3.18 with Admin Toolbar module
Comment #12
maxstarkenburgAlso got this issue just now, trying to make a build with the
link_targetmodule, all other options default: core 9.4.4, standard profile, manual installation unchecked, and probably notably: no patches.Also tried other things, like using slightly older core, trying Umami or minimal, trying manual installation, even trying to apply @rocketeerbkw's patch itself (probably too incorrectly meta, haha ... I suppose it's diffing against something simplytest runs on, not that it's trying to install), but no dice.
The one-click Umami (without
link_target) still worked, but then I didn't have the module I was trying to test. (Before simplytest.me, I was originally trying from a throwaway Pantheon instance in SFTP mode, but that was giving me fatal memory size errors when just trying to save a Form Display edit, so don't know if that's related to link_target, or today's Pantheon service degradations, or what; I just know everything's broken today, haha).Comment #13
steinmb commentedAlso see this. Basic core 9.4.5 installation. No 3-part modules and other custom settings.
Comment #14
gnugetThe same is happening with Drupal Commerce.
Comment #15
bhanu951 commentedBumping Issue to Critical as we can no longer spin-up new instance on simplytest.me
Comment #18
nerdsteinMarking as needs review
Comment #19
jonathan_hunt commentedI no longer get the error regarding allowed plugins but the build process seems to stop without redirecting to the login page of the built container.
https://simplytest.me/tugboat/progress/62f97607a476796b1cdc50b4/62f97607...
Last lines of build process:
Comment #20
mglaman+1 to MR
Comment #21
maxstarkenburgJust tried again today (FWIW this time trying to include linked_field and linkicon projects) and I'm still getting failed builds regarding allow-plugins and composer-patches, but I don't know if that's because the MR is not yet live and to use it I would need to run things from a different location or something?
Comment #22
jonathan_hunt commentedFWIW, still getting failed builds due to allowed plugins, in this case trying Feeds module on core 9.3.21.
Comment #23
cainaruI’m still getting the same error too when trying to test a contrib module (viewfield). The error is below:
Comment #24
nerdsteinThis is fixed per the work in #3308715