New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 886146 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

PWA Installation kPreviouslyUninstalled error makes it tough to debug issues

Project Member Reported by jlklein@chromium.org, Sep 19

Issue description

When debugging and testing the Android Messages PWA, I've noticed that if I uninstall the PWA, and then try to re-install it, I get the kPreviouslyUninstalled error code. Is this always intended? Some of our install flows are user-driven (going through setup again, triggering it from settings, etc). It seems pretty broken to me not to let users re-install the app like that.

It also makes things sort of tricky to test and debug. Is there an easy way to clear that state?
 
Labels: Android-Messages-CrOS
Cc: nigeltao@chromium.org
Cc: -nigeltao@chromium.org
Owner: nigeltao@chromium.org
Nigel, could you take a look at this?
Labels: -Pri-2 Pri-1
Specifically, does this only happen when you trigger the reinstallation via the Better Together flow / settings? You can still explicitly go to the site URL in Chrome and use 3-dot menu -> install to work?

I think the key issue is that ExtensionsIdsMap needs to observe ExtensionRegistry (specifically the OnExtensionUninstalled method) and clear any URL -> extension mapping if the extension is uninstalled (perhaps filtering by particular reasons). This seems like something we need to fix urgently if you have flows other than first run that rely on it working.
Yep, Dominick, that's correct. Installing from the 3-dot menu still works. We would like for this use case to work because users can uninstall the app without knowing what it does and then would later go into Better Together settings and click "Set Up" for Android Messages. We want that to install and open the PWA.
Tests still need to be written, but please see if you like the overall approach in https://chromium-review.googlesource.com/c/chromium/src/+/1235254 "Let PendingBookmarkAppManager override uninstalls"
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 26

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

commit a9605dfdfbce570599f30366db8139befe80b323
Author: Nigel Tao <nigeltao@chromium.org>
Date: Wed Sep 26 02:16:30 2018

Let PendingBookmarkAppManager override uninstalls

Prior to this commit, the PBAM would skip installing an app that the
user had previously, explicitly uninstalled. The theory being that PBAM
was usually invoked by implicit installation (e.g. default-installed or
policy-installed apps), and explicit user action should trump implicit
action. Furthermore, the implicit installation was often run many times,
e.g. on every Chrome OS login, and when a user uninstalls such an app,
it should not be magically re-installed the next time they log in.

Some PBAM users (Android SMS) install an app infrequently, such as on
first login and on triggering re-installation via settings. The latter
are also due to explicit user action, rather than being an implicit
ambient install. Such installation attempts should be able to override a
user's previous uninstallation.

Bug:  886146 
Change-Id: I83db7db22c6ac7233774d13e0d680c4ba2c762de
Reviewed-on: https://chromium-review.googlesource.com/1235254
Commit-Queue: Nigel Tao <nigeltao@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Jeremy Klein <jlklein@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594188}
[modify] https://crrev.com/a9605dfdfbce570599f30366db8139befe80b323/chrome/browser/chromeos/multidevice_setup/android_sms_app_helper_delegate_impl.cc
[modify] https://crrev.com/a9605dfdfbce570599f30366db8139befe80b323/chrome/browser/chromeos/multidevice_setup/android_sms_app_helper_delegate_impl_unittest.cc
[modify] https://crrev.com/a9605dfdfbce570599f30366db8139befe80b323/chrome/browser/web_applications/components/pending_app_manager.cc
[modify] https://crrev.com/a9605dfdfbce570599f30366db8139befe80b323/chrome/browser/web_applications/components/pending_app_manager.h
[modify] https://crrev.com/a9605dfdfbce570599f30366db8139befe80b323/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.cc
[modify] https://crrev.com/a9605dfdfbce570599f30366db8139befe80b323/chrome/browser/web_applications/extensions/pending_bookmark_app_manager_unittest.cc

Triage nag: This Chrome OS bug has an owner but no component. Please add a component so that this can be tracked by the relevant team.
Components: UI>Browser>WebAppInstalls
Status: Fixed (was: Assigned)

Sign in to add a comment