hi, my matomo installation occurs error as below when try to run from command line
ERROR [03:24:24] 558283 Uncaught exception: TypeError: Symfony\Component\Console\Application::has(): Argument #1 ($name) must be of type string, null given, called in /www/analytics/core/Console.php on line 172 and defined in /www/analytics/vendor/symfony/console/Application.php:592
Stack trace: #0 /www/analytics/core/Console.php(172): Symfony\Component\Console\Application->has() #1 /www/analytics/core/Console.php(131): Piwik\Console->addCommandIfExists() #2 /www/analytics/core/Console.php(85): Piwik\Console->doRunImpl() #3 /www/analytics/vendor/symfony/console/Application.php(171): Piwik\Console->doRun() #4 /www/analytics/console(32): Symfony\Component\Console\Application->run() #5 {main}
Uncaught exception in /www/analytics/vendor/symfony/console/Application.php line 592:
Symfony\Component\Console\Application::has(): Argument #1 ($name) must be of type string, null given, called in /www/analytics/core/Console.php on line 172
Confirm that we’re having the issue too since updating to the latest Matomo version (5.0.1) and using PHP 8.1.27
ERROR [10:45:49] 1208934 Uncaught exception: TypeError: Argument 1 passed to Symfony\Component\Console\Application::has() must be of the type string, null given, called in /xxx/xxx/xxxx/www/xxx/core/Console.php on line 172 and defined in /xxx/xxx/xxxx/www/xxx/vendor/symfony/console/Application.php:592
Stack trace: #0 /xxx/xxx/xxx/www/xxx/core/Console.php(172): Symfony\Component\Console\Application->has() #1 /xxx/xxx/xxx/www/xxx/core/Console.php(131): Piwik\Console->addCommandIfExists() #2 /xxx/xxx/xxx/www/xxx/core/Console.php(85): Piwik\Console->doRunImpl() #3 /xxx/xxx/xxx/www/xxx/vendor/symfony/console/Application.php(171): Piwik\Console->doRun() #4 /xxx/xxx/xxx/www/xxx/console(32): Symfony\Component\Console\Application->run() #5 {main}
Uncaught exception in /xxx/xxx/xxx/www/xxx/vendor/symfony/console/Application.php line 592:
Argument 1 passed to Symfony\Component\Console\Application::has() must be of the type string, null given, called in /xxx/xxx/xxx/www/xxx/core/Console.php on line 172
As well as the following error, which runs perfectly when fired on the machine itself, and the error was not there before the upgrade to 5.0.1:
matomo.js It seems like matomo.js can’t be fetched properly.
try running curl -v https://xxx/xxx/matomo.js on your server and see if it is able to fetch the file successfully
Edit the Console.php file, go to the line it says and add a ?? ‘’ after the call to the getName() function. Run the command manually and you’ll see which plugin is causing the problem so you can disable it or try to debug further.