"Unhandled error: TypeError: can't access property "documentURI", doc is null" error in JS, sometimes with notification "Whoa! Firefox Screenshots went haywire", if you take a screenshot from context menu in video doc background area
Categories
(Firefox :: Screenshots, defect, P3)
Tracking
()
People
(Reporter: dholbert, Unassigned)
References
Details
(Whiteboard: [screenshots-extension])
Attachments
(2 files)
STR:
- Directly view some video, e.g. load this screencast that I posted on GitHub:
https://user-images.githubusercontent.com/426803/179851098-88c9110a-7ff6-49c3-9e25-607963eed17c.webm - Right-click the background area (outside the video)
- Choose "Take a screenshot" from the context menu.
- Repeat steps 2 and 3 several times.
ACTUAL RESULTS:
- No screenshot is taken.
- Each time you choose "Take a screenshot", this appears in your Web Console (if you have devtools open):
Unhandled error: TypeError: can't access property "documentURI", doc is null
assertIsBlankDocument moz-extension://83b5bab2-1871-46d9-a25b-613a456e74a0/assertIsBlankDocument.js:12
ui moz-extension://83b5bab2-1871-46d9-a25b-613a456e74a0/selector/ui.js:101
catcher moz-extension://83b5bab2-1871-46d9-a25b-613a456e74a0/catcher.js:59
undefined
- Some of the time (maybe every 2-3 attempts), I get a system notification saying "Whoa! Firefox Screenshots went haywire" (see attached image)
EXPECTED RESULTS:
Either the screenshot operation should succeed, or we shouldn't show it as an available option, or we should show a more user-friendly notification about why it failed & what the user should do (e.g. they can right-click the actual video and choose "Take Snapshot" if they want, and that seems to work)
Reporter | ||
Comment 1•3 years ago
|
||
In a fresh profile, the Web Console gives me a somewhat-longer backtrace for the JS error:
Unhandled error: TypeError: can't access property "documentURI", doc is null
assertIsBlankDocument moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/assertIsBlankDocument.js:12
ui moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/ui.js:101
catcher moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/catcher.js:59
ui moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/ui.js:96
display moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/ui.js:88
display moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/ui.js:502
start moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:300
setState moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:247
activate moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:848
catcher moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/catcher.js:59
uicontrol moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:1022
<anonymous> moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:1025
undefined
unhandled moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/catcher.js:21
catcher moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/catcher.js:62
(Async: EventListener.handleEvent)
ui moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/ui.js:96
display moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/ui.js:88
display moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/ui.js:502
start moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:300
setState moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:247
activate moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:848
catcher moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/catcher.js:59
uicontrol moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:1022
<anonymous> moz-extension://5f2885b2-5edb-41e9-8c32-f78f16b01782/selector/uicontrol.js:1025
Reporter | ||
Comment 2•3 years ago
|
||
Reporter | ||
Comment 3•3 years ago
|
||
I'm using Nightly 2022-07-19 with a fresh profile on Ubuntu 22.04, BTW.
Comment 4•3 years ago
|
||
Thanks for the report. This looks like a race where the element we store a reference to is being disconnected/orphaned before the promise resolves. Its an artifact of the way the extension injects its UI into the document being screenshot. Its the kind of problem that goes away when in the browser component implementation (bug 1696573.)
Updated•3 years ago
|
Comment 5•1 year ago
|
||
This is fixed with the change to enable the new component implementation by default in bug 1870127.
Description
•