For what it's worth, the error from the console is coming from http://mxr.mozilla.org/mozilla-central/source/toolkit/content/widgets/stringbundle.xml#25 but I have no idea if that's related to your real problem or not.

Cheers,
Josh

On 2014-10-04 3:16 AM, Manish wrote:
Hi Guys,

I have been working on a desktop application named "AZARDI" which is based on 
xulrunner. It is an offline ePub Reader for all three major platforms (Windows, Mac, 
Linux). You can check it out at http://azardi.infogridpacific.com/.

I have been deploying the application successfully with xulrunner 30.0 and 
earlier along with the mar auto-update. Now I want to deploy it with xulrunner 
32.0 and thats when I am facing the problem. The application is not executing 
the updates.xml file because of which it is unable to download the mar file 
update.

Application execute the below code for the mar file download:

-------------------------------------------------------------

var checkUpdates = function() {
                var updateListener = {
                        onProgress: function(request, position, totalSize) {
                        // alert('update check progress');
                },
             onCheckComplete: function(request, updates, updateCount) {
                    //After retrieving updates.xml successfully, application 
will execute this code.
                                alert('onCheckComplete' + "" + updateCount + "" 
+ request.responseText);
        
                                if(updateCount > 0) {
                        //Don't ask user for applying updates. Do it at all.
                        var updater = 
Components.classes["@mozilla.org/updates/update-service;1"].createInstance(Components.interfaces.nsIApplicationUpdateService);
        
                        var update = updater.selectUpdate(updates, updateCount);
                        var download = updater.downloadUpdate(update, false);
                                        alert(download);
                    }
             },
             onError: function(request, update) {
                 //alert('update check error');
             },
             QueryInterface: function(aIID) {
                 if (! aIID.equals(Components.interfaces.nsIUpdateCheckListener) 
&& ! aIID.equals(Components.interfaces.nsISupports))
                         throw Components.results.NS_ERROR_NO_INTERFACE;
                 return this;
             }
                };
        
         var checker = 
Components.classes["@mozilla.org/updates/update-checker;1"].createInstance(Components.interfaces.nsIUpdateChecker);

         checker.checkForUpdates(updateListener, true);
        }

     // init update checking
        self.checkUpdates();

----------------------------------------------------------------------

We have been following the above strategy in our earlier version also with no 
issues.

However on debugging, we found that updates.xml file is downloading, but the 
updateCount is 0. So the mar file download is not happening. Also we came 
across this error on console:

Error: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 
(NS_ERROR_FAILURE) [nsIStringBundle.GetStringFromName]
Source File: XStringBundle
Line: 21

Any help will be useful.

Thanks in advance.


_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to