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 model name needs to be truncated? or field needs to be increased? #13784

Closed
tsteur opened this issue Nov 30, 2018 · 6 comments
Closed
Labels
worksforme The issue cannot be reproduced and things work as intended.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Nov 30, 2018

Seeing this in the error logs:

[28-Nov-2018 20:26:49 UTC] Error in Matomo (tracker): Error query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'config_device_model' at row 1 In query: INSERT INTO log_visit (idvisitor, config_id, location_ip, idsite, visit_first_action_time, visit_goal_buyer, visit_goal_converted, visit_last_action_time, visitor_days_since_first, visitor_days_since_order, visitor_returning, visitor_count_visits, visit_entry_idaction_name, visit_exit_idaction_name, visit_exit_idaction_url, visit_total_actions, visit_total_interactions, visit_total_searches, referer_keyword, referer_name, referer_type, referer_url, location_browser_lang, config_browser_engine, config_browser_name, config_browser_version, config_device_brand, config_device_model, config_device_type, config_os, config_os_version, visit_total_events, visitor_localtime, visitor_days_since_last, config_resolution, config_cookie, config_director, config_flash, config_gears, config_java, config_pdf, config_quicktime, config_realplayer, config_silverlight, config_windowsmedia, visit_total_time, location_city, location_country, location_latitude, location_longitude, campaign_content, campaign_id, campaign_keyword, campaign_medium, campaign_name, campaign_source) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) Parameters: array (   0 => xxx,   1 => 'xxxx',   2 => ' ' . "\0" . '?' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '' . "\0" . '',   3 => 2,   4 => '2018-11-28 20:26:49',   5 => 0,   6 => 0,   7 => '2018-11-28 20:26:40',   8 => '145',   9 => 0,   10 => 1,   11 => 21,   12 => 0,   13 => 0,   14 => 0,   15 => 1,   16 => 0,   17 => 0,   18 => '',   19 => 'xxxxx',   20 => 6,   21 => '',   22 => 'el-gr',   23 => 'Blink',   24 => 'CH',   25 => '70.0',   26 => 'T6',   27 => 'SurfTab breeze 10.1 quad 3G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36',   28 => 2,   29 => 'AND',   30 => '6.0',   31 => 1,   32 => '21:26:36',   33 => '0',   34 => '976x610',   35 => 1,   36 => 0,   37 => 0,   38 => 0,   39 => 0,   40 => 0,   41 => 0,   42 => 0,   43 => 0,   44 => 0,   45 => 0,   46 => '',   47 => 'us',   48 => 'XX.X51',   49 => '-XX.X22',   50 => NULL,   51 => NULL,   52 => NULL,   53 => 'email',   54 => NULL,   55 => 'XXX', )

It seems like it tried to record the user agent as device model which is limited to 103 characters @sgiehl ?

@tsteur tsteur added the Bug For errors / faults / flaws / inconsistencies etc. label Nov 30, 2018
@tsteur tsteur added this to the 3.8.0 milestone Nov 30, 2018
@sgiehl
Copy link
Member

sgiehl commented Dec 1, 2018

Seems to be an incorrect detection of DeviceDetector. Are you able to look up the full useragent in the logs?
But yes, might make sense to truncate it to prevent such errors or even unset the value if it's longer, as that shouldn't occur.

@tsteur
Copy link
Member Author

tsteur commented Dec 1, 2018

Mozilla/5.0 (Linux; Android 8.1.0; Trekstor Surftab theatre K13) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Only found some like these but they don't contain "breeze".

also found

Mozilla/5.0 (Linux; Android 6.0; SurfTab breeze 10.1 quad 3G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.80 Safari/537.36

which might be it?

@tsteur
Copy link
Member Author

tsteur commented Dec 1, 2018

also seeing

Mozilla/5.0 (Linux; Android 5.1; SurfTab breeze 10.1 quad plus Build/LMY47I) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.91 Safari/537.36

@sgiehl
Copy link
Member

sgiehl commented Dec 1, 2018

The detection will be corrected with matomo-org/device-detector#5877
Nevertheless we should add some better handling of obviously incorrect device models

@tsteur
Copy link
Member Author

tsteur commented Dec 1, 2018

Wonder if we actually need to do something... having it in the error log might be fine enough for now so we get aware of the problem when a wrong device is tracked... could also trim it though and then it would become visible in the reports.

@sgiehl
Copy link
Member

sgiehl commented Dec 2, 2018

should not occur too often I hope. So would also be fine to do nothing here

@tsteur tsteur closed this as completed Dec 2, 2018
@tsteur tsteur added worksforme The issue cannot be reproduced and things work as intended. and removed Bug For errors / faults / flaws / inconsistencies etc. labels Dec 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants