Skip to content
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

Stubborn warning that won't go away (very weird) #94

Open
jlahijani opened this issue May 22, 2024 · 6 comments
Open

Stubborn warning that won't go away (very weird) #94

jlahijani opened this issue May 22, 2024 · 6 comments

Comments

@jlahijani
Copy link
Sponsor

For reasons, I have the /site/modules/TracyDebugger/ folder symlinked to where it actually exists in some other folder. Other sites on my dev server use the same symlink. This isn't ever an issue and I've been doing this for a while.

Out of no-where, I started getting this warning when editing any page on my site, which isn't even related to the PW installation of the site where it came up:

Deprecated: Return type of ProcessWire\FormBuilderMain::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in [.../some-other-separate-website/site/modules/FormBuilder/FormBuilderMain.php:410](vscode://file/%2Fhome%2Fjlahijani%2FSites%2Fsome-other-separate-website%2Fsite%2Fmodules%2FFormBuilder%2FFormBuilderMain.php:410)

Very weird, so I updated FormBuilder on some-other-separate-website and the issue still happens.

I then noticed that Tracy had references to some-other-separate-website on my actual website in the caches table so I wiped that out. The warning still appears even though it's totally gone.

I then wiped out /site/assets/logs/tracy/ for my actual website. The warning still appears even though it's totally gone.

I logged in and back out. I manually deleted cookies and sessions in DevTools as well. I deleted all PW log files. Same issue.

Where the heck is this error coming from?

@jlahijani
Copy link
Sponsor Author

I also saw the error in /var/log/apache2/error.log. Wiping that file out didn't help.

I also tried using a new browser (Firefox instead of Chrome). Same issue.

Not sure if it's related this issue: https://processwire.com/talk/topic/29302-tracy-shows-error-page-with-out-of-date-error-after-code-has-been-fixed/

@jlahijani
Copy link
Sponsor Author

OK it went away after I ran this command which restarts all my services:

sudo service php8.3-fpm reload && sudo service php8.3-fpm restart && sudo service apache2 reload && sudo service apache2 restart && sudo service mysql restart

I can't pinpoint which service actually lead to it being resolved, but it did work.

@adrianbj
Copy link
Owner

@jlahijani - Can you reproduce it again now after the service restarts?

I assume we are talking about the "warnings" section on the debug bar showing this deprecation notice?

If you can reproduce, does it make a difference if you check the "Use Native PHP Session" setting?

If not, what about if you force an older version of the Tracy core -

// load Tracy files and our helper files
if(version_compare(PHP_VERSION, '8.0.0', '>=')) {
self::$tracyVersion = '2.10.x';
}
elseif(version_compare(PHP_VERSION, '7.2.0', '>=')) {
self::$tracyVersion = '2.9.x';
}
elseif(version_compare(PHP_VERSION, '7.1.0', '>=')) {
self::$tracyVersion = '2.7.x';
}
else {
self::$tracyVersion = '2.5.x';
- could you see what happens if you force 2.9?

Otherwise, I am wondering if it might be something opcache related and found this: https://serverfault.com/questions/705304/two-separate-php-fpm-sites-seem-to-be-using-the-same-code - although this is quite old and presumably fixed by now.

@jlahijani
Copy link
Sponsor Author

@adrianbj The issue went away after I restarted everything. My suspicion is that it's related to php/php-fpm. I am running all recent versions of PHP, Apache and MariaDB.

To be clear, yes it was the warnings section on the debug bar.

If this issue occurs again, I will try the things you mentioned.

@adrianbj
Copy link
Owner

I run all my sites with php-fpm (recently all upgraded to 8.3) so it would surprise me if it's specifically an fpm vs apache module issue.

Please do let me know if those suggestions help (without service restarts) if you do see the issue again.

@teppokoivula
Copy link

teppokoivula commented May 23, 2024

Opcode cache, perhaps? That could cause issues like this, and should go away with php-fpm reload.

... and it looks like Adrian already suggested that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants