faisalman / ua-parser-js

UAParser.js - The Essential Tool for User-Agent Detection in JavaScript & Web Development.
https://uaparser.dev/
GNU Affero General Public License v3.0
8.85k stars 1.18k forks source link

Samsung Internet reports a `browser.name` of `Samsung Browser` rather than `Samsung Internet` #694

Closed aradalvand closed 5 months ago

aradalvand commented 6 months ago

This is what v2.0.0-beta.1 returns when tested in Samsung Internet (notice that the browser.name is Samsung Browser, this used to be Samsung Internet in v1):

{
    "ua": "Mozilla/5.0 (Linux; Android 10; Redmi 8A) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/23.0 Chrome/115.0.0.0 Mobile Safari/537.36",
    "browser": {
        "name": "Samsung Browser",
        "version": "23.0",
        "major": "23"
    },
    "cpu": {},
    "device": {
        "type": "mobile",
        "model": "Redmi 8A",
        "vendor": "Xiaomi"
    },
    "engine": {
        "name": "Blink",
        "version": "115.0.0.0"
    },
    "os": {
        "name": "Android",
        "version": "10"
    }
}

If this is intended, then it should be mentioned in v2's list of breaking changes. Although it doesn't seem to be, because the browser enum still mentions Samsung Internet, which is strange: https://github.com/faisalman/ua-parser-js/blob/3622b614a71749e6d96f241d6810d6086075e2a4/src/enums/ua-parser-enums.js#L118

faisalman commented 5 months ago

This has been fixed here: https://github.com/faisalman/ua-parser-js/commit/5c10e2b1070abb48f4549827533877f88139df93