Cordova-sqlite-storage: Error: exec proxy not found for :: SQLitePlugin :: open

Created on 25 Apr 2016  路  7Comments  路  Source: storesafe/cordova-sqlite-storage

Hello i install using:

cordova plugin add cordova-sqlite-storage --save

Try to open using:

document.addEventListener('deviceready', onDeviceReady, false);

function onDeviceReady() {
    var db = window.sqlitePlugin.openDatabase({name: "app.db", location:'default'});
}

OPEN database: app.db
Error: exec proxy not found for :: SQLitePlugin :: open
OPEN database: app.db failed, aborting any pending transactions
Could not open database

Config.xml:
<plugin name="cordova-sqlite-storage" spec="~1.2.1" />

I try search but i can't find anything, i miss something?

enhancement question

Most helpful comment

Sorry, the browser platform is _NOT_ supported.

All 7 comments

There is no way to help if you do not specify which platform(s) (Android/iOS).

This looks like a problem with your installation.

@brodybits Hello, using Android!

Installed platforms:
android 5.1.1
browser 4.1.0

I using browser for testing, i created new project and get same error.

poc

Also using: db = window.openDatabase("Dummy_DB", "1.0", "Just a Dummy DB", 0); works!

That is using built-in Web SQL.

But can you tell me what kind of parameter is set in this constructor?

It needs the name of the database and a location specifier. The location specifier only makes a difference for iOS. It is all in the documentation.

If you continue to have problems:

  1. Please be sure you are using the latest version of Cordova: npm update -g cordova
  2. Please be sure to start from a fresh, clean project with no other plugins or frameworks such as Angular/Ionic/React/etc.
  3. Confirm which version of Cordova you are using by the following command: cordova --version
  4. Post a copy of your project somewhere and I will look at it when I get a chance.

@brodybits Thanks! Also:

  1. done.
  2. done.
  3. 6.1.1
  4. I created a blank project and keep get the same error, should i use older version?

Sorry, the browser platform is _NOT_ supported.

@brodybits Ok! I will test in android.

I have tested and its works very well, thanks!

Was this page helpful?
0 / 5 - 0 ratings