vendredi 17 avril 2015

Cordova plugins deployment on windows platform : errors with plugins installation and SQLite plugin execution

I’m building Windows phone and windows applications using cordova.


The project uses 7 plugins :



  1. io.litehelpers.sqliteStorage

  2. org.apache.cordova.device

  3. org.apache.cordova.file

  4. org.apache.cordova.file-transfer

  5. org.apache.cordova.globalization (1)

  6. org.apache.cordova.network-information

  7. org.bloxlab.barcodescanner (2)


First, I deployed the application on windows phone 8 platform, with additional native adjustments, It works great. But not the same on windows 8. I note cordova creates all plugins directory under wp8 platform root project, with all plugins subdirectories including specific references/libraries, but not the same for windows : • (1) is created. • (2) is specific for WP8 platform, so i integrated com.phonegap.plugins.barcodescanner plugin for scanner function. This one is also created. • Not the others.


The application loads SQLite database when starting, and crashes immediately with error : « SQLite 3 Database : Type non constructible ». Stack :


"TypeError: SQLite3.Database : type non constructible\n at Anonymous function (ms-appx://fr.myproject.project1/www/plugins/io.litehelpers.sqliteStorage/src/windows/SQLite3-WinRT/SQLite3JS/js/SQLite3.js:118:7)\n at module.exports.open (ms-appx://fr.myproject.project1/www/plugins/io.litehelpers.sqliteStorage/src/windows/SQLiteProxy.js:32:4)\n at module.exports (ms-appx://fr.myproject.project1/www/cordova.js:874:13)\n at SQLitePlugin.prototype.open (ms-appx://fr.myproject.project1www/plugins/io.litehelpers.sqliteStorage/www/SQLitePlugin.js:201:7)\n at SQLitePlugin (ms-appx://fr.myproject.project1/www/plugins/io.litehelpers.sqliteStorage/www/SQLitePlugin.js:81:5)\n at Anonymous function (ms-appx://fr.myproject.project1/www/plugins/io.litehelpers.sqliteStorage/www/SQLitePlugin.js:545:7)\n at Anonymous function (ms-appx://fr.myproject.project1/www/plugins/io.litehelpers.sqliteStorage/www/SQLitePlugin.js:58:9)\n at openDb (ms-appx://fr.myproject.project1www/js/bdd.js:7:17)\n at Anonymous function (ms-appx://fr.myproject.project1/www/js/index.js:208:33)\n at fire (ms-appx://fr.myproject.project1/www/js/jquery.js:974:17)"


Does anybody have a solution ?


Aucun commentaire:

Enregistrer un commentaire