addons
addons copied to clipboard
An unauthorized message is displayed in the ratings breakdown section for an unapproved add-on
STR:
- Log in to Developer Hub on AMO stage
- Open Manage my Submissions and select an add-on that has not been approved/reviewed
- Access the add-on listing page (see https://addons.allizom.org/en-US/firefox/addon/1800x1800/)
- Observe the error message displayed in the ratings breakdown section
Actual result: There is an unauthorized (403) message displayed
Expected result: There should be no error messages in the ratings breakdown section
Notes:
- reproduced on AMO stage with FF61, Win10x64
- the error is displayed to Admin users as well
Console log
┆Issue is synchronized with this Jira Task
The call to fetch the grouped ratings is failing with a 403 error. That doesn't seem like it should be the case, but I'm not sure how this all should work for a disabled/unapproved add-on.
@EnTeQuAk is it expected that a call to /api/v3/reviews/review/?addon=495711&show_grouped_ratings=true
(which is for a disabled add-on, on dev) would return a 403? It seems that we are able to return the details for the add-on itself, but not the reviews.
FYI: unlike the screenshot in this description there is now a notice (https://github.com/mozilla/addons/issues/11368) which should be helpful to provide a hint about why the page appears slightly broken.
FYI: unlike the screenshot in this description there is now a notice (#4244) which should be helpful to provide a hint about why the page appears slightly broken.
That's why I think it is not worth fixing in addons-frontend.
@EnTeQuAk bump. Please see https://github.com/mozilla/addons/issues/2051, above.
Hi there, this issue also causes very high CPU load ( https://github.com/mozilla/addons/issues/1082 ), because the reviews are being re-fetched the moment the request fails with the 403 error, causing an infinite loop.
See from https://github.com/mozilla/addons/issues/13384 that there is now a second unauthorized message revealed, displayed in the Rate your experience section:
Failed to fetch grouped ratings for add-on ID 1002944: Error: Error calling: /api/v4/ratings/rating/ (status: 403)
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDFRNT-145