New issue
Advanced search Search tips

Issue 604262 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 609258



Sign in to add a comment

Launching a Web APK when phone is not connected to the internet causes Web APK to infinitely bounce between Chrome and Web APK

Project Member Reported by pkotw...@chromium.org, Apr 17 2016

Issue description

Repro steps;
1) Turn Wifi off
2) Launch Web APK

Expected:
Web APK shows the "You are offline" interstitial either in Chrome or Web APK
Actual:
Every second Web APK switches between whether the "You are offline" interstitial is shown by Chrome or the Web APK
 
Labels: WebAPKS RestrictViewGoogle
Owner: yfried...@chromium.org
Status: Assigned (was: Untriaged)
Oh cool, thanks for finding a repro! I saw something like this last week but didn't figure it out. I'll pick it up.
Labels: -RestrictViewGoogle Restrict-View-Google
Owner: pkotw...@chromium.org
Components: Mobile>WebAPKs
Blocking: -524670
For regular Chrome TabRedirectHandler#shouldStayInChrome() prevents Chrome from showing the intent picker when the page is reloaded due to lack of WiFi

During session restore a PAGE_TRANSITION_RELOAD page transition is used for the initial page load (https://cs.chromium.org/chromium/src/components/sessions/content/content_serialized_navigation_builder.cc?rcl=0&l=48). This prevents the intent picker from showing up when launching Chrome when there is no WiFi

WebAPKs use a PageTransition.AUTO_TOPLEVEL page transition for the start URL. Should we change this?
Labels: -Restrict-View-Google -WebAPKS
Not sure how "reloaded" necessarily factors in as you could click a webapk icon with no history and still have the same issue.

I assume we need to change the "bounce out of webapk" logic to factor in the offline interstitial. Unfortunately, I'm not really familiar with how that works so if you have a better understanding, happy to discuss further
Status: Started (was: Assigned)
When Chrome is offline, NetErrorHelper asynchronously reloads the page NetErrorHelper::ReloadPage()
- ExternalNavigationHelper does not know that this is a reload. The page transition type is PageTransition.LINK
- There is no referrer so all of the logic to check whether the resolvers of the referrer URL are the same as the resolvers of the target URL is bypassed

Assigning bug to Yaron because he said he would look at it.

One crazy idea is that perhaps TabRedirectHandler#shouldStayInChrome() should return true if the initial transition is PageTransition.AUTO_TOPLEVEL
Owner: yfried...@chromium.org
Status: Assigned (was: Started)
Blocking: 609258
Project Member

Comment 13 by bugdroid1@chromium.org, Aug 9 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d8738f516886add11bb0661c0f8e21ac4c4e637

commit 6d8738f516886add11bb0661c0f8e21ac4c4e637
Author: yfriedman <yfriedman@chromium.org>
Date: Tue Aug 09 20:12:15 2016

[WebApks] Tweak logic for 'bouncing back to chrome'

Previously a reload of a page inside a WebApk can erroneously redirect
back to Chrome (see bug for further details). Unfortunately, due to the
display logic of WebApks, we can't rely on startActivity doing the right
thing because Android can't tell that the MainActivity for the shell apk
is just a 'bouncer' to chrome's WebApkActivity. Add a necessary short-circuit.
BUG= 604262 

Review-Url: https://codereview.chromium.org/2225893004
Cr-Commit-Position: refs/heads/master@{#410788}

[modify] https://crrev.com/6d8738f516886add11bb0661c0f8e21ac4c4e637/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
[modify] https://crrev.com/6d8738f516886add11bb0661c0f8e21ac4c4e637/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java

Status: Fixed (was: Assigned)

Sign in to add a comment