incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kamen Kanchev (JIRA)" <>
Subject [jira] [Commented] (CB-964) Error in success callback should generate event
Date Wed, 27 Jun 2012 22:08:44 GMT


Kamen Kanchev commented on CB-964:

I use iOS, but didn't test on any other platform.
Indeed, there is an exception logged via console.log, but in production, this really doesn't
matter. It would be just nice to listen if for example the ondeviceready handler passed successfully
its execution or not. This could be done if we listen for particular event on loading. The
fireDocumentEvent could be added on line 255 of the file (v1.8.1).
The reason I want this to be added, is because Sencha Touch 2 corrupts the local storage structure
on very rare occasions (in my case, it happened after 10 days of heavy usage of the app).
So, when the localstorage is corrupted, Sencha Touch 2 fails to load its resources, throws
an exception and the application blocks. Since I was aware of that, I was listening for errors
during loading via window.onerror, however the error message never appeared, since it turned
out to be caught by CordovaJS. In my case, if the localstorage is corrupted, this situation
makes the application impossible to load. Furthermore, it needs a newer version or pre-installation
in order to be able to have the app running again normally.
I guess, such error event could be handful to other cases too, especially to guys using ST2.
> Error in success callback should generate event
> -----------------------------------------------
>                 Key: CB-964
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CordovaJS
>    Affects Versions: 1.9.0
>            Reporter: Kamen Kanchev
>            Assignee: Filip Maj
> Error in success callback should generate a document event. This is important when loading,
since for example an error occurs while deviceready. There is a try-catch statement in the
CordovaJS, hence window.onerror() is not detecting the error.
> For example, Sencha Touch 2 fails to load because of localstorage corruption while loading,
an the app crashes. A possible fix in this case is to clear the local storage and to window.location.reload();
> it is very east to fix this one - just add:
> fireDocumentEvent("CDVSuccessCallbackError");

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message