Open Bug 1298362 Opened 8 years ago Updated 2 years ago

Console error when a download completes with history disabled: NS_ERROR_ILLEGAL_VALUE when calling setPageAnnotation

Categories

(Firefox :: Downloads Panel, defect, P5)

defect

Tracking

()

Tracking Status
firefox48 --- affected
firefox49 --- affected
firefox-esr45 --- affected
firefox50 --- affected
firefox51 --- affected

People

(Reporter: magicp.jp, Unassigned)

References

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 Build ID: 20160825030226 Steps to reproduce: 1. Start Nightly 2. Go to "https://www.mozilla.org/en-US/firefox/channel/" 3. Open Browser Console (Ctrl+Shift+J) 4. Start downloading "Firefox Beta" and save file in local 5. Check error in Browser Console after downloading Actual results: After downloading a file, the following error occurs. [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 :: onDownloadChanged :: line 801" data: no] (unknown) onDownloadChangedresource://app/modules/DownloadsCommon.jsm:801:13 this.DownloadList.prototype._notifyAllViews resource://gre/modules/DownloadList.jsm:213:11 DL_change resource://gre/modules/DownloadList.jsm:134:5 bound DL_change self-hosted D_notifyChange resource://gre/modules/DownloadCore.jsm:314:9 task_D_start resource://gre/modules/DownloadCore.jsm:560:11 next self-hosted TaskImpl_run resource://gre/modules/Task.jsm:319:40 bound TaskImpl_run self-hosted Handler.prototype.process resource://gre/modules/Promise.jsm%20-%3E%20resource://gre/modules/Promise-backend.js:937:23 this.PromiseWalker.walkerLoop resource://gre/modules/Promise.jsm%20-%3E%20resource://gre/modules/Promise-backend.js:816:7 bound self-hosted bound bound self-hosted Expected results: File downloading works without error.
Has STR: --- → yes
Component: Untriaged → Download Manager
OS: Unspecified → All
Product: Firefox → Toolkit
Hardware: Unspecified → All
Works for me on Mac OS X. Do you have any add-ons installed? Can you try on a new profile?
Flags: needinfo?(magicp.jp)
(In reply to :Paolo Amadini from comment #1) > Works for me on Mac OS X. Do you have any add-ons installed? Can you try on > a new profile? I can reproduce no add-ons and new profile. But I set the following settings. Could you try below? Before STR, please set the following settings at "about:preferences#privacy" - History Firefox will: "Use custom settings for history" - Check-off "Remember my browsing and download history" - Check-on "Clear history when Nightly closes"
Flags: needinfo?(magicp.jp)
Thanks, I confirm this happens if you disable "Remember my browsing and download history".
Priority: -- → P5
Summary: After downloading a file: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAnnotationService.setPageAnnotation]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" → Console error when a download completes with history disabled: NS_ERROR_ILLEGAL_VALUE when calling setPageAnnotation
Blocks: 826991
Has Regression Range: --- → yes
Product: Firefox, Component: Downloads Panel ?
There's a lot of overlap, actually Downloads Panel is more correct indeed based on where the code lives.
Component: Download Manager → Downloads Panel
Product: Toolkit → Firefox
FWIW, I'm also seeing the same exception in my browser console whenever a WebExtension background script completes a download using the downloads API: >[Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) >[nsIAnnotationService.setPageAnnotation]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: >resource:///modules/DownloadsCommon.jsm :: onDownloadChanged :: line 807" data: no] (unknown) > onDownloadChanged resource:///modules/DownloadsCommon.jsm:807:13 > _notifyAllViews resource://gre/modules/DownloadList.jsm:208:11 > DL_change resource://gre/modules/DownloadList.jsm:131:5 > bound DL_change self-hosted:959:17 > D_notifyChange resource://gre/modules/DownloadCore.jsm:310:9 > task_D_start resource://gre/modules/DownloadCore.jsm:553:11 > InterpretGeneratorResume self-hosted:1216:8 > next self-hosted:1123:9 > TaskImpl_run resource://gre/modules/Task.jsm:319:42 > bound TaskImpl_run self-hosted:961:17 > process resource://gre/modules/Promise-backend.js:922:23 > walkerLoop resource://gre/modules/Promise-backend.js:806:7 > bound walkerLoop self-hosted:917:17 > bound bound walkerLoop self-hosted:917:17
My steps to reproduce: 1. Open browser console (with devtools.chrome.enabled=true) 2. Enter this code: saveURL("data:text/plain,hello", "index.txt", null, false, false, null, document, undefined) 3. Confirm the save Same regression range as comment 9. In bug 1327784 I plan to use this kind of approach to download prettified JSON from the JSON Viewer. But this error is produced.
In Firefox 57 on Fedora 26, I see the same error: Code: let url = URL.createObjectURL(new Blob(["coucou"], { type: 'application/text' })), filename = "test.txt"; browser.downloads.download({ url: url, filename: filename, saveAs: true }); Results: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAnnotationService.setPageAnnotation]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/DownloadHistory.jsm :: updateMetaData :: line 132" data: no] updateMetaData resource://gre/modules/DownloadHistory.jsm:132:7 onDownloadChanged resource:///modules/DownloadsCommon.jsm:762:9 _notifyAllViews resource://gre/modules/DownloadList.jsm:191:28 DL_change resource://gre/modules/DownloadList.jsm:107:5 DL_change self-hosted:995:17 D_notifyChange resource://gre/modules/DownloadCore.jsm:271:9 D_start/< resource://gre/modules/DownloadCore.jsm:521:11 InterpretGeneratorResume self-hosted:1283:8 next self-hosted:1190:9 However, the file is well downloaded and visible in the download history.
Able to reproduce this issue with files downloaded through File Sharing websites 1. Have a file uploaded through "Firefox Send" or "mega.nz" websites. 2. Copy and try downloading with download file link Error seen in console due to failed setPageAnnotation of blob source URL [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIAnnotationService.setPageAnnotation]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/DownloadHistory.jsm :: updateMetaData :: line 130" data: no] (unknown) updateMetaData resource://gre/modules/DownloadHistory.jsm:130:7 onDownloadChanged resource:///modules/DownloadsCommon.jsm:755:9 _notifyAllViews resource://gre/modules/DownloadList.jsm:189:28 DL_change resource://gre/modules/DownloadList.jsm:105:5 DL_change self-hosted:1017:17 D_notifyChange resource://gre/modules/DownloadCore.jsm:269:9 D_start/< resource://gre/modules/DownloadCore.jsm:519:11 InterpretGeneratorResume self-hosted:1256:8 next self-hosted:1211:9 On restart of browser the downloaded file disappears from Download History, Tools -> Downloads
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.