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

DeviceDetector Exception, $clientHints null, should be array #19849

Closed
peterbo opened this issue Oct 12, 2022 · 1 comment · Fixed by #19855
Closed

DeviceDetector Exception, $clientHints null, should be array #19849

peterbo opened this issue Oct 12, 2022 · 1 comment · Fixed by #19855
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@peterbo
Copy link
Contributor

peterbo commented Oct 12, 2022

Exception with queued tracking - I suspect the queuedTracking Plugin to be the reason for the Exception:

Uncaught exception in /home/users/xxx/www/stats/core/DeviceDetector/DeviceDetectorFactory.php line 28:
Piwik\DeviceDetector\DeviceDetectorFactory::makeInstance(): Argument #2 ($clientHints) must be of type array, null given, called in /home/users/xxx/www/stats/core/Tracker/VisitExcluded.php on line 193

When updated from an older version, requests of an "older format" may have been still present in the queue and could not be processed further.

Expected Behavior

Piwik/Request getClientHints() should return an empty array, if no data was found, not null, because for DeviceDetectorFactory::makeInstance(), $clientHints has to be an array.

Current Behavior

Exception is thrown, Queue handling stops.

Possible Solution

Steps to Reproduce (for Bugs)

Context

Your Environment

  • Matomo Version: 4.12 (updated from 4.5)
  • PHP Version: 8
  • Server Operating System: Debian
  • Additionally installed plugins:
  • Browser:
  • Operating System:
@peterbo peterbo added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Oct 12, 2022
@Findus23
Copy link
Member

Could this be the same as matomo-org/plugin-QueuedTracking#192 and the linked forum thread there?

@sgiehl sgiehl added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Oct 13, 2022
@sgiehl sgiehl self-assigned this Oct 13, 2022
@sgiehl sgiehl added this to the 4.12.1 milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants