samedi 7 mai 2016

Issues with PouchDB + SQLite on ionic 2

I followed all the steps for PouchDB setup and SQLite. I am facing following issues:

1) this._db.info().then(console.log.bind(console)) - shows Adapter: websql , sqlite_plugin: false

Object
    adapter:"websql"
    auto_compaction:false
    db_name:"bakbak"
    doc_count:15
    sqlite_plugin:false
    update_seq:15
    websql_encoding:"UTF-8"

I am not sure what i did wrong.

2) App is working fine on Chrome. On firefox it threw an error: this.db.sync is not a function. I changed it to PouchDB.sync then error is gone. Why it happened?

3) On firefox and IE After making above change i am getting "EXCEPTION: Error: Uncaught (in promise): Error: Adapter is missing".

is this bug resolved: http://ift.tt/1WguRaQ

I tried to follow the advice here: Ionic PouchDb Sqlite plugin issue

But i do not have any pouchdb library imported in my index.html. It is not there in js folder. I can find it in node-modules folder.

<body>
<ion-app></ion-app>
<!-- cordova.js required for cordova apps -->
<script src="cordova.js"></script>
<!-- Polyfill needed for platforms without Promise and Collection support   -->
<script src="build/js/es6-shim.min.js"></script>
<!-- Zone.js and Reflect-metadata  -->
<script src="build/js/angular2-polyfills.js"></script>
<!-- the bundle which is built from the app's source code -->
<script src="build/js/app.bundle.js"></script>
</body>

Aucun commentaire:

Enregistrer un commentaire