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

OS version mismatch from a browser to another #677

Closed maphe closed 8 months ago

maphe commented 9 months ago

Library version Demo page

For the issue related with detection result, you can use the demo section in https://uaparser.js.org to confirm

Describe the bug Using the demo page on Chrome User-Agent on screen:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

OS in json:

  "os": {
    "name": "macOS",
    "version": "14.0.0"
  }

Now opening the demo page on Safari: UA:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15

OS:

  "os": {
    "name": "macOS",
    "version": "10.15.7"
  }

Expected behavior It should show version: 14.0.0 for both.

Additional context For some reason, when I run it locally on my project, with 2.0.0-alpha3 on Chrome, I get the Safari behavior (os version 10.15.7)

coderpradp commented 9 months ago

Duplicate of #659 Also there's an explanation here of the real issue which seems not to be with this library