Screenshot failed when taking screenshot of really large page
Categories
(Firefox :: Screenshots, defect, P3)
Tracking
()
People
(Reporter: niklas, Assigned: niklas)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fidefe-Quality-Foundation] )
Attachments
(1 file)
Screenshot failed when taking screenshot of really large page.
Screenshots component silently fails when taking a full page screenshot on https://ffmpeg.org/ffmpeg-all.html.
Comment 1•3 years ago
|
||
We should clamp the dimensions so we can show a preview of the screenshot rather than just fail. It might be useful to have a way of messaging the user with info/warnings like this so they know they aren't necessarily getting the whole page.
Assignee | ||
Updated•3 years ago
|
Yes, this is very annoying, still nothing done after almost a year. One of the major issues is that when it fails it can lock out screen capturing completely until restarting browser.
A better way would be to simply take as many screenshots as needed. Basically just divide up the range in to maximum possible image sizes: ceil(width/maxwidth), ceil(height/maxheight) will give the nxm number of screenshots and from this one can get coordinates needed. Label indexing then is all that is needed.
Should be a relatively easy fix, will fix this bug and make things more robust.
Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 4•2 years ago
|
||
The following patch is waiting for review from an inactive reviewer:
ID | Title | Author | Reviewer Status |
---|---|---|---|
D160565 | Bug 1743887 - Crop screenshots when they larger than max canvas size. r=sfoster | niklas | bolsson: Inactive |
:niklas, could you please find another reviewer?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Comment 5•2 years ago
|
||
I'm back from PTO now and am reviewing this patch.
Comment 8•2 years ago
|
||
Backed out for causing failures at browser_screenshots_test_screenshot_too_big.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/bc01ec09d5f3f7880196c755da0e42d9bd65f24b
Failure log: https://treeherder.mozilla.org/logviewer?job_id=402722490&repo=autoland&lineNumber=6117
Comment 10•2 years ago
|
||
Well I had raised this few days back here https://bugzilla.mozilla.org/show_bug.cgi?id=1810934, got to know its duplicate. For now to unblock others I resolved this issue by creating an firefox extension (old school tech) which would take screenshot by doing scroll and stitch kind of concept.
So basically I take 2 screenshots considering max height of 32k.
Draw a canvas of 32k.
0 - 16k -> 1st Screenshot - paint the canvas.
16k - 32k -> 2nd Screenshot - paint the remaining canvas.
get that canvas.toDataUrl();
This would give us the require screenshot of 32k. We can increase the height and width accordingly depending on the limitation of hardware and canvas limitations.
Comment 11•2 years ago
|
||
Comment 12•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Hi @Niklas I tried to verify the fix on our end but I still reproduce the issue in our latest Nightly build : 20230126212606
This is the error we are seeing in Devtools Console.
------Error in promise: BackgroundError: Error: An unexpected error occurred
callBackground moz-extension://4b807be8-2685-409d-af2c-234050981f21/selector/callBackground.js:14
catcher.js:78:15
catcher moz-extension://4b807be8-2685-409d-af2c-234050981f21/catcher.js:78
callBackground/<@moz-extension://4b807be8-2685-409d-af2c-234050981f21/selector/callBackground.js:14:19
catcher.js:79:15
catcher moz-extension://4b807be8-2685-409d-af2c-234050981f21/catcher.js:79
Unhandled error:
Object { fromMakeError: true, name: "BackgroundError", message: "BackgroundError: Error: An unexpected error occurred", stack: "callBackground/<@moz-extension://4b807be8-2685-409d-af2c-234050981f21/selector/callBackground.js:14:19\n", errorCode: undefined, popupMessage: undefined }
errorCode: undefined
fromMakeError: true
message: "BackgroundError: Error: An unexpected error occurred"
name: "BackgroundError"
popupMessage: undefined
stack: "callBackground/<@moz-extension://4b807be8-2685-409d-af2c-234050981f21/selector/callBackground.js:14:19\n"
<prototype>: Object { … }
undefined catcher.js:21:11
BackgroundError: Error: An unexpected error occurred
Assignee | ||
Comment 14•2 years ago
|
||
(In reply to Rares Doghi from comment #13)
Hi @Niklas I tried to verify the fix on our end but I still reproduce the issue in our latest Nightly build : 20230126212606
This is the error we are seeing in Devtools Console.
------Error in promise: BackgroundError: Error: An unexpected error occurred
callBackground moz-extension://4b807be8-2685-409d-af2c-234050981f21/selector/callBackground.js:14
catcher.js:78:15
catcher moz-extension://4b807be8-2685-409d-af2c-234050981f21/catcher.js:78
callBackground/<@moz-extension://4b807be8-2685-409d-af2c-234050981f21/selector/callBackground.js:14:19
catcher.js:79:15
catcher moz-extension://4b807be8-2685-409d-af2c-234050981f21/catcher.js:79
Unhandled error:
Object { fromMakeError: true, name: "BackgroundError", message: "BackgroundError: Error: An unexpected error occurred", stack: "callBackground/<@moz-extension://4b807be8-2685-409d-af2c-234050981f21/selector/callBackground.js:14:19\n", errorCode: undefined, popupMessage: undefined }
errorCode: undefined
fromMakeError: true
message: "BackgroundError: Error: An unexpected error occurred"
name: "BackgroundError"
popupMessage: undefined
stack: "callBackground/<@moz-extension://4b807be8-2685-409d-af2c-234050981f21/selector/callBackground.js:14:19\n"
<prototype>: Object { … }
undefined catcher.js:21:11
BackgroundError: Error: An unexpected error occurred
Hey Rares, this is for the component version of screenshots so you'll want to set screenshots.browser.component.enabled
to true in about:config
Comment 15•2 years ago
|
||
Thanks for that extra info, I was able to verify the fix in our latest Nightly build 111.0a1 (2023-01-26).
Updated•2 years ago
|
Description
•