addons icon indicating copy to clipboard operation
addons copied to clipboard

An unauthorized message is displayed in the ratings breakdown section for an unapproved add-on

Open AlexandraMoga opened this issue 6 years ago • 7 comments

STR:

  1. Log in to Developer Hub on AMO stage
  2. Open Manage my Submissions and select an add-on that has not been approved/reviewed
  3. Access the add-on listing page (see https://addons.allizom.org/en-US/firefox/addon/1800x1800/)
  4. 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

image

Console log

image

┆Issue is synchronized with this Jira Task

AlexandraMoga avatar Aug 09 '18 09:08 AlexandraMoga

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.

bobsilverberg avatar Aug 30 '18 20:08 bobsilverberg

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.

kumar303 avatar Sep 05 '18 20:09 kumar303

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.

willdurand avatar Sep 06 '18 09:09 willdurand

@EnTeQuAk bump. Please see https://github.com/mozilla/addons/issues/2051, above.

bobsilverberg avatar Sep 27 '18 18:09 bobsilverberg

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.

mastef avatar Aug 06 '19 08:08 mastef

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)

image

AlexandraMoga avatar Aug 14 '19 12:08 AlexandraMoga

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDFRNT-145

KevinMind avatar May 03 '24 18:05 KevinMind