Closed Bug 1122458 Opened 10 years ago Closed 6 years ago

Taking a screenshot from the Responsive Design interface results in an error thrown by DownloadsCommon.jsm


(DevTools :: Responsive Design Mode, defect)

Not set


(firefox35 affected, firefox36 affected, firefox37 affected, firefox38 unaffected)

Tracking Status
firefox35 --- affected
firefox36 --- affected
firefox37 --- affected
firefox38 --- unaffected


(Reporter: avaida, Assigned: miker)


(Keywords: regression)

Reproducible on: 
Aurora 37.0a2 (2015-01-15) and below.

Affected platform(s): 
Ubuntu 14.04 LTS 64-bit, Windows 8.1 64-bit, Mac OS X 10.9.5.

Steps to reproduce:
1. Launch Firefox.
2. Enable Responsive Design from the "Developer Tools" → "Responsive Design View" menu.
3. Open the Browser Console from the "Developer Tools" → "Browser Console" menu.
4. Press the screenshot button from the Responsive Design interface.

Expected result:
A screenshot is taken and saved on the user's default download folder.

Actual result:
DownloadsCommon.jsm:744:0 throws the following JS error in the Browser Console:
> [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAnnotationService.setPageAnnotation]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: resource://app/modules/DownloadsCommon.jsm :: _updateDataItemState :: line 739"  data: no]
Starting with Firefox 35.0 (20150108202552) and below, the error message varies a bit:
> [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAnnotationService.setPageAnnotation]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: resource://app/modules/DownloadsCommon.jsm :: DownloadsDataCtor.prototype._updateDataItemState :: line 686"  data: no] DownloadsCommon.jsm:691

Regression range (m-c):
- Last good revision: 98aa428a392c (2013-11-23)
- First bad revision: 74ab61b8d0f0 (2013-11-24)
- Pushlog:

Additional notes:
- This issue is not reproducible on Nightly 38.0a1 (2015-01-15) where instead of this error, 
> TypeError: window is null
is thrown in responsivedesign.jsm:766:8, using Windows 8.1 64-bit and Mac OS X 10.9.5.
- This issue happens with and without e10s enabled.
Version: 37 Branch → Trunk
AFAIK, screenshots have been working without issue for a while.  :avaida, can you still reproduce this?
Flags: needinfo?(andrei.vaida)
The error is still thrown in the console on the Latest Nightly build (52.0a1 (2016-11-07).
Tests were performed under Windows 10x64, Mac OS X 10.11.6, Ubuntu 16.04x64.
Ryan, please let me know if there is something else that need to be investigated around this issue.
Flags: needinfo?(andrei.vaida) → needinfo?(jryans)
Ah, my mistake, I can see it as well.

It seems like the error occurs because the URL is a very long data URL, which is longer than 65,536 max allowed by the annotation service[1].

Seems like a minor issue.  We could potentially add something to avoid storing the annotation for this case.

Flags: needinfo?(jryans)
Product: Firefox → DevTools
Assignee: nobody → mratcliffe
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.