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

Google Search App on Iphone is not detected properly #960

Open
slava-se opened this issue Apr 22, 2024 · 5 comments · Fixed by #966
Open

Google Search App on Iphone is not detected properly #960

slava-se opened this issue Apr 22, 2024 · 5 comments · Fixed by #966
Assignees
Labels
Milestone

Comments

@slava-se
Copy link

Google Search App on Iphone / Ipad is not detected properly

The UserAgent I receive on backend is
UA:Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) GSA/312.2.624279232 Mobile/15E148 Safari/604.1

Wangkanai.Detection.Services.DetectionService v 8.12 detects it as Safari 604.1, iOS 17.4, Mobile

whatismybrowser.com detects it properly as Google Search App 312.2 which I assume is possible through GSA/312.2 part
image

Can you please fix it so the browser is identified as other?

@wangkanai
Copy link
Owner

Thank you, I will have look later today.

@slava-se
Copy link
Author

@wangkanai thanks. It looks like google chrome on IOS is also identified wrongly
Here is the UserAgent:
UA:Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/124.0.6367.71 Mobile/15E148 Safari/604.1
It is identified as Safari 604.1

Looks like your current logic parses Safari/{XXXX} first which probably should be the last check.

@wangkanai
Copy link
Owner

wangkanai commented Apr 27, 2024

@wangkanai thanks. It looks like Google Chrome on IOS is also identified wrongly Here is the UserAgent: UA:Mozilla/5.0 (iPhone; CPU iPhone OS 17_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/124.0.6367.71 Mobile/15E148 Safari/604.1 It is identified as Safari 604.1

Looks like your current logic parses Safari/{XXXX} first which probably should be the last check.

Are you sure this is Google Chrome? Because I don't see Chrome in the UA. Also, CriOS is something new that I have never seen before.

Edit: After researching

CriOS == Chrome iOS

wangkanai added a commit that referenced this issue Apr 27, 2024
A new browser type, Google Search App, has been added to the Browser enumeration in the Detection library. Corresponding unit tests for the Google Search App have also been added to ensure proper identification and version resolution.

Ref: #960
@wangkanai wangkanai linked a pull request Apr 27, 2024 that will close this issue
@wangkanai wangkanai added this to the 8.0 milestone Apr 27, 2024
@wangkanai wangkanai added the bug label Apr 27, 2024
@wangkanai wangkanai self-assigned this Apr 27, 2024
@wangkanai
Copy link
Owner

wangkanai commented Apr 28, 2024

Done! and release Wangkanai.Detection version 8.13.0. @slava-se please check it out and feedback on any bugs.

https://www.nuget.org/packages/Wangkanai.Detection

@wangkanai wangkanai reopened this Apr 28, 2024
@slava-se
Copy link
Author

slava-se commented May 5, 2024

@wangkanai thanks for a quick fix, works as expected now. There is another thing which I don't remember to work properly - android version is always 0.0

This is the user agent from Samsung Galaxy S24 Ultra with android 14 but in my logs I see a bunch of customers having the same UA.
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36

Reading this article I see that google does it intentionally and moved useful information into user agent client hints since 2022... Is it possible to fix it as well? Thanks
https://mobiforge.com/research-analysis/the-mysterious-model-k

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

Successfully merging a pull request may close this issue.

2 participants