Useragent enrichment not parsing certain Android version numbers

We have been running into an issue with the useragent enrichment not parsing Android version numbers that lack a minor/patch in the version. Here is an example:

useragent         | Mozilla/5.0 (Linux; Android 10; SAMSUNG SM-N960F Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/9.2 Chrome/67.0.3396.87 Mobile Safari/537.36
useragent_family  | Samsung Internet
useragent_major   | 9
useragent_minor   | 2
useragent_patch   |
useragent_version | Samsung Internet 9.2
os_family         | Android
os_major          |
os_minor          |
os_patch          |
os_patch_minor    |
os_version        | Android
device_family     | Samsung SM-N960F

The enrichment is not parsing out that this is Android version 10. I looked through a variety of useragents and the issue appears to happen when the useragent does not have a minor version number. Android 10.0.0 would be parsed, but Android 10 is not. From digging through our events, this looks consistent across all Android useragents (Android 7, Android 8, Android 9, Android 10, the enrichment is not parsing the version number for any Android version without a minor/patch).

Here is my enrichment config:

{
  "schema": "iglu:com.snowplowanalytics.snowplow/ua_parser_config/jsonschema/1-0-1",
  "data": {
    "vendor": "com.snowplowanalytics.snowplow",
    "name": "ua_parser_config",
    "enabled": true,
    "parameters": {
      "uri": "s3://snowplow-hosted-assets/third-party/ua-parser",
      "database": "regexes-latest.yaml"
    }
  }
}

Has anyone also run into this issue and found a fix?

Hi @thedstrom

We no longer recommend using the ua parser enrichment, for the exact reason you mention, it’s rather hard to identify every new device.

We’ve built a new enrichment which uses YAUAA, this should be much better at identifying your devices and also creates a much richer dataset too.

2 Likes