Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device Type is undefined on Mac Desktop #653

Open
tgowing opened this issue May 29, 2023 · 5 comments
Open

Device Type is undefined on Mac Desktop #653

tgowing opened this issue May 29, 2023 · 5 comments

Comments

@tgowing
Copy link

tgowing commented May 29, 2023

Describe the bug
I am using a Mac computer and the device type is undefined. This is the object that ua-parser is producing.

{
    "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36",
    "browser": {
        "name": "Chrome",
        "version": "113.0.0.0",
        "major": "113"
    },
    "engine": {
        "name": "Blink",
        "version": "113.0.0.0"
    },
    "os": {
        "name": "Mac OS",
        "version": "10.15.7"
    },
    "device": {
        "vendor": "Apple",
        "model": "Macintosh",
        **"type":  "undefined"**
    },
    "cpu": {}
}

To Reproduce
Steps to reproduce the behavior:

var uap = new UAParser();
console.log(uap.getResult());
@enkot
Copy link

enkot commented Jul 14, 2023

I can confirm that the device type is undefined for this Mac user agent:

import UAParser from "ua-parser-js"

const parser = new UAParser('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36')

console.log(parser.getDevice())

Result:

{ vendor: 'Apple', model: 'Macintosh', type: undefined }

@marmotz
Copy link

marmotz commented Aug 10, 2023

Not same OS, but there is a similar problem with my UA:

import UAParser from "ua-parser-js"

const parser = new UAParser('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36')

console.log(parser.getDevice())

Result:

{ vendor: undefined, model: undefined, type: undefined }

@majid4466
Copy link

Same here.

With UAParser.js v2.0.0-alpha.3, this UA: "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0"
gives undefined for type, model and vendor:

Object { type: undefined, model: undefined, vendor: undefined }

@kblestarge
Copy link

This is happening for me on both version 1.0.37 and 2.0.0-beta.2. Can someone fix this?

@muametgrooby
Copy link

This is not a bug, there's no such thing as desktop type, read more about it here: #182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants