When I came to the office this morning I noticed that our matomo instance is no longer tracking requests. Which is pretty strange since everything was fine yesterday. I looked into the logs and found that the DeviceDetector had started to cause an error:
PHP Fatal error: Uncaught TypeError: Return value of DeviceDetector\Parser\Device\AbstractDeviceParser::getShortCode() must be of the type string, int returned in /var/www/matomo/vendor/matomo/device-detector/Parser/Device/AbstractDeviceParser.php:924 Stack trace: <a href='/0'>#0</a> /var/www/matomo/vendor/matomo/device-detector/DeviceDetector.php(491): DeviceDetector\Parser\Device\AbstractDeviceParser::getShortCode() <a href='/1'>#1</a> /var/www/matomo/plugins/DevicesDetection/Columns/DeviceBrand.php(63): DeviceDetector\DeviceDetector->getBrand() <a href='/2'>#2</a> /var/www/matomo/core/Tracker/Visit.php(499): Piwik\Plugins\DevicesDetection\Columns\DeviceBrand->onNewVisit() <a href='/3'>#3</a> /var/www/matomo/core/Tracker/Visit.php(302): Piwik\Tracker\Visit->triggerHookOnDimensions() <a href='/4'>#4</a> /var/www/matomo/core/Tracker/Visit.php(209): Piwik\Tracker\Visit->handleNewVisit() <a href='/5'>#5</a> /var/www/matomo/core/Tracker.php(160): Piwik\Tracker\Visit->handle() <a href='/6'>#6</a> /var/www/matomo/plugins/Queue" while reading response header from upstream[...]
The strange thing is, that we did not changed or updated anything. The error came up by the middle of the night and from there on was present on every request.
We did not update something. Neither matomo nor php or something else.
We are using Matomo 4.0.4 with PHP 7.4.10.
After deactivating the DeviceDetector plugin tracking works as expected.
@ThorbenOermann that should only occur for single visits with devices of specific brands.
But that issue was already fixed and shouldn't occur any longer with Matomo 4.0.5, which will be released soon. (A beta should already be available)
Thanks for your reply.
that should only occur for single visits with devices of specific brands.
That does make sence. But when using queued tracking, as we do, this single visit blocks the whole queue from being processed.
We will wait for 4.0.5 an activate the plugin again.