New issue
Advanced search Search tips

Issue 815282 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Debugging WebAPK updates is too difficult if your phone is not rooted and you are using a release version of Chrome

Project Member Reported by pkotw...@chromium.org, Feb 23 2018

Issue description

Debugging WebAPK updates is too difficult if your phone is not rooted and you are using a release version of Chrome

Suggestions:
- Check for updates when a WebAPK is launched after clearing Chrome's data
- Don't strip helpful debug messages w.r.t updates in Chrome release builds
- Surface update-related information from WebappDataStorage in chrome://webapks
 
Cc: hanxi@chromium.org yfried...@chromium.org
First point sgtm

Second one seems unlikely to be that helpful in practice (you'd have to be really lucky to see the log) but open to your ideas.

Definitely the chrome://webapks one. That was one of my original reasons for wanting that page :)


In practice, I think that for both:
- log messages
- chrome://webapks
no one will know that they exist unless a Chromie tells them.

One thing that we currently don't capture in SharedPreferences but do in logs is whether:
- the updated web page uses the same Web Manifest URL
- the updated web page adheres to the PWA checklist
We could store this in SharedPrefrences in an "error" field but I am unsure if it is worth it.
Project Member

Comment 4 by bugdroid1@chromium.org, Feb 27 2018

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

commit c2983d41b6f1c03c55a5a8937c5b8084d595c448
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Tue Feb 27 01:19:27 2018

[Android WebAPK] Check for updates when WebAPK is launched after clearing all data

This CL causes WebAPKs to check for updates on the WebAPK launch after a user
clears Chrome's data via
Android Settings > Chrome > Manage Space > Clear All Data

This simplifies debugging user issues w.r.t WebAPK updates on a release build of
Android and a release build of Chrome.

BUG= 815282 

Change-Id: I46bf75ccd3e8eb724627101e6fbdee6ad9b9eb8b
Reviewed-on: https://chromium-review.googlesource.com/936602
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Xi Han <hanxi@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539360}
[modify] https://crrev.com/c2983d41b6f1c03c55a5a8937c5b8084d595c448/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 28 2018

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

commit eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Wed Feb 28 01:48:58 2018

[Android Webapp] Rename WebappDataStorage methods to clarify time unit

This CL renames:
WebappDataStorage#getLastUsedTime() -> WebappDataStorage#getLastUsedTimeMs()
WebappDataStorage#getLastCheckForWebManifestUpdateTime() ->
    WebappDataStorage#getLastCheckForWebManifestUpdateTimeMs()
WebappDataStorage#getLastWebApkUpdateRequestCompletionTime() ->
    WebappDataStorage#getLastWebApkUpdateRequestCompletionTimeMs()

BUG= 815282 
R=dominickn
TBR=yfriedman

Change-Id: Ide507c83c0fff504a09273827342a072088cd523
Reviewed-on: https://chromium-review.googlesource.com/938592
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539642}
[modify] https://crrev.com/eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
[modify] https://crrev.com/eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
[modify] https://crrev.com/eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java
[modify] https://crrev.com/eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappRegistry.java
[modify] https://crrev.com/eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3/chrome/android/javatests/src/org/chromium/chrome/browser/preferences/privacy/ClearBrowsingDataPreferencesTest.java
[modify] https://crrev.com/eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java
[modify] https://crrev.com/eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebApkUpdateManagerUnitTest.java
[modify] https://crrev.com/eafd6ed1c7c6e95a21889b9e2fe2aac41412cbc3/chrome/android/junit/src/org/chromium/chrome/browser/webapps/WebappDataStorageTest.java

Status: Fixed (was: Started)
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 8 2018

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

commit 9d0c67e80fb11b4044892cf018da1ffea0f36b29
Author: Peter Kotwicz <pkotwicz@chromium.org>
Date: Thu Mar 08 23:38:23 2018

[Android WebAPK] Simplify debugging WebAPK updates with release Chrome

This CL:
1) Prevents the Log messages in WebApkUpdateManager from getting stripped
  in release by converting the logs from Log.v to Log.i
  The Log messages are useful for determining:
  - Whether the updated web page satisfies the PWA checklist
  - Whether an update is requested

2) Adds to chrome://webapks
   WebappDataStorage#KEY_LAST_REQUESTED_SHELL_APK_VERSION
   WebappDataStorage#KEY_RELAX_UPDATES
   These two SharedPreferences are useful for determining how long to
   wait to launch the WebAPK in order to run the update check. In the
   case of "relaxed updates", the update check is done every 30 days.

BUG= 815282 
R=dominickn@,calamity@
TBR=yfriedman@
    (for CollectionUtil.java change reviewed in another CL)

Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I87c77ca76884515f967a9bd9d331eb5c2af7bbfe
Reviewed-on: https://chromium-review.googlesource.com/936582
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541933}
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/base/android/java/src/org/chromium/base/CollectionUtil.java
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkUpdateManager.java
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/chrome/browser/android/shortcut_helper.cc
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/chrome/browser/android/webapk/webapk_info.cc
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/chrome/browser/android/webapk/webapk_info.h
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/chrome/browser/resources/webapks/about_webapks.js
[modify] https://crrev.com/9d0c67e80fb11b4044892cf018da1ffea0f36b29/chrome/browser/ui/webui/webapks_handler.cc

Sign in to add a comment