Closed johnp closed 10 years ago
Strange, all works fine for me with Firefox 34.0a1 (2014-07-28), but I can test only 32-bit version. Some special options or other extensions?
Also unfortunately error message tells only that someone calls DownloadUtils.getURIHost()
for invalid URI string:
/**
* Get the appropriate display host string for a URI string depending on if
* the URI has an eTLD + 1, is an IP address, a local file, or other protocol
*
* @param aURIString
* The URI string to try getting an eTLD + 1, etc.
* @return A pair: [display host for the URI string, full host name]
*/
getURIHost: function DU_getURIHost(aURIString)
{
let ioService = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
let eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"].
getService(Ci.nsIEffectiveTLDService);
let idnService = Cc["@mozilla.org/network/idn-service;1"].
getService(Ci.nsIIDNService);
// Get a URI that knows about its components
let uri = ioService.newURI(aURIString, null, null); // <--- line 397
So, may be something wrong in %firefox_profile%/downloads.json.
Clicking on the download button does nothing.
And even nothing in error console?
Also please set extensions.downloadPanelTweaker.debug = true in about:config, disable Download Panel Tweaker, clear console, enable it again, click on downloads button and post all messages like [Download Panel Tweaker] …
here.
Yeah I've got tons of other extensions and scripts running, I'll try without if thats needed. Ok, didn't know of the debug switch. Here's a complete extension load/click/unload cycle:
1406575191003 DeferredSave.extensions.json DEBUG Save changes
----------
1406575191005 addons.xpi-utils DEBUG Updating active state for add-on downloadPanelTweaker@infocatcher to true
----------
1406575191006 DeferredSave.extensions.json DEBUG Save changes
----------
1406575191006 addons.xpi DEBUG Registering manifest for C:\Users\Yoyo\AppData\Roaming\Mozilla\Firefox\Profiles\Yoyo\extensions\downloadPanelTweaker@infocatcher.xpi
----------
Warning: attempting to write 6245 bytes to preference extensions.bootstrappedAddons. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file.
----------
1406575191007 addons.xpi DEBUG Loading bootstrap scope from C:\Users\Yoyo\AppData\Roaming\Mozilla\Firefox\Profiles\Yoyo\extensions\downloadPanelTweaker@infocatcher.xpi
----------
1406575191010 addons.xpi DEBUG Calling bootstrap method startup on downloadPanelTweaker@infocatcher version 0.2.1
----------
[Download Panel Tweaker] 19:51:012 Successfully started
----------
1406575191038 DeferredSave.extensions.json DEBUG Starting timer
----------
1406575191340 Services.Metrics.Provider.org.mozilla.addons WARN Add-on type without field: experiment
----------
1406575191341 Services.Metrics.Provider.org.mozilla.addons WARN Add-on type without field: userstyle
----------
1406575191341 Services.Metrics.Provider.org.mozilla.addons WARN Add-on type without field: userscript
----------
[Download Panel Tweaker] 19:51:343 DownloadsCommon loaded: true
----------
Mon Jul 28 2014 21:19:51
Error: NS_ERROR_MALFORMED_URI: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]
Source file: resource://gre/modules/DownloadUtils.jsm
Line: 397
----------
[Download Panel Tweaker] 19:51:356 Load downloadsEnhancements.js
----------
[Download Panel Tweaker] 19:51:357 dontRemoveFinishedDownloads(true): Will fix DownloadIntegration
----------
[Download Panel Tweaker] 19:51:357 dontRemoveFinishedDownloads(true): Override DownloadStore.onsaveitem()
----------
[Download Panel Tweaker] 19:51:357 dontRemoveFinishedDownloads(true): Patch DownloadsDataItem.prototype.updateFromDownload()
----------
[Download Panel Tweaker] 19:51:358 [patcher] Patch DownloadsDataItem.prototype.updateFromDownload
----------
[Download Panel Tweaker] 19:51:358 setFixToolbox(true)
----------
[Download Panel Tweaker] 19:51:358 fixToolbox(): override "tabsontop" on #navigator-toolbox: false => true
----------
[Download Panel Tweaker] 19:51:359 Load compactDownloads.css
----------
[Download Panel Tweaker] 19:51:361 loadTweakStyle(true)
----------
[Download Panel Tweaker] 19:51:417 DownloadsCommon loaded: true
----------
Mon Jul 28 2014 21:19:51
Error: NS_ERROR_MALFORMED_URI: Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]
Source file: resource://gre/modules/DownloadUtils.jsm
Line: 397
----------
[Download Panel Tweaker] 19:51:428 setFixToolbox(true)
----------
[Download Panel Tweaker] 19:51:428 fixToolbox(): override "tabsontop" on #navigator-toolbox: false => true
----------
[Download Panel Tweaker] 19:51:430 DownloadsCommon loaded: true
----------
[Download Panel Tweaker] 19:51:430 setItemCountLimit(): 6
----------
[Download Panel Tweaker] 19:51:430 showDownloadRate(true)
----------
[Download Panel Tweaker] 19:51:430 udateDownloadRate(true)
----------
[Download Panel Tweaker] 19:51:430 [patcher] Patch DownloadsSummaryData.prototype._updateView
----------
[Download Panel Tweaker] 19:51:430 showPausedDownloadsSummary(true)
----------
[Download Panel Tweaker] 19:51:430 setFixToolbox(true)
----------
[Download Panel Tweaker] 19:51:433 fixToolbox(): override "tabsontop" on #navigator-toolbox: false => true
----------
[Download Panel Tweaker] 19:51:433 DownloadsCommon loaded: true
----------
[Download Panel Tweaker] 19:51:434 setItemCountLimit(): 6
----------
[Download Panel Tweaker] 19:51:434 udateDownloadRate(true)
----------
[Download Panel Tweaker] 19:51:434 setFixToolbox(true)
----------
[Download Panel Tweaker] 19:51:436 fixToolbox(): override "tabsontop" on #navigator-toolbox: false => true
----------
[Download Panel Tweaker] 19:51:437 fixLoadDownloads(true)
----------
[Download Panel Tweaker] 19:51:795 fixUpdateViews(true)
----------
[Download Panel Tweaker] 19:51:795 [patcher] Patch DownloadsIndicatorDataCtor.prototype._updateViews
----------
[Download Panel Tweaker] 19:51:795 fixOnDownloadAdded(true)
----------
[Download Panel Tweaker] 19:51:795 [patcher] Patch DownloadsDataCtor.prototype.onDownloadAdded
----------
1406575192567 DeferredSave.extensions.json DEBUG Starting write
----------
1406575192832 DeferredSave.extensions.json DEBUG Write succeeded
----------
1406575199992 DeferredSave.extensions.json DEBUG Save changes
----------
1406575199996 addons.xpi-utils DEBUG Updating active state for add-on downloadPanelTweaker@infocatcher to false
----------
1406575199996 DeferredSave.extensions.json DEBUG Save changes
----------
1406575199996 addons.xpi DEBUG Calling bootstrap method shutdown on downloadPanelTweaker@infocatcher version 0.2.1
----------
[Download Panel Tweaker] 19:59:997 Unload compactDownloads.css
----------
[Download Panel Tweaker] 19:59:997 loadTweakStyle(false)
----------
[Download Panel Tweaker] 19:59:997 showDownloadRate(false)
----------
[Download Panel Tweaker] 19:59:997 [patcher] Restore DownloadsSummaryData.prototype._updateView
----------
[Download Panel Tweaker] 19:59:998 showPausedDownloadsSummary(false)
----------
[Download Panel Tweaker] 19:59:998 dontRemoveFinishedDownloads(false): Will fix DownloadIntegration
----------
[Download Panel Tweaker] 19:59:998 dontRemoveFinishedDownloads(false): Restore DownloadStore.onsaveitem()
----------
[Download Panel Tweaker] 19:59:998 dontRemoveFinishedDownloads(false): Restore DownloadsDataItem.prototype.updateFromDownload()
----------
[Download Panel Tweaker] 19:59:998 [patcher] Restore DownloadsDataItem.prototype.updateFromDownload
----------
[Download Panel Tweaker] 19:59:998 fixUpdateViews(false)
----------
[Download Panel Tweaker] 19:59:998 [patcher] Restore DownloadsIndicatorDataCtor.prototype._updateViews
----------
[Download Panel Tweaker] 19:59:998 fixOnDownloadAdded(false)
----------
[Download Panel Tweaker] 19:59:998 [patcher] Restore DownloadsDataCtor.prototype.onDownloadAdded
----------
[Download Panel Tweaker] 19:59:998 fixLoadDownloads(false)
----------
[Download Panel Tweaker] 19:59:998 restoreDlItemsTooltips()
----------
[Download Panel Tweaker] 19:59:999 DownloadsCommon loaded: true
----------
[Download Panel Tweaker] 20:00:010 setItemCountLimit(): 3
----------
[Download Panel Tweaker] 20:00:010 updateDownloadsSummary(): Restore
----------
[Download Panel Tweaker] 20:00:010 setFixToolbox(false)
----------
[Download Panel Tweaker] 20:00:010 restoreDlItemsTooltips()
----------
[Download Panel Tweaker] 20:00:013 DownloadsCommon loaded: true
----------
[Download Panel Tweaker] 20:00:022 setItemCountLimit(): 3
----------
[Download Panel Tweaker] 20:00:022 updateDownloadsSummary(): Restore
----------
[Download Panel Tweaker] 20:00:022 setFixToolbox(false)
----------
[Download Panel Tweaker] 20:00:023 DownloadsCommon loaded: true
----------
[Download Panel Tweaker] 20:00:023 setItemCountLimit(): 3
----------
[Download Panel Tweaker] 20:00:023 setFixToolbox(false)
----------
[Download Panel Tweaker] 20:00:025 DownloadsCommon loaded: true
----------
[Download Panel Tweaker] 20:00:026 setItemCountLimit(): 3
----------
[Download Panel Tweaker] 20:00:026 setFixToolbox(false)
----------
[Download Panel Tweaker] 20:00:028 Successfully destroyed
----------
1406575200028 addons.xpi DEBUG Removing manifest for C:\Users\Yoyo\AppData\Roaming\Mozilla\Firefox\Profiles\Yoyo\extensions\downloadPanelTweaker@infocatcher.xpi
----------
Mon Jul 28 2014 21:20:00
Warning: Duplicate resource declaration for 'specialpowers' ignored.
Source file: jar:file:///C:/Program%20Files/Nightly/omni.ja!/chrome/chrome.manifest
Line: 34
----------
Mon Jul 28 2014 21:20:00
Warning: Duplicate resource declaration for 'gre-resources' ignored.
Source file: jar:file:///C:/Program%20Files/Nightly/omni.ja!/chrome/chrome.manifest
Line: 36
----------
Mon Jul 28 2014 21:20:00
Warning: Duplicate resource declaration for 'services-sync' ignored.
Source file: jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/components.manifest
Line: 176
----------
Mon Jul 28 2014 21:20:00
Warning: Duplicate resource declaration for 'services-common' ignored.
Source file: jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/components.manifest
Line: 178
----------
Mon Jul 28 2014 21:20:00
Warning: Duplicate resource declaration for 'services-crypto' ignored.
Source file: jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/components.manifest
Line: 179
----------
Could not read chrome manifest 'file:///C:/Program%20Files/Nightly/chrome.manifest'.
----------
Mon Jul 28 2014 21:20:00
Warning: Duplicate resource declaration for 'pdf.js' ignored.
Source file: jar:file:///C:/Program%20Files/Nightly/browser/omni.ja!/chrome/pdfjs/pdfjs.manifest
Line: 1
----------
Mon Jul 28 2014 21:20:00
Warning: Duplicate resource declaration for 'shumway' ignored.
Source file: jar:file:///C:/Program%20Files/Nightly/browser/omni.ja!/chrome/shumway/shumway.manifest
Line: 1
----------
Could not read chrome manifest 'file:///C:/Program%20Files/Nightly/browser/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest'.
----------
Warning: attempting to write 6038 bytes to preference extensions.bootstrappedAddons. This is bad for general performance and memory usage. Such an amount of data should rather be written to an external file.
----------
1406575200116 DeferredSave.extensions.json DEBUG Starting timer
----------
1406575200370 Services.Metrics.Provider.org.mozilla.addons WARN Add-on type without field: experiment
----------
1406575200370 Services.Metrics.Provider.org.mozilla.addons WARN Add-on type without field: userstyle
----------
1406575200370 Services.Metrics.Provider.org.mozilla.addons WARN Add-on type without field: userscript
----------
1406575201669 DeferredSave.extensions.json DEBUG Starting write
----------
1406575202258 DeferredSave.extensions.json DEBUG Write succeeded
Hmm... cannot replicate on a clean profile.
Disabled all my Add-Ons and still not working... so it's most likely my thousands about:config changes...
Ok, the issue somehow changed to be persistent now. Download Panel Tweaker disabling/enabling doesn't make a difference it just doesn't work. Unfortunately I don't have the time to investigate this issue more thoroughly, but as it now persists regardless of the Add-On state, the cause of this must be somewhere else and DPT somehow just triggered it in an unfortunate way. Therefore closing the issue. Thank you for the fast response, I'll probably dig more into the code when I got some more free time.
You can try to temporarily rename/remove %firefox_profile%/downloads.json to ensure that bug not comes from some malformed data in that file (this is storage for downloads, that appears in download panel and Download Panel Tweaker prevents its cleaning on each restart). Also without Download Panel Tweaker (or if "Don't remove finished downloads" not checked) downloads.json isn't saved (and therefore not cleared), if downloads aren't changed.
Great, that solved it! downloads.json hasn't been written to since yesterday evening... FWIW here's about how it looked (redacted&formatted):
{
"list" : [{
"source" : {
"url" : "[some_valid_URL]",
"referrer" : "[some_valid_URL]"
},
"target" : {
"path" : "[some_Path]",
"partFilePath" : "[some_Path]"
},
"saver" : {
"type" : "copy",
"entityID" : "/15853/"
},
"error" : {
"message" : "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]"
},
"startTime" : "2014-07-27T15:46:18.396Z",
"totalBytes" : 15853,
"hasPartialData" : true,
"tryToKeepPartialData" : true,
"contentType" : "application/pdf"
}, {
"source" : {
"url" : "[some_valid_URL]",
"referrer" : "[some_valid_URL]"
},
"target" : {
"path" : "[some_Path]",
"partFilePath" : "[some_Path]"
},
"saver" : {
"type" : "copy",
"entityID" : "/10707/"
},
"error" : {
"message" : "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]"
},
"startTime" : "2014-07-27T15:46:30.910Z",
"totalBytes" : 10707,
"hasPartialData" : true,
"tryToKeepPartialData" : true,
"contentType" : "application/pdf"
}, {
"source" : {
"url" : "[some_valid_URL]",
"referrer" : "[some_valid_URL]"
},
"target" : {
"path" : "[some_Path]",
"partFilePath" : "[some_Path]"
},
"saver" : {
"type" : "copy",
"entityID" : "/10848/"
},
"error" : {
"message" : "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) [nsIIOService.newURI]"
},
"startTime" : "2014-07-27T15:46:33.050Z",
"totalBytes" : 10848,
"hasPartialData" : true,
"tryToKeepPartialData" : true,
"contentType" : "application/pdf"
}
]
}
It feels kind of wrong to have such kind of error message stored there, but I don't know the code base so this could also be pretty much intended. Thanks for your help! Edit: Ahh ok, the Download objects get serialized completely, added to the json list and then just dumped into the file. But why would a download obect have such an error attached? I'm pretty sure the downloads were successful. Edit2: The try-catch black in DownloadCore.jsm 421ff seems to be the reason. According to the comments about the data structure the error attribute is only supposed to store DownloadErrors, but the catch block just writes any error that gets thrown, deliberately or not, into the error field.
Clicking on the download button does nothing. Disabling the Add-on restores functionality.
Error console shows this on extension re-enabling after disabling: