Skip to content

How to best surface data errors #16

@Kbhlee2121

Description

@Kbhlee2121

Current implementation:
The WebInstallServiceResult is provided from WebInstallServiceImpl to HTMLInstallElement::OnInstallResult(). WebInstallServiceResult has 3 possible results: kSuccess, kAbortError, and kDataError.

Proposal: Good to keep as is

The question is how do we want to handle kDataError. Options to consider (but open to more ideas):

  • Fire promptdismiss (same as kAbortError)
    • Probably difficult for developers to differentiate from kAbortErrors and kDataErrors and take appropriate actions.
  • Update and add new invalidReason (existing read-only InPagePermissionMixinBlockerReason that will block the element from being activated. Potential name: install_data_invalid (Naming not finalized).
  • Do both A and B.
  • Create a new read-only InPagePermissionMixinBlockerReason similar to invalidReason, such as installDataInvalid. (Naming not finalized).
  • Create a new Event and event handler similar to promptdismiss and onpromptdismiss, such as promptinvalid since data errors are typically also a result of a user interaction. (Naming not finalized).

NOTE: WebInstallServiceResults are mapped to install_result_code.h - Chromium Code Search

  • kSuccess
    • InstallResultcode::kSuccess
    • InstallResultcode:: kSuccessAlreadyInstalled
  • kAbortError
    • InstallResultCode::kUserInstallDeclined - User declines install or launch dialog
    • Render frame host is null
    • file:// or chrome:// urls used
    • Permission denied by user (in content settings or page info)
    • Unsupported profiles (Incognito or guest mode)
    • Current web contents is being installed via another method
    • Default for all other unexpected failures such as the browser crashing, network issues, etc.
  • kDataError
    • InstallResultCode::kNoCustomManifestId - For . No custom manifest id found in the manifest loaded from the provided install_url.
    • InstallResultCode::kManifestIdMismatch - For
    • InstallResultCode::kInstallURLLoadFailed - WebAppUrlLoader failed to load installurl
    • InstallResultCode::kInstallURLRedirected - A redirecting installurl was used which currently isn’t supported. See crbug.com/471021583
    • InstallResultCode::kNotValidManifestForWebApp - No valid manifest found
    • InstallResultCode::kNotInstallable - Web App is not considered installable, i.e. missing manifest fields, no service worker, etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions