trellis up and trellis provision development hang on the wordpress-install : Setup composer authentications task.
trellis up --debug yields no new information; the process hangs and I see nothing useful in the output that follows ctrl c.
This same project is indeed provisionable (in Dev, thus far), when not using Trellis CLI (vagrant up, vagrant provision, etc).
Background:
Project originally built on Trellis 1.8.0 and Bedrock 1.15.4without Trellis CLI (using the old manual process)
Trellis CLI enabled later on the original Dev machine (macOS Monterey) and ran as expected (no errors, warnings, etc)
Monterey machine crashed, and I’m now attempting to rebuild on an older Mac running Catalina (trellis init and trellis init --force complete as expected without any error or warning)
Vagrant = 2.2.18
VirtualBox = 6.1.36
Strictly speaking, this is not a critical break (as far as I know at this time), because I can work. Still, I’d love to get this project working with Trellis CLI again.
I’m using composer_authentications to enable pulling premium plugins from our own Composer server (SatisPress).
As mentioned, I didn’t see any useful output during trellis up --debug (with no_log set to false), but I can certainly try again. I suppose I could have missed something in the rush.
Oh! In that case can you share your composer_authentications config (with any secret values changed of course).
I’d also try the golden rule of Trellis troubleshooting which is running the command manually. In this case, you want to SSH in (vagrant ssh), go into the site directory and run something like this:
Running the manual composer config command results in no error (no feedback at all, in fact).
Running composer config --list does indeed display the config details for this custom composer source.
After the above steps, I also went back to project root and attempted another trellis provision development run: Still stalling at wordpress-install : Setup composer authentications.
Something is still wrong here. By changing the variable name to composer_authentication, you’ve you bypassed that feature entirely.
The feature works by using composer_authentications so now no authentications are enabled at all. This is probably fine for now since you did it manually before but if you (or anyone else) ever creates a new VM/server, it won’t exist.
I’m actually happy to have this particular feedback because I’m encountering “new” issues this morning that are probably not new at all (but rather caused by my change, given your explanation).
Still, as mentioned earlier, I did previously provision with no_log (albeit in a complete provision), so here’s what I get back from trellis provision --tags=wordpress-install development (still no output, and no_log is commented out both in trellis/roles/wordpress-install/tasks/composer-authentications.yml and in trellis/roles/wordpress-install/tasks/main.yml):
Here are the last few lines of output while trellis uping (with --debug) after vagrant destroy:
In both cases, the process stopped just as appears in the image(s). I killed the first one after 40 minutes. I didn’t wait quite as long the second time.
Here’s what I have for repositories in composer.json:
And, I should mention again that this same project did in fact work correctly on another machine until that machine crashed. The crashed machine is back from the shop now, so I’ll be attempting this project there again shortly.
I’m still looking into possibilities, but if this looks familiar to anyone, please do share.
The SatisPress server to which this composer_authentications config is attempting to connect does indeed work well with other projects, including this very project: I’m getting this error when attempting to provision development, but I can deploy to one of the project’s previously provisioned remotes (and I have verified that composer dependencies are indeed installed on the remote every time).
Ah sorry, I didn’t realize before when you said it “hangs” that there’s literally no helpful output at all So no_log isn’t actually hiding any output in this.
Honestly I don’t really know what to suggest next. The process hanging implies two things to me:
a network connection that’s being blocked
the process is waiting for input
Considering it hangs for 40 minutes, I’d be very skeptical it’s a network connection. Almost any client/server would have lower timeouts.
So I wonder if the composer command that Ansible ends up running is someone causing composer to wait for input.
Several other projects I have are now giving me a hard time (starting last week or so) with errors at [wordpress-install : Setup composer authentications - example.com] that output Do not run Composer as root/super user! See https://getcomposer.org/root for details Aborting as no plugin should be loaded if running as super user is not explicitly allowed.
I was going to open a separate thread on this… But before I do, any chance that behavior is a known issue that might be impacting me a little differently on this project?
Apologies if I’m dropping in an unrelated comment. I provisioned a new server using trellis new and trellis droplet create, deployed to it fine. Next day, I’m trying to redeploy to it, and it fails task deploy : Setup composer authentications (HTTP Basic)].
Here’s the rub: I didn’t even authenticate at this point, I was using wpackagist only. I tried adding my own auth.json and defining a private repo later, but at one point, the file just stopped working. I tried setting no_log: false but it still shows "censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"
I don’t understand why this is happening.
I have recently started seeing this behaviour too. I don’t use any custom composer authentications, but trellis deploy is failing at this step. It’s as though it’s failing to skip it when it should be.
I have currently worked around it by commenting out the Setup composer authentications steps in build-after.yml
I’m experiencing the same problem too now with my colleague, we have the exact same setup, same repo. We have no composer_authentications entry in development/vault?
The wordpress-install task just fails with the message:
fatal: [default]: FAILED! => {"censored": "the output has been hidden due to the fact that 'no_log: true' was specified for this result"}
Setting no_log: false doesn’t provide any useful information.
Disabling all tasks in composer-authentications.yml is the only thing that works to get past the failed task.
We both have a auth.json file in ~/.composer and we have some premium plugins defined in the site/composer.json file which we are both able to install without errors.
When I run trellis provision --tags=wordpress-install development, it runs the composer-authentications tasks without any problems, but when he runs it, it fails…
Just some guess, maybe I am totally wrong here: But could have it something to do with SSH Agent Forwarding and some composer repositories using SSH and SSH authentication.
Yeah could be!
I also compared both our ~/.ssh/config and they’re also identical, so not sure what else I need to check? Running composer diagnose also doesn’t return any errors?