an-rahulpandey / cordova-plugin-dbcopy

Copy SQLite Database from www folder to default app database location
Apache License 2.0
89 stars 47 forks source link

There was an error copying the database "OK" #22

Closed sekhor closed 8 years ago

sekhor commented 8 years ago

I have the following code, and tested in the a android device. Somehow the erorr is showing "OK" May I know what is the problem ?

window.plugins.sqlDB.copy("School.db", function () { alert('Sucess'); db1 = $cordovaSQLite.openDB("School.db"); }, function (error) { alert("There was an error copying the database: " + JSON.stringify(error));

        });
an-rahulpandey commented 8 years ago

Will you be able to provide the logcat output? You can use Android Studio or Eclipse or logcat command from terminal or cmd.

degosac commented 8 years ago

Hey, i have the same error and the code. here is my logcat; i am using genymotion emulator.

W/EGL_genymotion( 3771): eglSurfaceAttrib not implemented E/OpenGLRenderer( 3771): Getting MAX_TEXTURE_SIZE from GradienCache E/OpenGLRenderer( 3771): MAX_TEXTURE_SIZE: 16384 E/OpenGLRenderer( 3771): Getting MAX_TEXTURE_SIZE from Caches::initConstraints() E/OpenGLRenderer( 3771): MAX_TEXTURE_SIZE: 16384 D/OpenGLRenderer( 3771): Enabling debug mode 0 W/EGL_genymotion( 3771): eglSurfaceAttrib not implemented D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) I/ActivityManager( 583): Displayed com.ionicframework.tvseriesarchiver519587/.MainActivity: +854ms D/JsMessageQueue( 3771): Set native->JS mode to OnlineEventsBridgeMode V/StatusBar( 3771): Executing action: _ready I/chromium( 3771): [INFO:async_pixel_transfer_manager_android.cc(60)] Async pixel transfers not supported I/chromium( 3771): [INFO:async_pixel_transfer_manager_android.cc(60)] Async pixel transfers not supported D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) V/StatusBar( 3771): Executing action: styleDefault I/chromium( 3771): [INFO:CONSOLE(23)] "copying", source: file:///android_asset/www/js/app.js (23) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) I/Choreographer( 3771): Skipped 38 frames! The application may be doing too much work on its main thread. D/dalvikvm( 3771): Trying to load lib /data/app-lib/com.ionicframework.tvseriesarchiver519587-1/libsqlc-native-driver.so 0xa5068fd0 D/dalvikvm( 3771): Added shared lib /data/app-lib/com.ionicframework.tvseriesarchiver519587-1/libsqlc-native-driver.so 0xa5068fd0 D/dalvikvm( 3771): No JNI_OnLoad found in /data/app-lib/com.ionicframework.tvseriesarchiver519587-1/libsqlc-native-driver.so 0xa5068fd0, skipping init V/SQLitePlugin( 3771): Android db implementation: default-NDK V/info ( 3771): Open sqlite db: /data/data/com.ionicframework.tvseriesarchiver519587/databases/test.db D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) D/MobileDataStateTracker( 583): default: setPolicyDataEnable(enabled=true) I/chromium( 3771): [INFO:CONSOLE(28)] "There was a error copying database: "OK"", source: file:///android_asset/www/js/app.js (28) I/chromium( 3771): [INFO:CONSOLE(174)] "OPEN database: test.db", source: file:///android_asset/www/plugins/cordova-sqlite-storage/www/SQLitePlugin.js (174) I/chromium( 3771): [INFO:CONSOLE(79)] "DB opened: test.db", source: file:///android_asset/www/plugins/cordova-sqlite-storage/www/SQLitePlugin.js (79) D/dalvikvm( 583): GC_CONCURRENT freed 1981K, 33% free 11710K/17476K, paused 0ms+1ms, total 8ms

an-rahulpandey commented 8 years ago

Did you manage to solve it?

an-rahulpandey commented 8 years ago

Related to this - https://github.com/an-rahulpandey/cordova-plugin-dbcopy/issues/23