You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Web Install] Distinguish AbortErrors caused by user cancellation #1223
Currently, navigator.install()'s promise can resolve in 1 of 3 ways
Success
AbortError: The user aborted a request.
DataError: The data provided does not meet requirements.
For privacy reasons, AbortError is used as a generic failure code for any non-data related errors. This includes if the user declines the installation dialog.
We should consider changing the message string so that it only says "The user aborted a request" when the user actually clicked "cancel" in the install confirmation prompt.
Motivation - enables developers to show an error message only if something actually failed, and not if the user cancelled installation.
changed the title [-][Web Install] Add custom error message for user cancellation of install[/-][+][Web Install] Distinguish AbortErrors caused by user cancellation[/+]on Jan 6, 2026
We should consider changing the message string so that it only says "The user aborted a request" when the user actually clicked "cancel" in the install confirmation prompt.
Does that error message change based on browser locale? If so, I'd suggest an alternative that doesn't rely on error message string.
As a developer I want to do this:
try{navigator.install(url,manifestId);}catch(error){// If the user cancelled, log it. Otherwise, show an error to the user.constisUserCancellation= ...;// how?if(isUserCancellation){telemetry.log("WebInstallCancelled",error);}else{showErrorInUI(error);}}
Today, I can't reliably do that. I can check if there's a data error, but if it's an AbortError, it could be the user cancelling, or it could be some other problem.
Judah Gabriel Himango (@JudahGabriel) Ah good point. Sounds like we may actually want separate DOM exceptions then for user cancellation vs other generic failures. Thanks!
Chrome currently uses AbortError for both user cancellation and certain internal installation failures. The only way to distinguish them is by checking the error message.
This makes it difficult to collect meaningful installation telemetry. For example, if an installation fails, developers need to know whether the user simply dismissed the dialog or something actually went wrong.
Relying on error message strings isn't a reliable solution, especially across browser versions.
I think user cancellation should have its own exception type. It's a normal user decision, not an installation failure, and developers should be able to distinguish the two without relying on string matching.
Activity
[-][Web Install] Add custom error message for user cancellation of install[/-][+][Web Install] Distinguish AbortErrors caused by user cancellation[/+]JudahGabriel commentedon Jan 6, 2026
Does that error message change based on browser locale? If so, I'd suggest an alternative that doesn't rely on error message string.
As a developer I want to do this:
Today, I can't reliably do that. I can check if there's a data error, but if it's an AbortError, it could be the user cancelling, or it could be some other problem.
LiaHiscock commentedon Jan 8, 2026
Judah Gabriel Himango (@JudahGabriel) Ah good point. Sounds like we may actually want separate DOM exceptions then for user cancellation vs other generic failures. Thanks!
cmzz commentedon Oct 20, 2026
I've been tracking
navigator.install()compatibility on [openpwa.net](https://openpwa.net), and there's another issue worth considering: error handling.Chrome currently uses
AbortErrorfor both user cancellation and certain internal installation failures. The only way to distinguish them is by checking the error message.This makes it difficult to collect meaningful installation telemetry. For example, if an installation fails, developers need to know whether the user simply dismissed the dialog or something actually went wrong.
Relying on error message strings isn't a reliable solution, especially across browser versions.
I think user cancellation should have its own exception type. It's a normal user decision, not an installation failure, and developers should be able to distinguish the two without relying on string matching.
I've been documenting the API behavior here:
https://openpwa.net/reference/installation/navigator-install/
LiaHiscock commentedon Oct 27, 2026
cmzz - thank you for the feedback! This has been requested by a couple other developers, and we recognize this would help developer usability. While we're not blocking shipping on this, we will definitely re-evaluate as a post-ship followup. Here's the chromium work item if you're curious - https://issues.chromium.org/issues/534847491
FYI Kristin Lee (@Kbhlee2121) Rob Paveza (@robpaveza) - another request for distinguishing user cancellation abort errors