[Nexus 5X Q&A, Help & Troubleshooting] dcarrco:
Code 14: Could not open database. Some sort of permissions problem?

I have had CM 12.1 on a Nexus 5 for a while. Every time I upgraded to CM13 everything would work fine EXCEPT messaging would keep throwing "Sorry, messaging has stopped" message. So I Stayed on CM12.1. I just upgraded to a Nexus 5X and there is no CM12.1 for it so I tried Cm13 (Latest Nightly 6-18) and it seemed to work fine, just on WiFi and setting it up. I loaded what I always do, Android Firewall, checked all my permissions in Privacy Guard, used SU2.95 so I would have root. It still worked fine connected to my WiFi. I just got back from TMobile where I had to switch from MicroSIM to NanoSIM. put the sim in and the same messaging error shows up. So, working backwards, I unchecked ALL privacy guard, turned OFF the firewall, and rebooted. Still gives me the messaging error. So, I finally read the error message and its SQLite Error 14 on some database. Any ideas what I could try next? I suppose I can reload CM and set it all up again, and see where it starts to fail but that would be throwing away 4 hours from yesterday. I'm also not certain that the native App permissions aren't involved somehow. The phone IS encrypted but I have tried it both ways in the past.

I know there are all sorts of geniuses on here, and I am not smart enough.

java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
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)
Caused by: android.database.sqlite.SQLiteException: unknown error (code 14): Could not open database
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:493)
at android.content.ContentResolver.query(ContentResolver.java:435)
at com.android.messaging.util.f.oH(SourceFile:53)
at com.android.messaging.util.f.doInBackground(SourceFile:34)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 4 more

EDIT : so i got into App permissions (new to MM?) and made sure the messaging service had storage and read and write on SMS. still looking deeper and searching the net...

EDIT : APN issue? reset to default TMobile settings and rebooted. still fails.

EDIT : could it be that I used the PICO version of OpenGAPPS? anyone had a problem with that? been searching still...

SOLVED : I'm such an idiot. I have been moving my blacklist.db database from version to version so I dont have to put all the numbers in again (wouldn't it be nice if there was a blacklist manager? I have all these spam numbers attached to a contact but you still have to choose them one by one) and of course between CM 12.1 and CM 13 they changed the database format or something so thats why it was crashing. Just one of the many steps I took getting my new phone set up.