Varying-Vagrant-Vagrants / VVV

An open source Vagrant configuration for developing with WordPress
https://varyingvagrantvagrants.org
MIT License
4.54k stars 848 forks source link

failed to open vendor/perftools/php-profiler/autoload.php on a fresh provision #2590

Closed skorasaurus closed 1 year ago

skorasaurus commented 2 years ago

Are you using the latest stable or develop branch version of VVV?

Yes (develop)

Is it a new VVV or an existing VVV that used to work?

Existing, worked but now broken

Whats the problem?

@tomjn asked in the vvv slack that I create a bug report for this:

After following the steps at https://varyingvagrantvagrants.org/docs/en-US/troubleshooting/ Starting from Fresh (in between vagrant destroy and vagrant box update; I installed newer versions of the virtualbox and virtualbox extension pack);

I was receiving the following errors in the terminal as I was reprovisioning and whenever I went to any of my local sites; the same errors would appear in my browser.

Warning: require_once(vendor/perftools/php-profiler/autoload.php): failed to open stream: No such file or directory in /srv/www/default/php-profiler/config.php on line 3

Fatal error: require_once(): Failed opening required 'vendor/perftools/php-profiler/autoload.php' (include_path='.:/usr/share/php') in /srv/www/default/php-profiler/config.php on li

Note: I have not isolated it enough to reproduce its specific cause.

After commenting out out the mongodb and tideways entriesin my config.yaml ; I also renamed utilities to extensions; I no longer had the issue.

below is the log file from ; named provisioner-site-anameofmysite log/provisioners/2022.04.04_18-54-43 https://gist.github.com/skorasaurus/bc6bfaf69b3f83ac6614830c26141333

How do we reproduce it?

No response

VVV Status screen

\ V\ V\ V / v3.9.0 Path:"/home/myusername/vvv"
 \_/\_/\_/  git::develop(5742364)

Platform: linux shell:/bin/bash systemd  vagrant-goodhosts vagrant-vbguest CaseSensitiveFS shared_db_folder_disabled
Vagrant: v2.2.18, virtualbox: v6.1.32

Docs:       https://varyingvagrantvagrants.org/
Contribute: https://github.com/varying-vagrant-vagrants/vvv
Dashboard:  http://vvv.test

Which Operating System are you using?

Linux

Which provider are you using?

VirtualBox

Mte90 commented 2 years ago

I tried now and the folder is generated, my suggestion is to go to VVV/www/default/ and remove php-profiler and xhgui folders.

tomjn commented 2 years ago

that file gets loaded here:

https://github.com/Varying-Vagrant-Vagrants/vvv-utilities/blob/master/tideways/config.php-profiler.php#L3

Perhaps an absolute path would work better?

@skorasaurus do you have the provision output of the tideways provisioner? This implies a possible bug elsewhere or a problem with composer when working with the php profiler folder setup

GitHub
vvv-utilities/config.php-profiler.php at master · Varying-Vagrant-Vagrants/vvv-utilities
Official VVV extensions. Contribute to Varying-Vagrant-Vagrants/vvv-utilities development by creating an account on GitHub.
skorasaurus commented 2 years ago

that file gets loaded here:

https://github.com/Varying-Vagrant-Vagrants/vvv-utilities/blob/master/tideways/config.php-profiler.php#L3

Perhaps an absolute path would work better?

@skorasaurus do you have the provision output of the tideways provisioner? This implies a possible bug elsewhere or a problem with composer when working with the php profiler folder setup

GitHubvvv-utilities/config.php-profiler.php at master · Varying-Vagrant-Vagrants/vvv-utilitiesOfficial VVV extensions. Contribute to Varying-Vagrant-Vagrants/vvv-utilities development by creating an account on GitHub.

tideways provisioner. https://gist.github.com/skorasaurus/97ea123153abcf1883dce8cbdf8e7467

GitHub
vvv-utilities/config.php-profiler.php at master · Varying-Vagrant-Vagrants/vvv-utilities
Official VVV extensions. Contribute to Varying-Vagrant-Vagrants/vvv-utilities development by creating an account on GitHub.
Gist
vvv/log/provisioners/2022.04.04_18-54-43
vvv/log/provisioners/2022.04.04_18-54-43. GitHub Gist: instantly share code, notes, and snippets.
Mte90 commented 2 years ago

I guess that there was a previous provision that failed and there was files around. Removing those folders and a new provision should fix it.

tomjn commented 2 years ago

I started a PR at https://github.com/Varying-Vagrant-Vagrants/vvv-utilities/pull/99 that might help with this

tomjn commented 2 years ago

it's also possible that this issue prevents the code that would fix this issue from running, the PR linked to tries to mitigate that a little by not failing if the file doesn't exist

skorasaurus commented 2 years ago

I guess that there was a previous provision that failed and there was files around. Removing those folders and a new provision should fix it.

I'm sorry, which folders? Thank you so much for your assistance. :)

tomjn commented 2 years ago

Also a little alarmed by this line:

error: pathspec '0.20.0' did not match any file(s) known to git
tomjn commented 2 years ago

I've added a git fetch and updated to v0.20.4, @skorasaurus if you can test that PR? You can modify config.yml to pull in that branch as a separate source, or manually change it via git and run vagrant provision --provision-with="extension-core-tideways" just be sure to change it back afterwards so you continue to get updates once it's merged

tomjn commented 2 years ago

Also www/default/php-profiler

skorasaurus commented 2 years ago

For what it's worth, I reprovisioned after I deleted VVV/www/default/php-profiler and VVV/www/default/php-profiler/xhgui folders and adding the mongodb and tideways entries again (I kept the extensions reference); everything appeared to be successful and working as intended ; I'll test the PR in a little bit.

skorasaurus commented 2 years ago

You can modify config.yml to pull in that branch as a separate source,

Sorry, could you explain a bit more what I need to specifically modify in config.yml to pull in this PR >

tomjn commented 2 years ago

The git repo is in provision/extensions/core if you want to do it manually

On Tue, 5 Apr 2022 at 16:25, Will Skora @.***> wrote:

You can modify config.yml to pull in that branch as a separate source,

Sorry, could you explain a bit more what I need to specifically modify in config.yml to pull in this PR https://github.com/Varying-Vagrant-Vagrants/vvv-utilities/pull/99>

— Reply to this email directly, view it on GitHub https://github.com/Varying-Vagrant-Vagrants/VVV/issues/2590#issuecomment-1088863581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOLZ3FIJQC565K42AVS4DVDRLMRANCNFSM5SQZVVAQ . You are receiving this because you were mentioned.Message ID: @.***>

tomjn commented 2 years ago

@skorasaurus the PR got merged with some other changes to the main branch, can you reprovision and confirm the main branch is good?

skorasaurus commented 2 years ago

@skorasaurus the PR got merged with some other changes to the main branch, can you reprovision and confirm the main branch is good?

thank you for your efforts, I pulled changes, reprovisioned, and received errors related to nvm, my steps and full logs are available at https://gist.github.com/skorasaurus/2bf2e6eeb9cec9e0db7eea51d64c02aa possibly related to https://github.com/Varying-Vagrant-Vagrants/VVV/issues/2593

Gist
2022.04.13_14-01-08
2022.04.13_14-01-08. GitHub Gist: instantly share code, notes, and snippets.
tomjn commented 2 years ago

@skorasaurus just merged a PR related to nvm

skorasaurus commented 2 years ago

@skorasaurus just merged a PR related to nvm

Unfortunately; I already had pulled the newest changes before I did the I reprovisioned, what I did was:

within ~/vvv git pull (latest commit is now cc0bef16856792eba93913831e621edf40f4a889 )

then rm -rf provision/extensions/core vagrant up --provision

full logs are at https://gist.github.com/skorasaurus/2bf2e6eeb9cec9e0db7eea51d64c02aa

tomjn commented 2 years ago

hmmm 🤔 I would strongly advise you remove the nvm extension, nvm is a part of VVV core in 3.9

tomjn commented 2 years ago

I've made some tweaks to the nvm extension, but this is for users who are on older versions of VVV so that it doesn't cause problems when upgrading

skorasaurus commented 2 years ago

hmmm thinking I would strongly advise you remove the nvm extension, nvm is a part of VVV core in 3.9

Thanks for the tip; removing that from my config.yml and reprovisioning (vagrant up --provision) fixed the nvm issues ; still have the error in my provisioning log default: Failed to load the PHP Profiler autoloader.php file, confirm provisioning of tideways was succesful, reprovision, and if all else fails delete the php-profiler folder in /srv/www/default and report on the VVV github error but otherwise my vvv experience is working.

tomjn commented 2 years ago

I'm not sure if this is resolved but the ideal situation is that the only way to reproduce this is using stable or older

tomjn commented 1 year ago

closing this as it hasn't seen updates in a year and newer versions are out, feel free to reopen if the exact same issue happens again.