screenshots
screenshots copied to clipboard
"Index or size negative or greater than allowed amount" error is displayed if the "Copy" or "Download" button is clicked for a zero-area selection
[Affected versions]:
- Nightly 61.0a1
- Beta 60.0b15
[Affected Platforms]:
- All Windows
- All Mac
- All Linux
[Prerequisites]:
- Have a clean Firefox profile and the Screenshots Onboarding tour already visited.
[Steps to reproduce]:
- Open Firefox browser and navigate to any website.
- Click the "Page actions" menu and select the "Take a Screenshot" option.
- Perform a selection that have zero-width or zero-height.
- Click the "Copy" or "Download" button and observe the behavior.
[Expected result]:
- "Your selection is too small" error is displayed and the overlay is not dismissed.
[Actual result]:
- "Index or size negative or greater than allowed amount" error is displayed and the overlay is dismissed until you click again on the page.
[Notes]:
-
We had a similar issue logged for for the "Save" button in #2957.
-
On the latest Firefox 59.0.2 release a different message error is displayed: "BackgroundError: Error: Data is not a valid png image".
-
Here is a screenshot wit browser console error:
-
Here is a screen recording with the issue:
Sentry: https://sentry.prod.mozaws.net/operations/screenshots-addon-dev/issues/4287898/
Asa also reported this error message in the Screenshots Slack channel. But he was trying to take a shot of a tweet on Twitter, so I don't know if it's the same root cause.
Let's set the minimum size of X or Y >0px