android.database.sqlite.SQLiteException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • While testing an app crached on calling navigator.contacts.find with var options = new ContactFindOptions(); options.filter = ""; options.multiple = true; var fields = ["name", "emails", "phoneNumbers"]; var self = this; navigator.contacts.find(fields, function (res) { ... }, function (err) { ... }, options); 05-12 16:39:41.226 24766 24860 E SQLiteLog: (14) cannot open file at line 30046 of [9491ba7d73] 05-12 16:39:41.226 24766 24860 E SQLiteLog: (14) os_unix.c:30046: (24) open(/data/user/0/com.android.providers.contacts/databases/contacts2.db-journal) - 05-12 16:39:41.226 24766 24860 E SQLiteLog: (14) cannot open file at line 30046 of [9491ba7d73] 05-12 16:39:41.226 24766 24860 E SQLiteLog: (14) os_unix.c:30046: (24) open(/data/user/0/com.android.providers.contacts/databases/contacts2.db-journal) - 05-12 16:39:41.226 24766 24860 E SQLiteLog: (14) statement aborts at 91: [SELECT DISTINCT data15 FROM htc_data_view_restricted data LEFT OUTER JOIN (SELECT data_usage_stat.data_id as STAT_DATA_ID, SUM(data_usage_stat.times_used) as times_used, MAX(data_usage 05-12 16:39:41.226 24766 24860 E SQLiteDBG: func: nativeExecuteForCursorWindow, errno: 24, error msg: Too many open files, path: /data/user/0/com.android.providers.contacts/databases/contacts2.db, handle: 0x5588199170 05-12 16:39:41.226 24766 24860 E SQLiteQuery: exception: unable to open database file (code 14); query: SELECT DISTINCT data15 FROM htc_data_view_restricted data LEFT OUTER JOIN (SELECT data_usage_stat.data_id as STAT_DATA_ID, SUM(data_usage_stat.times_used) as times_used, MAX(data_usage_stat.last_time_used) as last_time_used FROM data_usage_stat GROUP BY data_usage_stat.data_id) as data_usage_stat ON (STAT_DATA_ID=data._id) WHERE (1 AND contact_id=? AND _id=photo_id) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: Writing exception to parcel 05-12 16:39:41.226 24766 24860 E DatabaseUtils: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:873) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:172) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:161) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.database.CursorToBulkCursorAdaptor.getBulkCursorDescriptor(CursorToBulkCursorAdaptor.java:162) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:152) 05-12 16:39:41.226 24766 24860 E DatabaseUtils: at android.os.Binder.execTransact(Binder.java:454) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: FATAL EXCEPTION: pool-2-thread-2 05-12 16:39:41.236 24706 24759 E AndroidRuntime: Process: com.foo.bar, PID: 24706 05-12 16:39:41.236 24706 24759 E AndroidRuntime: android.database.sqlite.SQLiteException: unable to open database file (code 14) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:181) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:137) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at android.content.ContentProviderProxy.query(ContentProviderNative.java:470) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:499) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:443) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at org.apache.cordova.contacts.ContactAccessorSdk5.photoQuery(ContactAccessorSdk5.java:910) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at org.apache.cordova.contacts.ContactAccessorSdk5.populateContactArray(ContactAccessorSdk5.java:439) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at org.apache.cordova.contacts.ContactAccessorSdk5.search(ContactAccessorSdk5.java:271) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at org.apache.cordova.contacts.ContactManager$1.run(ContactManager.java:93) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 05-12 16:39:41.236 24706 24759 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818) 05-12 16:39:41.256 1254 4246 E ActivityManager: App crashed! Process: com.foo.bar 05-12 16:39:41.256 4490 4490 D WIFI_ICON: WifiActivity: 1
    via by Susanna Huhtanen,
  • Android Application crashes on Startup
    via Stack Overflow by Gantrof
    ,
  • I want to fetch and view sms conversations?
    via Stack Overflow by Harinder
    ,
    • android.database.sqlite.SQLiteException: unable to open database file (code 14) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:179) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135) at android.content.ContentProviderProxy.query(ContentProviderNative.java:421) at android.content.ContentResolver.query(ContentResolver.java:497) at android.content.ContentResolver.query(ContentResolver.java:439) at com.sangcomz.fishbun.ui.album.AlbumActivity.getAllMediaThumbnailsPath(AlbumActivity.java:312) at com.sangcomz.fishbun.ui.album.AlbumActivity.access$500(AlbumActivity.java:36) at com.sangcomz.fishbun.ui.album.AlbumActivity$DisplayThumbnail.doInBackground(AlbumActivity.java:271) at com.sangcomz.fishbun.ui.album.AlbumActivity$DisplayThumbnail.doInBackground(AlbumActivity.java:257) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor3 times, last one,
    Rajesh
    20 times, last one,
    jk
    8 times, last one,
    8 more bugmates