cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter (JIRA)" <>
Subject [jira] [Commented] (CB-4742) storage.spec.18 fails if storage plugin is used
Date Mon, 09 Sep 2013 01:10:51 GMT


Peter commented on CB-4742:

@Joe: Here is some more information:

If we add some debugging alert to to cordova.js 

var originalOpenDatabase = modulemapper.getOriginalSymbol(window, 'openDatabase');

module.exports = function(name, version, desc, size) {
    // First patch WebSQL if necessary
    if (!originalOpenDatabase) {
        // Not defined, create an openDatabase function for all to use!
        alert('DEBUG: openDatabase not defined. Use plugin');
        return storage.openDatabase.apply(this, arguments);

then my Cordova application it behaves differently depending how it is run:

* The *normal* mobile-spec cordova app doesn't get to the alert - it's using the native openDatabase

* If the mobile-spec app is *embedded in a CordovaWebView* (eg
then it always outputs the alert - so it's using the Cordova plugin implementation.


Q. Is this because of the namespace problem that you described?

Q. Can you please provide some reference about that namespace problem you described so we
could learn more about it?


> storage.spec.18 fails if storage plugin is used
> -----------------------------------------------
>                 Key: CB-4742
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, CordovaJS, mobile-spec
>    Affects Versions: 2.9.0
>         Environment: Samsung Galaxy Tab - Android 4.0.3
>            Reporter: Peter
>            Assignee: Joe Bowser
> The mobile-spec test for storage.spec.18 can fail if the storage plugin is used.
> Failure happens during DROP and says "no such table: foo2 (code 1)" because it is attempting
the DROP foo2 before the CREATE foo2 has happened.
> It seems caused by the same issue reported here:
Transaction success callback is called prematurely.

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

View raw message