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

Unsupported browser version in Chrome iPhone responsive mode #14362

Open
HawkSK opened this issue Aug 16, 2022 · 2 comments
Open

Unsupported browser version in Chrome iPhone responsive mode #14362

HawkSK opened this issue Aug 16, 2022 · 2 comments

Comments

@HawkSK
Copy link

HawkSK commented Aug 16, 2022

Description of the bug

When using the latest Chrome in responsive layout with iPhone emulation (any of the choices iPhone SE, iPhone XR or iPhone 12 Pro) I get the user agent

Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1

which is resolved by isTooOldToFunctionProperly to true. This result in the error page provided by UnsupportedBrowserHandler with header

I'm sorry, but your browser is not supported

In contrast, while using Edge, the user agent is very similar, but is supported.

Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/104.0.5112.81

Expected behavior

Vaadin app should be usable in Chrome responsive layout with iPhone emulation.

Minimal reproducible example

public class VaadinBrowserDetailsTest {
    private static final String USER_AGENT_RESPONSIVE_EDGE_IPHONE = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/104.0.5112.81";
    private static final String USER_AGENT_RESPONSIVE_CHROME_IPHONE = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1";
    @Test
    public void testEdge() {
        var details = new BrowserDetails(USER_AGENT_RESPONSIVE_EDGE_IPHONE);
        Assertions.assertFalse(details.isTooOldToFunctionProperly()); // passes
    }
    @Test
    public void testChrome() {
        var details = new BrowserDetails(USER_AGENT_RESPONSIVE_CHROME_IPHONE);
        Assertions.assertFalse(details.isTooOldToFunctionProperly()); // fails
    }
}

Versions

  • Vaadin / Flow version: 23.1.1
  • Java version: 17
  • OS version: Windows 10, Windows 11
  • Browser version:
    -- Chrome Version 104.0.5112.81 (Official Build) (64-bit)
    -- Microsoft Edge Version 104.0.1293.54 (Official build) (64-bit)
@HawkSK HawkSK changed the title Unsupported browser version in Chrome responsive mode Unsupported browser version in Chrome iPhone responsive mode Aug 16, 2022
@mcollovati
Copy link
Collaborator

mcollovati commented Aug 18, 2022

For Edge we check browser version (Edg/104.0.5112.81) to be at least 79, whereas for IPhone we check operating system version (OS 13_2_3 like Mac OS X) to be at least 14.7 when browser version (Version/13.0.3) is less than 14 (see #11654 and #13271) .

@mcollovati
Copy link
Collaborator

Related to #14366

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🔖 Normal Priority (P2)
Development

No branches or pull requests

3 participants