Display the error message when versions for blocked versions on AMO detail pages
Categories
(Fenix :: WebExtensions, defect, P1)
Tracking
(firefox117 wontfix, firefox118 wontfix, firefox119 fixed)
People
(Reporter: irusiczki, Assigned: amejia)
References
Details
(Whiteboard: [addons-jira])
Attachments
(8 files)
91.96 KB,
image/png
|
Details | |
130.32 KB,
image/png
|
Details | |
198.19 KB,
image/png
|
Details | |
59 bytes,
text/x-github-pull-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
59 bytes,
text/x-github-pull-request
|
Details | Review | |
59 bytes,
text/x-github-pull-request
|
Details | Review | |
66.09 KB,
image/png
|
Details |
Steps to reproduce
- From AMO stage I tried to install addons from the Android collection https://addons.allizom.org/en-US/android/
- Some cannot be installed because of the blocklisting
Expected behavior
They should show the error that is displayed by addon manager.
Actual behavior
A continuous transition state of the button.
Device information
- Firefox version: 118.0
- Android device model: Pixel
- Android OS version: 10.0
Reporter | ||
Comment 1•1 year ago
|
||
This is the message shown in addon manager
Updated•1 year ago
|
Updated•1 year ago
|
Comment 2•1 year ago
|
||
:amejia could you look into this please? I see two problems here:
- the snackbar isn't displayed for a blocklisted add-on installed from AMO (using the
mozAddonManager
web API) - the error message is truncated, which isn't great
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 3•1 year ago
•
|
||
(In reply to William Durand [:willdurand] from comment #2)
:amejia could you look into this please? I see two problems here:
- the snackbar isn't displayed for a blocklisted add-on installed from AMO (using the
mozAddonManager
web API)- the error message is truncated, which isn't great
Sure, I'll take a look!
- the error message is truncated, which isn't great
Maybe we should switch from the snackBar to a dialog where we will have more space, and time for users to read the whole message, wdyt? Normally snackBars are use for showing short messages.
Updated•1 year ago
|
Comment 4•1 year ago
|
||
Arturo, do you mind adding a severity to the ticket? :)
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 5•1 year ago
|
||
Sure, I added it :)
Assignee | ||
Comment 6•1 year ago
•
|
||
the snackbar isn't displayed for a blocklisted add-on installed from AMO (using the mozAddonManager web API)
As now we enabled the mozAddonManager in Fenix, the whole installation flow is handled by it, we are not getting the calls into the Fenix interceptor.
On Android.
We are getting the installation call in 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 and 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
Assignee | ||
Comment 7•1 year ago
|
||
Also noticed the AMO website is not aware of the error and shows a infinite loading state in a the button.
Comment 8•1 year ago
|
||
Assignee | ||
Comment 9•1 year ago
|
||
- the snackbar isn't displayed for a blocklisted add-on installed from AMO (using the mozAddonManager web API)
Put a patch for addressing 1), I think having a dialog is more user friendly than using a snackbar as this is a security messages which we want users to read carefully, it' is challenging with the snackbar, which doesn't provide a lot of space and disappears in X amount of seconds, even if the user didn't have time to read.
Reporter | ||
Comment 10•1 year ago
|
||
Forgot to add some info.
I could reproduce the issue with the following URLs from AMO Stage:
https://addons.allizom.org/en-US/android/addon/gecko_android/
https://addons.allizom.org/en-US/android/addon/gecko_android113/
https://addons.allizom.org/en-US/android/addon/strict_min_114_mv3/
https://addons.allizom.org/en-US/android/addon/hello-again-fenix-114-0/
https://addons.allizom.org/en-US/android/addon/onenote-clipper/
Comment 11•1 year ago
|
||
(In reply to Arturo Mejia [:amejia] from comment #9)
- the snackbar isn't displayed for a blocklisted add-on installed from AMO (using the mozAddonManager web API)
Put a patch for addressing 1), I think having a dialog is more user friendly than using a snackbar as this is a security messages which we want users to read carefully, it' is challenging with the snackbar, which doesn't provide a lot of space and disappears in X amount of seconds, even if the user didn't have time to read.
Yeah, there were discussions about doing that but no final decision yet. In any case, this should be done for all install errors, so I filed Bug 1848297 for that.
Comment 12•1 year ago
|
||
(In reply to Arturo Mejia [:amejia] from comment #6)
the snackbar isn't displayed for a blocklisted add-on installed from AMO (using the mozAddonManager web API)
As now we enabled the mozAddonManager in Fenix, the whole installation flow is handled by it, we are not getting the calls into the Fenix interceptor.
On Android.
We are getting the installation call in 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 and 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
I think we'll need to listen to the addon-install-failed
topic somewhere in GeckoViewWebExtension
, and from there, we call some delegate (method), e.g. onAddonInstallFailed()
. When Fenix receives the event, it should show a snackbar dialog.
With that being said, most of the errors seem to be about edge cases users won't be able to trigger on their own. For instance, AMO cannot show blocked add-ons, except when we start mixing envs like here (in comment 0, it's mentioned that the AMO stage env is used). Maybe we could use this opportunity (i.e. this bug) to implement the topic observer + delegate/method for the future, though. I think most errors in browser-addons.js#75 won't apply for GA.
Assignee | ||
Comment 13•1 year ago
|
||
Updated•1 year ago
|
Comment 14•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 15•1 year ago
|
||
Comment 16•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Updated•1 year ago
|
Comment 17•1 year ago
|
||
Authored by https://github.com/Amejia481
https://github.com/mozilla-mobile/firefox-android/commit/e2795e7b9e7d2f98b71f9a117adfc662bf3d5f1f
[main] Bug 1848100 - Implement add-ons installation failed listener
Assignee | ||
Comment 18•1 year ago
|
||
As the patch landed on main
, it is ready for QA verification :)
Comment 19•1 year ago
|
||
The patch has landed and therefore it should be closed. QA will mark is as Verified when it's verified.
Comment 20•1 year ago
|
||
Reporter | ||
Comment 21•1 year ago
|
||
This is verified on AMO stage with Fenix 119.0a1
Reporter | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 22•1 year ago
•
|
||
R-B failures
https://github.com/mozilla-mobile/reference-browser/runs/16802374648
- removeAddonTest
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getId() is <2131296694/org.mozilla.reference.browser.debug:id/mozac_browser_toolbar_menu>
View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=599, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxwrap) gr=BOTTOM CENTER_VERTICAL sim={adjust=pan} ty=APPLICATION fmt=TRANSPARENT wanim=0x10302ff
fl=DIM_BEHIND SPLIT_TOUCH HARDWARE_ACCELERATED
fitTypes=STATUS_BARS NAVIGATION_BARS CAPTION_BAR}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+->FrameLayout{id=-1, visibility=VISIBLE, width=1080, height=599, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+-->FrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=599, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+--->RelativeLayout{id=-1, visibility=VISIBLE, width=1080, height=599, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=6}
|
+---->AppCompatImageView{id=2131296580, res-name=icon, visibility=VISIBLE, width=84, height=84, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=42.0}
|
+---->AppCompatTextView{id=2131296986, res-name=title, visibility=VISIBLE, width=917, height=117, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=134.0, y=42.0, text=uBlock Origin has been added to Reference Browser, input-type=0, ime-target=false, has-links=false}
|
+---->AppCompatTextView{id=2131296475, res-name=description, visibility=VISIBLE, width=342, height=62, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=134.0, y=201.0, text=Open it in the menu, input-type=0, ime-target=false, has-links=false}
|
+---->AppCompatImageView{id=-1, visibility=VISIBLE, width=63, height=63, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=476.0, y=201.0}
|
+---->AppCompatCheckBox{id=2131296355, res-name=allow_in_private_browsing, visibility=VISIBLE, width=522, height=84, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=134.0, y=305.0, text=Allow in private browsing, input-type=0, ime-target=true, has-links=false, is-checked=false}
|
+---->AppCompatButton{id=2131296435, res-name=confirm_button, visibility=VISIBLE, width=291, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=747.0, y=431.0, text=Okay, Got it, input-type=0, ime-target=false, has-links=false}
|
+-->ViewStub{id=16908719, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
The complete view hierarchy is available in artifact file 'view-hierarchy-2.txt'.
at androidx.test.espresso.NoMatchingViewException$Builder.build(NoMatchingViewException.java:5)
at androidx.test.espresso.base.DefaultFailureHandler.lambda$getNoMatchingViewExceptionTruncater$0(DefaultFailureHandler.java:5)
at androidx.test.espresso.base.DefaultFailureHandler$$ExternalSyntheticLambda1.truncateExceptionMessage(Unknown Source:2)
at androidx.test.espresso.base.ViewHierarchyExceptionHandler.handleSafely(ViewHierarchyExceptionHandler.java:5)
at androidx.test.espresso.base.ViewHierarchyExceptionHandler.handleSafely(ViewHierarchyExceptionHandler.java:1)
at androidx.test.espresso.base.DefaultFailureHandler$TypedFailureHandler.handle(DefaultFailureHandler.java:4)
at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:5)
at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:8)
at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:11)
at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:8)
at org.mozilla.reference.browser.helpers.ViewInteractionKt.click(ViewInteraction.kt:11)
at org.mozilla.reference.browser.ui.robots.NavigationToolbarRobot$Transition.openThreeDotMenu(NavigationToolbarRobot.kt:60)
at org.mozilla.reference.browser.ui.AddonsTest.removeAddonTest(AddonsTest.kt:97)
- verifyAddonElementsTest
androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: view.getId() is <2131296694/org.mozilla.reference.browser.debug:id/mozac_browser_toolbar_menu>
View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=599, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxwrap) gr=BOTTOM CENTER_VERTICAL sim={adjust=pan} ty=APPLICATION fmt=TRANSPARENT wanim=0x10302ff
fl=DIM_BEHIND SPLIT_TOUCH HARDWARE_ACCELERATED
fitTypes=STATUS_BARS NAVIGATION_BARS CAPTION_BAR}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+->FrameLayout{id=-1, visibility=VISIBLE, width=1080, height=599, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2}
|
+-->FrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=599, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1}
|
+--->RelativeLayout{id=-1, visibility=VISIBLE, width=1080, height=599, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=6}
|
+---->AppCompatImageView{id=2131296580, res-name=icon, visibility=VISIBLE, width=84, height=84, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=42.0, y=42.0}
|
+---->AppCompatTextView{id=2131296986, res-name=title, visibility=VISIBLE, width=917, height=117, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=134.0, y=42.0, text=uBlock Origin has been added to Reference Browser, input-type=0, ime-target=false, has-links=false}
|
+---->AppCompatTextView{id=2131296475, res-name=description, visibility=VISIBLE, width=342, height=62, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=134.0, y=201.0, text=Open it in the menu, input-type=0, ime-target=false, has-links=false}
|
+---->AppCompatImageView{id=-1, visibility=VISIBLE, width=63, height=63, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=476.0, y=201.0}
|
+---->AppCompatCheckBox{id=2131296355, res-name=allow_in_private_browsing, visibility=VISIBLE, width=522, height=84, has-focus=true, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=true, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=134.0, y=305.0, text=Allow in private browsing, input-type=0, ime-target=true, has-links=false, is-checked=false}
|
+---->AppCompatButton{id=2131296435, res-name=confirm_button, visibility=VISIBLE, width=291, height=126, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=android.widget.RelativeLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=747.0, y=431.0, text=Okay, Got it, input-type=0, ime-target=false, has-links=false}
|
+-->ViewStub{id=16908719, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@YYYYYY, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0}
The complete view hierarchy is available in artifact file 'view-hierarchy-2.txt'.
at androidx.test.espresso.NoMatchingViewException$Builder.build(NoMatchingViewException.java:5)
at androidx.test.espresso.base.DefaultFailureHandler.lambda$getNoMatchingViewExceptionTruncater$0(DefaultFailureHandler.java:5)
at androidx.test.espresso.base.DefaultFailureHandler$$ExternalSyntheticLambda1.truncateExceptionMessage(Unknown Source:2)
at androidx.test.espresso.base.ViewHierarchyExceptionHandler.handleSafely(ViewHierarchyExceptionHandler.java:5)
at androidx.test.espresso.base.ViewHierarchyExceptionHandler.handleSafely(ViewHierarchyExceptionHandler.java:1)
at androidx.test.espresso.base.DefaultFailureHandler$TypedFailureHandler.handle(DefaultFailureHandler.java:4)
at androidx.test.espresso.base.DefaultFailureHandler.handle(DefaultFailureHandler.java:5)
at androidx.test.espresso.ViewInteraction.waitForAndHandleInteractionResults(ViewInteraction.java:8)
at androidx.test.espresso.ViewInteraction.desugaredPerform(ViewInteraction.java:11)
at androidx.test.espresso.ViewInteraction.perform(ViewInteraction.java:8)
at org.mozilla.reference.browser.helpers.ViewInteractionKt.click(ViewInteraction.kt:11)
at org.mozilla.reference.browser.ui.robots.NavigationToolbarRobot$Transition.openThreeDotMenu(NavigationToolbarRobot.kt:60)
at org.mozilla.reference.browser.ui.AddonsTest.verifyAddonElementsTest(AddonsTest.kt:80)
Comment 23•1 year ago
|
||
:aaronmt just to be sure, these failures have been fixed by https://github.com/mozilla-mobile/reference-browser/pull/2474, right?
Description
•