Events rejected due to browser_context deviceMemory value

Hi,

We’re seeing a small, but meaningful number of events being rejected due to:

{
  "schemaKey": "iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/1-0-0",
  "error": {
    "error": "ValidationError",
    "dataReports": [
      {
        "message": "$.deviceMemory: number found, but [integer, null] is required",
        "path": "$.deviceMemory",
        "keyword": "unionType",
        "targets": [
          "number",
          "[integer, null]"
        ]
      }
    ]
  }
}

Some values we get for deviceMemory are: 0.5, “16”

  1. These events seem valid (not malicious or spam) so, since browser_context comes from the JS tracker, so why does it produce illegal values?
  2. And/or should the iglu schema for browser_context should be updated and relaxed to allow numbers and strings?
  3. Anything we can do more immediately to workaround this issue?

We have a PR for this out at the moment that should fix the issue but it hasn’t yet been released. This should fix capturing a floating point number but it won’t fix deviceMemory being reported as a string. Do you have the useragent information for that browser as that looks like it may have implemented the spec incorrectly.

1 Like

Here’s a few. Unfortunately, UA doesn’t appear to be too useful

Reported “32”

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.5977.8 Safari/537.36

Reported “16”

Mozilla/5.0 (Windows NT 10.0; Win64; x64; Trident/7.0; rv:12.0) like Gecko

Reported “16”

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/80.0

Reported “8”

Mozilla/5.0 (Windows NT 10.0; Win64; x64; Trident/7.0; rv:12.0) like Gecko