Amphtml: amp-sticky-ad is hidden in Google search on iOS when app banner is visible

Created on 9 Jul 2018  Â·  12Comments  Â·  Source: ampproject/amphtml

What's the issue?

On iOS, when the Google app is installed, an app banner is shown above the amp viewer. The app banner pushes the amp-sticky-ad unit down, in Safari's scrolled and non-scrolled UI states. The banner sometimes shows intermittently for the same page.

screen shot 2018-07-09 at 5 22 30 pm

On the left, the Google app is installed. On the right, the Google app is not installed.

Additional examples of the sticky footer issue on other sites, on another phone: CBS and CNN.

How do we reproduce the issue?

  1. Install the Google app on iOS
  2. Search for something that will produce an AMP result, like "Emotionless lyrics"
  3. Tap the AMP result and observe the app banner
  4. If the banner doesn't show immediately, scroll down and then up again
  5. If the banner doesn't show at all, reload

What browsers are affected?

iOS Safari, iOS 11.3.1

Which AMP version is affected?

1530567757224 and probably more

Suggestion

There are a mix of issues present here, including a Safari bug where an app banner pushes position: fixed; bottom: 0 elements below the Safari UI. AMP has no control over Safari, but the issue may be fixed by excluding amp viewer pages in Google's Apple app site association manifest. There are already some amp rules present:

      {
         "appID": "EQHXZ8M8AV.com.google.GoogleMobile.dev",
         "paths": [
            "NOT /amp",
            "/search"
          ]
      },
      {
         "appID": "4ANB9W7R3P.com.google.GoogleMobile.dogfood",
         "paths": [
            "NOT /amp",
            "/search"
          ]
      },
Externally Tracked Soon Bug monetization

All 12 comments

:( that new Safari open in app thing breaking the web. /to @lannka @zhouyx

/cc @jridgewell

How often this problem is seen on iOS? Marking it P2 for now and this is definitely something we should fix next week.

@lannka When I reported the bug I was able to reproduce on every page load. I can't reproduce anymore, on my device or another that I tested. I know Safari saves smart app banner preferences e.g. if you close or open from a banner, the banner will never re-appear. You can reset all Safari cached data, but I think the only perfect way to test this is to install the Google app on a fresh iOS install, and to go through my reproduction steps.

This is actually a Viewer issue. The viewer needs to tell us that the bottom of the page is not actually the full height of the iframe, but height - openInApp.

b/111406883

We have disabled the "Open in App" banner until we can work on a fix with Apple.

thanks for the update and fix @jridgewell !

the intended functionality here seems a bit odd though— should Google be showing the "open in app" banner for the Google app on non-Google content displayed in the AMP viewer? if anything shouldn't it show the publisher-specific "open in app" banner if there is one?

It was never intended to show on the AMP Viewer, only regular search. But Safari doesn't detect changes in the URL when using pushState or replaceState. So when we displayed the viewer, Safari still thought we were on regular search and showed the banner.

that makes sense, thanks for clarifying @jridgewell

This issue hasn't been updated in awhile. @zhouyx Do you have any updates?

Since the issue has been tracked and fixed externally. I am going to close it. Please feel free to reopen if you still see this. Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sryze picture sryze  Â·  3Comments

mkhatib picture mkhatib  Â·  3Comments

sryze picture sryze  Â·  3Comments

edhollinghurst picture edhollinghurst  Â·  3Comments

choumx picture choumx  Â·  3Comments