Toolbar screenshot button doesn't work

RESOLVED FIXED

Status

P3
normal
RESOLVED FIXED
a year ago
3 months ago

People

(Reporter: sole, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

* Expected: clicking screenshot button would generate a screenshot and place it on the downloads folder
* actual results: nothing happens

The trace:

createScreenshotData@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/gcli/commands/screenshot.js:319:3
captureScreenshot@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/gcli/commands/screenshot.js:249:10
exec@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/gcli/commands/screenshot.js:215:14
Requisition.prototype.exec/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/gcli/source/lib/gcli/cli.js:2085:16
asyncFunction@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:235:18
spawn@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:160:12
exports.exec@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/gcli/source/lib/gcli/util/host.js:63:10
Requisition.prototype.exec@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/gcli/source/lib/gcli/cli.js:2084:14
Requisition.prototype.updateExec/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/gcli/source/lib/gcli/cli.js:2124:12
promise callback*Requisition.prototype.updateExec@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/gcli/source/lib/gcli/cli.js:2123:10
promise callback*execute@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/gcli.js:88:12
handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/protocol.js:1081:19
onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/main.js:1797:15
receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/transport/transport.js:761:7


Looking at the code there's a ctx.scale(ratio, ratio) at the top error location: devtools/shared/gcli/commands/screenshot.js:319:3

An initial guess is that maybe the ratio is a wrong value (undefined?) and the context scale is throwing. Ben says "maybe!" because he has a scaled monitor things are getting weird here.
The ratio is assigned a few lines before with `const ratio = args.dpr ? args.dpr : window.devicePixelRatio;` - it might be interesting to look at what value is in ratio.

I can't reproduce on a MacOS MacBook using built in monitor.
I'll try changing my win10 monitor scaling later today.
Flags: needinfo?(bkelly)
status-firefox57: --- → fix-optional
Priority: -- → P3

Updated

6 months ago
Product: Firefox → DevTools
Sorry, I never got around to this.
status-firefox57: fix-optional → ---
Flags: needinfo?(bkelly)
(Reporter)

Comment 3

3 months ago
I have changed the scaling to various settings and I can take screenshots with the button in all cases, here using Windows with an external monitor both plugged in and with the built in monitor too. Closing because I can't reproduce--maybe the recent work on screenshots fixed this!
Status: NEW → RESOLVED
Last Resolved: 3 months ago
Resolution: --- → FIXED

Updated

3 months ago
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.