ua-parser-js icon indicating copy to clipboard operation
ua-parser-js copied to clipboard

Samsung galaxy tab s8 and s9 devices are not recognised

Open JDWaghela opened this issue 1 year ago • 6 comments

Library version 0.7.30

Describe the bug Samsung Galaxy Tab s8 and s9 are returning empty object in below code const { device } = UAParser(); Therefore we're not able to identified that these devices are tablet, and instead it is behaving like desktop mode.

To Reproduce Steps to reproduce the behavior:

const { device } = UAParser(); console.log(device); // resulting output is {}

Expected behavior It should return device type as tablet

Screenshots image

Smartphone (please complete the following information):

  • Device: Samsung Galaxy Tablet s8 & s9
  • OS: Android
  • Browser : Chrome

JDWaghela avatar Aug 16 '24 12:08 JDWaghela

Hi, can I get a confirmation of the detection result from https://uaparser.dev/?

faisalman avatar Aug 20 '24 07:08 faisalman

https://uaparser.dev/

@faisalman Please find below response from that site in tablets

Samsung Galaxy Tablet S8

{
  "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36",
  "browser": {
    "name": "Chrome",
    "version": "123.0.6312.40",
    "major": "123"
  },
  "cpu": {
    "architecture": "amd64"
  },
  "device": {},
  "engine": {
    "name": "Blink",
    "version": "123.0.0.0"
  },
  "os": {
    "name": "Linux",
    "version": ""
  }
}

Samsung Galaxy Tablet S9

{
  "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
  "browser": {
    "name": "Chrome",
    "version": "127.0.6533.64",
    "major": "127"
  },
  "cpu": {
    "architecture": "amd64"
  },
  "device": {},
  "engine": {
    "name": "Blink",
    "version": "127.0.0.0"
  },
  "os": {
    "name": "Linux",
    "version": ""
  }
}

JDWaghela avatar Aug 21 '24 07:08 JDWaghela

Hello @faisalman, A similar problem has occurred with Galaxy Note 9. Could you please check as well?

The result from https://uaparser.dev is as below.

{
  "ua": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36",
  "browser": {
    "name": "Chrome",
    "version": "127.0.6533.103",
    "major": "127"
  },
  "cpu": {},
  "device": {
    "type": "mobile",
    "model": "SM-N960N"
  },
  "engine": {
    "name": "Blink",
    "version": "127.0.0.0"
  },
  "os": {
    "name": "Android",
    "version": "10.0.0"
  }
}

But using ua-parse-js(1.0.38), the result is as below(device is empty).

image

developersoom avatar Aug 29 '24 01:08 developersoom

I'm trying to use the library in our project, and this is exact issue we facing. Seems vendors are trying to market these tablets as desktop replacement. "linux"iswhat is really upsetting me

mastrobardo avatar Sep 23 '24 08:09 mastrobardo

Hello @faisalman, A similar problem has occurred with Galaxy Note 9. Could you please check as well?

The result from https://uaparser.dev is as below.

{
  "ua": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36",
  "browser": {
    "name": "Chrome",
    "version": "127.0.6533.103",
    "major": "127"
  },
  "cpu": {},
  "device": {
    "type": "mobile",
    "model": "SM-N960N"
  },
  "engine": {
    "name": "Blink",
    "version": "127.0.0.0"
  },
  "os": {
    "name": "Android",
    "version": "10.0.0"
  }
}

But using ua-parse-js(1.0.38), the result is as below(device is empty).

image

image galaxy s9 on browserstack. android is never cited. Even worst, we dont know the model

mastrobardo avatar Sep 23 '24 08:09 mastrobardo

I experience a similar issues while using test devices on browserstack: image

In this example device is missing type field while based on the operating system it's obviously a mobile device

stnedelchev-fadv avatar Nov 22 '24 13:11 stnedelchev-fadv