joomla-extensions / jedchecker

Joomla extension to check components, modules or plugins for possible problems for submission to the JED -> Translations: https://joomla.crowdin.com/joomla-official-extensions
38 stars 28 forks source link

JED Checker never finishes in PHP 8.3.0 #243

Open toivo opened 7 months ago

toivo commented 7 months ago

Configuration: PHP memory_limit 256M Wampserver 3.3.2 on Windows 11

The JED Checker v2.4.3 never finishes when run in Joomla 4.4.1 using PHP 8.3.0. It finishes all right in Joomla 4.4.1 and PHP 8.2.13.

Tested with a Joomla 4 & 5 compatible component I am developing (no compatibility plugin required) and Akeeba Backup v9.8.3 Core - pkg_akeebabackup-9.8.3-core.zip.

In both test runs the icons after these four section titles whirl forever:

JED-Checker-Results-PHP-8 2 13 JED-Checker-Results-PHP-8 3 0
dryabov commented 7 months ago

It works fine on my end. Could you enable error logging and check error_log for related messages? I see that all four sections are related to XML parsing, so most likely it is related somehow.

toivo commented 7 months ago

Unfortunately there are no errors and my 'Error Reporting' is 'Maximum' and 'System Debug' is turned on. Nothing, not in everything.php nor in php_error.log. Using PHP 8.2.13 work all right and finishes a small extension, for example https://extensions.joomla.org/extension/table-of-contents-ck/ in three seconds, but using PHP 8.3.0 the JED Checker gets stuck in some loop. The Apache access.log has always the attached entries that always stop after "rule=language". Could it be caused by running the JED Checker in Windows 11? I have never had this type of issues with JED Checker.

127.0.0.1 - - [03/Dec/2023:20:42:17 +1100] "GET /administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=xmlinfo HTTP/1.1" 200 985 127.0.0.1 - - [03/Dec/2023:20:42:18 +1100] "GET /administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=jexec HTTP/1.1" 200 99 127.0.0.1 - - [03/Dec/2023:20:42:19 +1100] "GET /administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=framework HTTP/1.1" 200 2969 127.0.0.1 - - [03/Dec/2023:20:42:20 +1100] "GET /administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=errorreporting HTTP/1.1" 200 99 127.0.0.1 - - [03/Dec/2023:20:42:21 +1100] "GET /administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=encoding HTTP/1.1" 200 99 127.0.0.1 - - [03/Dec/2023:20:42:22 +1100] "GET /administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=jamss HTTP/1.1" 200 99 127.0.0.1 - - [03/Dec/2023:20:42:23 +1100] "GET /administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=language HTTP/1.1" 200 99

dryabov commented 7 months ago

And on the Network tab in the browser's Developer Tools, what is the status of these requests? Are they really hanging or just returning with an error?

Most likely writing to the access_log file is buffered, and you can see the remaining records by stopping the web server or waiting a while for the next piece of data to be written to be ready.

dryabov commented 7 months ago

And what webserver do you use, Apache+mod_php or Nginx+FPM?

toivo commented 7 months ago

And what webserver do you use, Apache+mod_php or Nginx+FPM?

Web Server: Apache/2.4.54 (Win64) PHP/8.3.0 mod_fcgid/2.3.10-dev WebServer to PHP Interface: apache2handler

toivo commented 7 months ago

Those requests did not receive any errors and they are pending. Apache server was stopped but no new error messages appeared in the php_error.log. The rest of the JED requests listed in JED Checker below the pending ones have the green tick.

JED-Checker-pending-requests
toivo commented 7 months ago

Now we have type errors and net::ERR_CONNECTION_RESET messages in red in the Console tab of Developer Tools:

TypeError: Failed to fetch
    at check (script.js?06b386f1e80b389948e46bb8cd6b684f:27:5)
    at script.js?06b386f1e80b389948e46bb8cd6b684f:93:43
    at Array.forEach (<anonymous>)
    at window.Joomla.submitbutton (script.js?06b386f1e80b389948e46bb8cd6b684f:93:27)
    at HTMLElement.executeTask (joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4:1674)
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:58
Promise.catch (async)
check @ script.js?06b386f1e80b389948e46bb8cd6b684f:57
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
window.Joomla.submitbutton @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
executeTask @ joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4
script.js?06b386f1e80b389948e46bb8cd6b684f:27 

       GET http://joomla4test/administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=xmlfiles net::ERR_CONNECTION_RESET
check @ script.js?06b386f1e80b389948e46bb8cd6b684f:27
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
window.Joomla.submitbutton @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
executeTask @ joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4
script.js?06b386f1e80b389948e46bb8cd6b684f:58 TypeError: Failed to fetch
    at check (script.js?06b386f1e80b389948e46bb8cd6b684f:27:5)
    at script.js?06b386f1e80b389948e46bb8cd6b684f:93:43
    at Array.forEach (<anonymous>)
    at window.Joomla.submitbutton (script.js?06b386f1e80b389948e46bb8cd6b684f:93:27)
    at HTMLElement.executeTask (joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4:1674)
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:58
Promise.catch (async)
check @ script.js?06b386f1e80b389948e46bb8cd6b684f:57
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
window.Joomla.submitbutton @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
executeTask @ joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4
script.js?06b386f1e80b389948e46bb8cd6b684f:27 

       GET http://joomla4test/administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=xmlmanifest net::ERR_CONNECTION_RESET
check @ script.js?06b386f1e80b389948e46bb8cd6b684f:27
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
window.Joomla.submitbutton @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
executeTask @ joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4
script.js?06b386f1e80b389948e46bb8cd6b684f:58 TypeError: Failed to fetch
    at check (script.js?06b386f1e80b389948e46bb8cd6b684f:27:5)
    at script.js?06b386f1e80b389948e46bb8cd6b684f:93:43
    at Array.forEach (<anonymous>)
    at window.Joomla.submitbutton (script.js?06b386f1e80b389948e46bb8cd6b684f:93:27)
    at HTMLElement.executeTask (joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4:1674)
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:58
Promise.catch (async)
check @ script.js?06b386f1e80b389948e46bb8cd6b684f:57
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
window.Joomla.submitbutton @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
executeTask @ joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4
script.js?06b386f1e80b389948e46bb8cd6b684f:27 

       GET http://joomla4test/administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=xmlupdateserver net::ERR_CONNECTION_RESET
check @ script.js?06b386f1e80b389948e46bb8cd6b684f:27
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
window.Joomla.submitbutton @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
executeTask @ joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4
script.js?06b386f1e80b389948e46bb8cd6b684f:58 TypeError: Failed to fetch
    at check (script.js?06b386f1e80b389948e46bb8cd6b684f:27:5)
    at script.js?06b386f1e80b389948e46bb8cd6b684f:93:43
    at Array.forEach (<anonymous>)
    at window.Joomla.submitbutton (script.js?06b386f1e80b389948e46bb8cd6b684f:93:27)
    at HTMLElement.executeTask (joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4:1674)
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:58
Promise.catch (async)
check @ script.js?06b386f1e80b389948e46bb8cd6b684f:57
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
window.Joomla.submitbutton @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
executeTask @ joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4
script.js?06b386f1e80b389948e46bb8cd6b684f:27 

       GET http://joomla4test/administrator/index.php?option=com_jedchecker&task=police.check&format=raw&rule=gpl net::ERR_CONNECTION_RESET
check @ script.js?06b386f1e80b389948e46bb8cd6b684f:27
(anonymous) @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
window.Joomla.submitbutton @ script.js?06b386f1e80b389948e46bb8cd6b684f:93
executeTask @ joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4
script.js?06b386f1e80b389948e46bb8cd6b684f:58 TypeError: Failed to fetch
    at check (script.js?06b386f1e80b389948e46bb8cd6b684f:27:5)
    at script.js?06b386f1e80b389948e46bb8cd6b684f:93:43
    at Array.forEach (<anonymous>)
    at window.Joomla.submitbutton (script.js?06b386f1e80b389948e46bb8cd6b684f:93:27)
    at HTMLElement.executeTask (joomla-toolbar-button.min.js?6eb267679d65e41cc9fc4de7a56cf06e3b966e5b:4:1674)
toivo commented 7 months ago
JED-Checker-PHP-8 3 0-fail
toivo commented 7 months ago
JED-Checker-PHP-8 3 0-final
toivo commented 7 months ago

The extension tested in the last screenshots is the tiny content plugin Table of Contents CK

dryabov commented 7 months ago

The Table of Contents CK package is processed well on my side.

The most surprising thing is that the "Information..." rule works fine, but the "Update..." rule does not. Internally, they are very similar: collect XML manifests via JEDCheckerHelper::findManifests, iterate over them, load content via simplexml_load_file, and issue a warning if found. I don't know what's wrong there.

You can try to play with manually inserted trigger_error(__METHOD__.__LINE__); in administrator/components/com_jedchecker/libraries/rules/xmlupdateserver.php file to localize the line that hangs by analyzing error_log file.

toivo commented 7 months ago

Ok, I will try that, but probably tomorrow morning. It is 11PM here.

toivo commented 7 months ago

I added the trigger_error statement into every method in the file xmlupdateserver.php. The five icons have now been whirling for several minuts but no errors are displayed or written to the log files.

toivo commented 7 months ago

PHP 8.3.0 is the culprit. My host offers only PHP 8.2 and therefore I cannot test PHP 8.3.0 remotely. However, to eliminate any other factors, I installed a new Joomla 4.4.0 using PHP 8.3.0 in my Wampserver 3.3.2 and then JED Checker 2.4.3 and then tried to check the content plugin Table of Contents CK. No joy, the icons continued to swirl. As soon as I changed Wampserver to use 8.2.13, JED Checker finishes all right.