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

Frozen SamsungBrowser #1386

Closed
hejiac2023 opened this issue Apr 9, 2024 · 9 comments
Closed

Frozen SamsungBrowser #1386

hejiac2023 opened this issue Apr 9, 2024 · 9 comments

Comments

@hejiac2023
Copy link

I found a problem with this useragent.

I known this is a frozen useragent, but the OperatingSystemNameVersion : 'Android 10' let me confused, why isn't 'Android ??'.
Is there any method or api to known it's a frozen useragent? Currently i use the OperatingSystemNameVersion contain or not '??' to judge the frozen useragent.


- test:
    input:
      User-Agent  : 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/24.0 Chrome/117.0.0.0 Mobile Safari/537.36'
    expected:
      DeviceClass  : 'Phone'
      DeviceName  : 'Samsung Android Mobile'
      DeviceBrand  : 'Samsung'
      OperatingSystemClass  : 'Mobile'
      OperatingSystemName  : 'Android'
      OperatingSystemVersion  : '10'
      OperatingSystemVersionMajor  : '10'
      OperatingSystemNameVersion  : 'Android 10'
      OperatingSystemNameVersionMajor  : 'Android 10'
      LayoutEngineClass  : 'Browser'
      LayoutEngineName  : 'Blink'
      LayoutEngineVersion  : '117.0'
      LayoutEngineVersionMajor  : '117'
      LayoutEngineNameVersion  : 'Blink 117.0'
      LayoutEngineNameVersionMajor  : 'Blink 117'
      AgentClass  : 'Browser'
      AgentName  : 'SamsungBrowser'
      AgentVersion  : '24.0'
      AgentVersionMajor  : '24'
      AgentNameVersion  : 'SamsungBrowser 24.0'
      AgentNameVersionMajor  : 'SamsungBrowser 24'

@nielsbasjes nielsbasjes changed the title Bug report Frozen SamsungBrowser Apr 9, 2024
@nielsbasjes
Copy link
Owner

Yes, you are right. The Samsung browser has changed their behavior with the latest release.

@hejiac2023
Copy link
Author

hey @nielsbasjes ,this issue is not only a bug report, but also a feature requirement :)

Is there any method or api to known it's a frozen useragent?

@nielsbasjes
Copy link
Owner

I'll have a look.
Do realize that I already in know of at least 3 different ways of reducing the ua info.

@nielsbasjes
Copy link
Owner

Q: What is the usecase you would like to know this for? Im thinking perhaps simply looking at the '??' is the best way?

@hejiac2023
Copy link
Author

My usecase is to stat the real mobile os version, so i need to exclude the frozen ua, looking at '??' can do that, but just this way make me uncomfortable

@nielsbasjes
Copy link
Owner

Ok, understood.
I'll investigate what is the most reliable way to determine this.
Right now your check for '??' seems like the best option.

@nielsbasjes nielsbasjes reopened this Apr 10, 2024
@nielsbasjes
Copy link
Owner

I double checked.

Simply reporting if the UA was frozen is not an accurate answer to your question. Looking at the version and filtering it out if it is '??' is actually the correct way of doing what you are looking for.

An example is that when ClientHints are available then the UA was frozen and still the actual OS version is available.
https://github.com/nielsbasjes/yauaa/blob/main/analyzer/src/main/resources/UserAgents/Samsung.yaml#L2364-L2384

@nielsbasjes
Copy link
Owner

I have released a new version with the Samsung fix in it.

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

2 participants