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

Electron mobile app detection changes some browser/pim detections #7668

Open
mneudert opened this issue Apr 24, 2024 · 1 comment
Open

Electron mobile app detection changes some browser/pim detections #7668

mneudert opened this issue Apr 24, 2024 · 1 comment

Comments

@mneudert
Copy link
Member

The recently added Electron mobile app detection changed some of the results for PIMs and browsers.

At the moment the parser priority prefers the Electron mobile app detection over, for example, a separate PIM detection. This results in the PIM "Franz" being detected as a mobile app (fixture link) due to the matching Electron fragment:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Franz/5.4.1 Chrome/76.0.3809.146 Electron/6.0.10 Safari/537.36

This mobile app priority detection also changed some of the names detected if the full parser list is used instead of the individual parsers.

The list of potentially unintended changes I know of:

# browsers detected as mobile apps
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Colibri/1.16.0 Chrome/78.0.3904.99 Electron/7.1.1 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Polypane/2.1.2 Chrome/78.0.3904.130 Electron/7.1.12 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Sizzy/0.0.21 Chrome/73.0.3683.121 Electron/5.0.2 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) TweakStyle/0.9.2 Chrome/49.0.2623.75 Electron/0.37.5 Safari/537.36 (Tab 1)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) VibeMate/1.9.2 Chrome/104.0.5112.81 Electron/20.0.1 Safari/537.36
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) LTBrowser/1.5.1 Chrome/80.0.3987.163 Electron/8.5.5 Safari/537.36

# browsers detected as mobile apps with a name change
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) BeakerBrowser/0.8.2 Chrome/66.0.3359.181 Electron/3.0.9 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) catalyst/3.5.3 Chrome/116.0.5845.190 Electron/26.2.4 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) dBrowser/1.0.0 Chrome/84.0.4129.0 Electron/10.0.0-beta.2 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) FlashBrowser/1.0.0 Chrome/83.0.4103.122 Electron/9.1.0 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) GlassBrowser/0.5.0 Chrome/56.0.2924.87 Electron/1.6.15 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) OhHaiBrowser/3.3.0 Chrome/69.0.3497.106 Electron/4.0.4 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) SushiBrowser/0.32.0 Chrome/85.0.4183.121 Electron/10.1.3 Safari/537.36
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) LTBrowser/1.5.1 Chrome/80.0.3987.163 Electron/8.5.5 Safari/537.36

# pims detected as mobile apps
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Franz/5.4.1 Chrome/76.0.3809.146 Electron/6.0.10 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) BlueMail/0.10.31 Chrome/61.0.3163.100 Electron/2.0.18 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Evernote/10.8.5 Chrome/87.0.4280.88 Electron/11.1.1 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Notion/2.0.8 Chrome/76.0.3809.146 Electron/6.1.5 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ramboxpro/1.5.2 Chrome/83.0.4103.122 Electron/9.4.4 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ramboxpro/1.5.2 Chrome/83.0.4103.122 Electron/9.4.4 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Mailspring/1.7.4 Chrome/69.0.3497.128 Electron/4.2.2 Safari/537.36

# pims detected as mobile apps with a name change
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Basecamp3/2.1.0 Chrome/78.0.3904.130 Electron/7.1.5 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) ramboxpro/1.5.2 Chrome/83.0.4103.122 Electron/9.4.4 Safari/537.36

Detailed result example for the Sushi Browser:

DeviceDetector\DeviceDetector::getInfoFromUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) SushiBrowser/0.32.0 Chrome/85.0.4183.121 Electron/10.1.3 Safari/537.36')

// pre Electron client
[
  'type'           => 'browser',
  'name'           => 'Sushi Browser',
  'version'        => '0.32',
  'engine'         => 'Blink',
  'engine_version' => '85.0.4183.121',
]

// post Electron client
[
  'type'    => 'mobile app',
  'name'    => 'SushiBrowser',
  'version' => '0.32',
]

If those changes are indeed unintended, the solution could potentially be a changed parser order, i.e. moving "mobile app" as the least specific client type to the last position.

In general it could be a good thing to test all specific fixtures using the generic detection. This may catch all the unintended side effects between the individual parsers otherwise going unnoticed.

@liviuconcioiu
Copy link
Collaborator

If those changes are indeed unintended

It's my fault for the bug. Changes weren't intended.

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