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

Device Detection broken #16906

Closed
ThorbenOermann opened this issue Dec 8, 2020 · 2 comments
Closed

Device Detection broken #16906

ThorbenOermann opened this issue Dec 8, 2020 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@ThorbenOermann
Copy link

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:
#0 /var/www/matomo/vendor/matomo/device-detector/DeviceDetector.php(491): DeviceDetector\Parser\Device\AbstractDeviceParser::getShortCode()
#1 /var/www/matomo/plugins/DevicesDetection/Columns/DeviceBrand.php(63): DeviceDetector\DeviceDetector->getBrand()
#2 /var/www/matomo/core/Tracker/Visit.php(499): Piwik\Plugins\DevicesDetection\Columns\DeviceBrand->onNewVisit()
#3 /var/www/matomo/core/Tracker/Visit.php(302): Piwik\Tracker\Visit->triggerHookOnDimensions()
#4 /var/www/matomo/core/Tracker/Visit.php(209): Piwik\Tracker\Visit->handleNewVisit()
#5 /var/www/matomo/core/Tracker.php(160): Piwik\Tracker\Visit->handle()
#6 /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.

@sgiehl
Copy link
Member

sgiehl commented Dec 8, 2020

@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)

@sgiehl sgiehl closed this as completed Dec 8, 2020
@sgiehl sgiehl added the answered For when a question was asked and we referred to forum or answered it. label Dec 8, 2020
@ThorbenOermann
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants