Closed Bug 1685388 Opened 4 years ago Closed 3 years ago

"Take a Screenshot" doesn't work in debug builds

Categories

(Firefox :: Screenshots, defect, P1)

Unspecified
Windows
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jgilbert, Assigned: emmamalysz)

References

Details

Attachments

(1 file)

Nothing happens, no warnings in either web/browser consoles.

True for both +opt and -opt builds, with +debug.

@mconley maybe?

Flags: needinfo?(mconley)

Hey Jeff,

I have a debug build but can't seem to reproduce (on a mac). I want to clarify: you're not seeing any part of the screenshots UI, right?

I know there were performance concerns when we made screenshots fission compatible (Bug 1664444), but that should really only noticeably impact screenshotting larger images

What happens if you try taking a screenshot via the page action panel and waiting a few seconds? If nothing shows and you open the page action panel again, is the icon greyed out?

Flags: needinfo?(mconley) → needinfo?(jgilbert)

I'm on Windows. What's the "page action panel"? I've been right-clicking and hitting "Take screenshot".

Flags: needinfo?(jgilbert) → needinfo?(emalysz)
OS: Unspecified → Windows

I was able to reproduce and will start investigating. Thanks for pointing this out!

For reference, the page action panel refers to the panel stemming from the "..." icon in the urlbar. It looks like both routes will reproduce this issue though

Assignee: nobody → emalysz
Flags: needinfo?(emalysz)

Thanks for looking into it!

Hey, any updates?

Flags: needinfo?(jgilbert)

Hey! Sorry for the delay. I'm trying to find some time to fix it, but I've been able to narrow down what's happening.

We never receive the load event here: https://searchfox.org/mozilla-central/rev/0b2870194375d80b54608c39060884acb758c206/browser/extensions/screenshots/selector/ui.js#104-122. That stems from setting the iframe's source to the blank.html here: https://searchfox.org/mozilla-central/rev/0b2870194375d80b54608c39060884acb758c206/browser/extensions/screenshots/selector/ui.js#72

I had tried setting the src directly to data:text/html,<html></html>, and we then receive the on load event. However, then the this.element.contentDocument would be null, and using this.element.contentWindow.document directly isn't allowed..

Still need to dig in, but if there's something obvious I'm missing, please let me know! I plan on taking a closer look this week

Flags: needinfo?(jgilbert)

Update: it appears as if browser.extension.getURL is broken. If we change https://searchfox.org/mozilla-central/rev/b9384b091e901b3283ce24b6610e80699d79fd06/browser/extensions/screenshots/selector/ui.js#72 to el.srcdoc = '<html></html>, we receive the load event and open the UI.

However, a lot of the other icons in screenshots rely on this, so it looks pretty broken. Some other tests rely on this, but screenshots looks to be the only component that implements it: https://searchfox.org/mozilla-central/search?q=browser.extension.geturl&path=&case=false&regexp=false

The attached patch is a WIP that restores screenshots functionality to debug builds.

However, the icons still appear to be broken, so that needs to be looked into.

I'm having trouble reproducing this issue on a debug build now.. Sam can you reproduce?

Flags: needinfo?(sfoster)

I'm not able to produce on a (artifact) debug build.

Flags: needinfo?(sfoster)

Jeff, are you still seeing this?

Flags: needinfo?(jgilbert)

I tried a more recent debug build and still could not reproduce. Niklas, who will be working on screenshots more, also couldn't reproduce.
Is it possible this was fixed?

Yeah, it seems to have fixed itself, though it sometimes takes a (very) long time (>1m) for the UI for it to come up.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(jgilbert)
Resolution: --- → FIXED
Resolution: FIXED → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: