addons-frontend icon indicating copy to clipboard operation
addons-frontend copied to clipboard

The addon abuse report form no longer displays a confirmation message for language tools and reports sent from mobile

Open AlexandraMoga opened this issue 3 years ago • 9 comments
trafficstars

Describe the problem and steps to reproduce it:

  1. Open an addon detail page on mobile
  2. Submit an abuse report

What happened?

There is no confirmation message displayed after the abuse report is sent; the textbox remains open

What did you expect to happen?

There should be a confirmation message displayed after the abuse report is sent

Anything else we should know?

  • if I'm looking in admin abuse report, I can see that the report was sent - https://addons-internal.stage.mozaws.net/en-US/admin/models/abuse/abusereport/45680/change/
  • I'm reproducing this only on -dev and stage
  • @diox did some refactoring around abuse reports in https://github.com/mozilla/addons-server/pull/19504, so this could have caused this regression

studio64_VMA9Geg2Ov

AlexandraMoga avatar Jul 28 '22 08:07 AlexandraMoga

Update: the issue can be reproduced on prod now as well with Firefox for android.

AlexandraMoga avatar Jul 29 '22 10:07 AlexandraMoga

This does appear to be a regression from https://github.com/mozilla/addons-server/pull/19504, which I reviewed, so I guess I should have thought to check this. addons-frontend relies on there being a valid slug returned in the API response of /api/v5/abuse/report/addon/, which was happening before, but now the response just has slug: null.

@diox Is there a reason we must return null for the slug in this response? If we have just reported abuse for an add-on, we should be able to report back what the slug was, shouldn't we? This could be addressed in addons-frontend by relying on guid instead of slug, but, for the most part, we use slug for this type of thing in addons-frontend most of the time, so I'm not sure that changing addons-frontend is the best approach.

bobsilverberg avatar Aug 04 '22 12:08 bobsilverberg

Also, we currently send the slug, not the guid to the abuse reporting API, which is why it makes sense to allow front-end to continue to use the slug from the response. We could change everything in front-end around abuse reporting to use the guid, if that's deemed a better approach.

bobsilverberg avatar Aug 04 '22 15:08 bobsilverberg

Also, we currently send the slug, not the guid to the abuse reporting API, which is why it makes sense to allow front-end to continue to use the slug from the response. We could change everything in front-end around abuse reporting to use the guid, if that's deemed a better approach.

https://github.com/mozilla/addons-server/blob/master/src/olympia/abuse/views.py#L62:L63 indicates accepting guid is for backwards compatibility too, i.e. really it's supposed to be a guid that's been submitted.

eviljeff avatar Aug 04 '22 16:08 eviljeff

We no longer store a foreign key to the add-on and only store the guid internally, so we no longer had an Addon instance directly available, I figured it wasn't going to be a breaking change as the API already returned null in some cases. I didn't anticipate we'd rely on it as a confirmation the report went through.

We could return the slug again, but IMHO we shouldn't rely on this behavior, because we don't want to return the slug of a non-public add-on if a guid was used to look it up, so we'd need to ensure we only do this if the slug was originally used. That leaves an edge-case if you have left the abuse report page opened for a while and then the add-on got deleted/disabled, you'd see the same problem again as the API would no longer be able to return the slug in that case.

diox avatar Aug 15 '22 09:08 diox

Going to fix that server-side in https://github.com/mozilla/addons-server/issues/19578 ; keeping this opened for now, we might want to stop relying on the presence of the slug in the response too if that's easy to do.

diox avatar Aug 18 '22 08:08 diox

@AlexandraMoga @diox I reproduced this issue with a lang pack on FF103(Win10). I cannot detail it further because I hit a throttle after the 15th attempt and now I'm stuck for 1h+

ioanarusiczki avatar Aug 19 '22 10:08 ioanarusiczki

Yes, I've noticed that the issue will reproduce with langpacks and dictionaries as well. Apparently, language tools are using the internal AMO report abuse form. For reference, language packs and dictionaries can't be reported from addons manager like extensions and themes can, so maybe there is a connection there.

AlexandraMoga avatar Aug 19 '22 10:08 AlexandraMoga

@diox This is no longer reproducible on AMO dev and stage - FF103(Win10) and Fenix for Android.

ioanarusiczki avatar Aug 25 '22 09:08 ioanarusiczki