51Degrees / Device-Detection

THE Fastest and most Accurate device detection for C / PHP / Perl / Python and Node.js - professionally maintained device data
https://51degrees.com/device-detection
Other
112 stars 46 forks source link

Bad Detections #52

Closed parisholley closed 3 years ago

parisholley commented 3 years ago

Using node.js client

Mozilla/5.0 (iPad; CPU OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPad5,3;FBMD/iPad;FBSN/iOS;FBSV/13.7;FBSS/2;FBID/tablet;FBLC/en_US;FBOP/5] Mozilla/5.0 (iPad; CPU OS 13_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPad7,5;FBMD/iPad;FBSN/iOS;FBSV/13.5.1;FBSS/2;FBID/tablet;FBLC/en_US;FBOP/5]

Returns Axxxx instead of iPad for hardwaremodel

Mozilla/5.0 (iPad; CPU OS 13_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

Throws exception when parsing that agent

Error: in method 'EvidenceBaseSwig_set', argument 3 of type 'std::string const &'

Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBDV/iPhone13,2;FBMD/iPhone;FBSN/iOS;FBSV/14.1;FBSS/3;FBID/phone;FBLC/en_US;FBOP/5]

devicetype = desktop, should be phone

Steve51D commented 3 years ago

Hi @parisholley,

Thanks for reporting these issues.

In the top case, this is intentional. Often, iPad user-agents will only let us know that it's an iPad, not which model. In which case, hardware model = iPad. However, the user-agents you are referencing include additional detail that tell us the model, so hardware model returns the real model number. If you want to check if it's an iPad then hardwareFamily is probably a better property to use.

I'll take a look at the error and get back to you. Not sure what's happening there.

I'll pass the bottom one over to our data team to take a look as that appears to be a straightforward mistake.

Steve51D commented 3 years ago

Hi @parisholley

We were unable to reproduce the error or the iPhone user-agent returning devicetype = desktop. Is there any additional information for the error, like a stack trace?

On the device type = desktop issue, can you let me know the type and date of the data file you're using? We have a utility that can extract this info. The release only contains a windows executable, if you need a Linux one then let me know and I'll see what I can do.

Steve51D commented 3 years ago

I'm closing this due to inactivity. If you have any other questions, please let us know.