Android: V2 latest beta update crashes on start

Created on 17 Oct 2017  路  16Comments  路  Source: nextcloud/android

Immediate crash on start.

Reinstalled and no change.

This is the version on google play and crashes on start on two separate devices.

Log sent via google play.

bug pr exists

All 16 comments

Same issue (am a beta tester)
server: 12.0.3 (Running in Docker on unRAID)
client: 2.0.0

Last know working client version: 2.0 beta end-to-end encryption, not sure about the exact version code
EDIT 1: I also submitted logs via Google Play, with a reference to this issue.
EDIT 2: I now installed the latest dev apk manually, that one is working perfectly

@AndyScherzinger paste the logs please.

This happens to 2.0.0 a lot and is due to the following, reported crash (DB Downgrade!!!)

java.lang.RuntimeException: Unable to create application com.owncloud.android.MainApp: android.database.sqlite.SQLiteException: Can't downgrade database from version 25 to 24
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5794)
    at android.app.ActivityThread.-wrap1(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
    at android.os.Handler.dispatchMessage(Handler.java:105)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6541)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: android.database.sqlite.SQLiteException: Can't downgrade database from version 25 to 24
    at android.database.sqlite.SQLiteOpenHelper.onDowngrade(SQLiteOpenHelper.java:418)
    at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:297)
    at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:218)
    at com.owncloud.android.providers.FileContentProvider.query(FileContentProvider.java:450)
    at android.content.ContentProvider.query(ContentProvider.java:1057)
    at android.content.ContentProvider.query(ContentProvider.java:1149)
    at android.content.ContentProvider$Transport.query(ContentProvider.java:242)
    at android.content.ContentResolver.query(ContentResolver.java:754)
    at android.content.ContentResolver.query(ContentResolver.java:704)
    at android.content.ContentResolver.query(ContentResolver.java:662)
    at com.owncloud.android.datamodel.SyncedFolderProvider.getSyncedFolders(SyncedFolderProvider.java:87)
    at com.owncloud.android.utils.FilesSyncHelper.scheduleNJobs(FilesSyncHelper.java:263)
    at com.owncloud.android.utils.FilesSyncHelper.scheduleFilesSyncIfNeeded(FilesSyncHelper.java:293)
    at com.owncloud.android.MainApp.initAutoUpload(MainApp.java:189)
    at com.owncloud.android.MainApp.onCreate(MainApp.java:128)
    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1118)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5791)
    ... 8 more

Master is at DB version 24 (!)
Did any of you upgrade to the end-to-end-encryption version before installing 2.0.0?

Yeah, I'm a beta tester and install updates automatically, so the version that I had before 2.0.0.0 was the version which had end-to-end encryption support. (I mentioned this in my first reaction). However I have never enabled anything related to e2e encryption on my Nextcloud Server

Same position as @tbrasser, didn't enable E2EE as it failed to create the key, but I did install the E2EE compatible app.

Thanks @tbrasser and @mannp this seems to be the root case since the db schema of the e2e version is "higher" than the latest stable so @mario my guess is that we need to look into the downgrade implementation done by @tobiasKaminsky #1559

@AndyScherzinger yup yup...

Thanks @AndyScherzinger & @mario :)

Should I use the dev build on f-droid or the standalone apk in the mean time, or just hold off for the fix, if its not too complex?

the dev build is a safe bet since it is a different installation. You can install the 2.0.0 stable to but should remove the original e2e installation on the device before.

Fix is not too complex but it'll still be some time until the next stable release.

How do I remove the E2EE version as I have uninstalled it already and tried v2 with no joy, still crashes.

Understood the dev version shouldn't be a daily driver so would prefer v2.

@mannp try to navigate through Android鈥榮 app settings to the Nextcloud app and clear all data there, then uninstall and reinstall.hope that solves the issue. :/

Will future E2EE releases play better with the existing versions? :)

Wouldn't they be classed as dev releases?

Well, I do hope they do and there is already a change that should help with downgrades. Still DB versioning will probably always be an issue depending on the development of the stable branch vs. the e2e branch.

PR #1559 for DB downgrades has been merged for 2.1, so closing this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tobiasKaminsky picture tobiasKaminsky  路  3Comments

toobie83 picture toobie83  路  3Comments

Bugsbane picture Bugsbane  路  3Comments

JSoko picture JSoko  路  3Comments

JSoko picture JSoko  路  3Comments