Open Bug 1889064 Opened 5 months ago Updated 5 months ago

Screnshot failure of a very long github PR (with expanded comments)

Categories

(Firefox :: Screenshots, defect, P3)

Firefox 124
ARM64
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: brice.dutheil, Unassigned)

Details

(Whiteboard: [screenshots-extension])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:124.0) Gecko/20100101 Firefox/124.0

Steps to reproduce:

I opened a github pull request with lots of comments (all resolved comments were expanded). Page dimension according to web dev tools : 1305×16694.9

And used the "Take a screenshot" action.

Firefox 124.0.1
macOs 14.4.1

Actual results:

Immediately I get a notification "Woah! Firefox Screenshot went haywire".

The screenshot is not taken.
Also I have found in the developer console some logs.

Expected results:

The screenshot works, i.e. a single image is created, or maybe several.

OS: Unspecified → macOS
Hardware: Unspecified → ARM64

Example of such a github page : https://github.com/mockito/mockito/issues/3037

Component: Untriaged → Screenshots

Thanks for filing this bug!
Are you able to reproduce if you set screenshots.browser.component.enabled to true in about:config?

Flags: needinfo?(brice.dutheil)

Enabling screenshots.browser.component.enabled allow the screenshot to proceed, however the screenshot is truncated.

To day on https://github.com/mockito/mockito/issues/3037 (when expanding all comments), the dimensions are 1800×53719.3 (according to the inspection tool), however the screenshot dimensions are 3600 × 32766. I suppose the 3600 = 1800 x 2 is due to the HiDPI, so 32766 would be 16383. This value is reminding me a power of 2 : 2^14 = 16 384 (or a forth of 65536).

Flags: needinfo?(brice.dutheil)

Yeah, we write the screenshots to canvas before saving and in this case we are limited by the canvas dimensions.
See this page for exact canvas size specs in Firefox and other browsers.

The HiDPI is exactly why the page width is 1800 but the screenshot width is 3600.

We can only capture screenshots with a max dimension of 32,767 or a max area of 536,756,224.

Hopefully the truncated screenshot produces a good enough result.
We unfortunately don't have a better solution at this time.

Severity: -- → S3
Priority: -- → P3
Whiteboard: [screenshots-extension]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: