Will I was investigating : > the snackbar isn't displayed for a blocklisted add-on installed from AMO (using the mozAddonManager web API) As now we enabled the [mozAddonManager](https://bugzilla.mozilla.org/show_bug.cgi?id=1847172) in Fenix, the whole installation flow is handled by it, we are not getting the calls into the [Fenix interceptor](https://github.com/mozilla-mobile/firefox-android/blob/851b5c54dcf6077a9d9e51fa3837169a7f065cf4/fenix/app/src/main/java/org/mozilla/fenix/AppRequestInterceptor.kt#L86). ### On Android. We are getting the installation call in [amWebAPI.sys.mjs#54](https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/amWebAPI.sys.mjs#54) which is aware of the blocklisted error but not handled. ``` 2023-08-10 15:01:40.711 24875-25086 Web Content org.mozilla.fenix.debug E [JavaScript Error: "Got install event for unknown install 2" {file: "resource://gre/modules/amWebAPI.sys.mjs" line: 56}] receiveMessage@resource://gre/modules/amWebAPI.sys.mjs:56:21 2023-08-10 15:01:40.712 24875-25086 Web Content org.mozilla.fenix.debug E [JavaScript Error: "Got install event for unknown install 2" {file: "resource://gre/modules/amWebAPI.sys.mjs" line: 56}] receiveMessage@resource://gre/modules/amWebAPI.sys.mjs:56:21 ``` Value of `this._installMap` ``` Object { window: Window, broker: {…}, id: 0, state: "STATE_CANCELLED", error: "ERROR_BLOCKLISTED", progress: 10677, maxProgress: 10677, event: "onDownloadCancelled", … } ``` ### On desktop. We have different path which handles and shows an error message: [browser-addons.js#75](https://searchfox.org/mozilla-central/source/browser/base/content/browser-addons.js#75) and [browser-addons.js#903](https://searchfox.org/mozilla-central/source/browser/base/content/browser-addons.js#903). No sure, how we should surface the error? Should we show a native error? If so we will need add new listeners to capture the errors from the `mozAddonManager`
Bug 1848100 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
> the snackbar isn't displayed for a blocklisted add-on installed from AMO (using the mozAddonManager web API) As now we enabled the [mozAddonManager](https://bugzilla.mozilla.org/show_bug.cgi?id=1847172) in Fenix, the whole installation flow is handled by it, we are not getting the calls into the [Fenix interceptor](https://github.com/mozilla-mobile/firefox-android/blob/851b5c54dcf6077a9d9e51fa3837169a7f065cf4/fenix/app/src/main/java/org/mozilla/fenix/AppRequestInterceptor.kt#L86). ### On Android. We are getting the installation call in [amWebAPI.sys.mjs#54](https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/amWebAPI.sys.mjs#54) which is aware of the blocklisted error but not handled. ``` 2023-08-10 15:01:40.711 24875-25086 Web Content org.mozilla.fenix.debug E [JavaScript Error: "Got install event for unknown install 2" {file: "resource://gre/modules/amWebAPI.sys.mjs" line: 56}] receiveMessage@resource://gre/modules/amWebAPI.sys.mjs:56:21 2023-08-10 15:01:40.712 24875-25086 Web Content org.mozilla.fenix.debug E [JavaScript Error: "Got install event for unknown install 2" {file: "resource://gre/modules/amWebAPI.sys.mjs" line: 56}] receiveMessage@resource://gre/modules/amWebAPI.sys.mjs:56:21 ``` Value of `this._installMap` ``` Object { window: Window, broker: {…}, id: 0, state: "STATE_CANCELLED", error: "ERROR_BLOCKLISTED", progress: 10677, maxProgress: 10677, event: "onDownloadCancelled", … } ``` ### On desktop. We have different path which handles and shows an error message: [browser-addons.js#75](https://searchfox.org/mozilla-central/source/browser/base/content/browser-addons.js#75) and [browser-addons.js#903](https://searchfox.org/mozilla-central/source/browser/base/content/browser-addons.js#903). No sure, how we should surface the error? Should we show a native error? If so we will need add new listeners to capture the errors from the `mozAddonManager`