[AT&T Samsung Galaxy S II SGH-I777] whyspee:
Database downgrade issue

Hi.

First, thanks a lot Thenetstriker for this very interesting improvement on the E-mail app!

However I hadn't the possibility to test your app since I got an exception that caused the app to crash when I started it.

Here's the stack trace:

12-28 18:59:52.265: I/ActivityManager(592): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.android.email cmp=com.android.email/.activity.Welcome} from pid 6440

12-28 18:59:52.385: I/ActivityManager(592): Start proc com.android.email for activity com.android.email/.activity.Welcome: pid=7013 uid=10018 gids={50018, 3003, 1015, 1028}

12-28 18:59:52.485: W/dalvikvm(7013): threadid=11: thread exiting with uncaught exception (group=0x4173f7c0)

12-28 18:59:52.485: D/ExchangeService(1641): !!! EAS ExchangeService, onStartCommand, startingUp = false, running = true

12-28 18:59:52.485: E/AndroidRuntime(7013): FATAL EXCEPTION: AsyncTask #1

12-28 18:59:52.485: E/AndroidRuntime(7013): java.lang.RuntimeException: An error occured while executing doInBackground()

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.os.AsyncTask$3.done(AsyncTask.java:299)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at java.util.concurrent.FutureTask.setException(FutureTask.java:219)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at java.util.concurrent.FutureTask.run(FutureTask.java:239)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at java.lang.Thread.run(Thread.java:841)

12-28 18:59:52.485: E/AndroidRuntime(7013): Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 40 to 39

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.database.sqlite.SQLiteOpenHelper.onDowngrade(SQLiteOpenHelper.java:361)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:255)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at com.android.email.provider.EmailProvider.getDatabase(EmailProvider.java:478)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at com.android.email.provider.EmailProvider.query(EmailProvider.java:1106)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.content.ContentProvider.query(ContentProvider.java:744)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.content.ContentProvider$Transport.query(ContentProvider.java:199)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.content.ContentResolver.query(ContentResolver.java:414)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.content.ContentResolver.query(ContentResolver.java:357)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at com.android.email.Email.setServicesEnabledSync(Email.java:114)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at com.android.email.Email$1.run(Email.java:96)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at com.android.emailcommon.utility.EmailAsyncTask$1.doInBackground(EmailAsyncTask.java:247)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at com.android.emailcommon.utility.EmailAsyncTask$1.doInBackground(EmailAsyncTask.java:244)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at com.android.emailcommon.utility.EmailAsyncTask$InnerTask.doInBackground(EmailAsyncTask.java:118)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at android.os.AsyncTask$2.call(AsyncTask.java:287)

12-28 18:59:52.485: E/AndroidRuntime(7013):	at java.util.concurrent.FutureTask.run(FutureTask.java:234)

12-28 18:59:52.485: E/AndroidRuntime(7013):	... 3 more

12-28 18:59:52.495: W/ActivityManager(592): Force finishing activity com.android.email/.activity.Welcome

12-28 18:59:52.545: W/dalvikvm(7013): threadid=13: thread exiting with uncaught exception (group=0x4173f7c0)

12-28 18:59:52.545: I/Process(7013): Sending signal. PID: 7013 SIG: 9

I run cm-10.2.0-mako and I installed this version of Google Apps: gapps-jb-20130813-signed.

So you probably know better than me where the problem can come from. At least I guess the best thing to do would be to update your app to match the latest version of the E-mail app but I know it's very easy to say but way harder to do! ;)

Otherwise, do you know how I can downgrade the database? Should I erase the preferences and cache of the E-mail app for example? Or delete my e-mail accounts from the phone?

Thanks in advance for your answer! :cyclops: