Skip to content

bug: Data import from Rikkahub Error #11

Closed

Description

@Ammar-create

问题描述 | Problem Description

I will describe how this happened. I opened the app, went into Settings, clicked on Data Management, then Local, then Import Data. I chose the file I had used to import data from RikaHub, and then the app reset. I restarted the app, and when I went there, an error occurred: every time I click Open App, the app closes instantly

期望行为 | Expected Behavior

I expected that when I import the data, all of my data from RikaHub would be here, but that wasn't the case

截图 | Screenshots

Thread: arch_disk_io_1
android.database.sqlite.SQLiteException: duplicate column name: custom_system_prompt (code 1): , while compiling: ALTER TABLE ConversationEntity ADD COLUMN custom_system_prompt TEXT NOT NULL DEFAULT ''
at io.requery.android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at io.requery.android.database.sqlite.SQLiteConnection.acquirePreparedStatement(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:23)
at io.requery.android.database.sqlite.SQLiteConnection.prepare(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:12)
at io.requery.android.database.sqlite.SQLiteSession.prepare(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:13)
at io.requery.android.database.sqlite.SQLiteProgram.(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:44)
at io.requery.android.database.sqlite.SQLiteStatement.(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:2)
at io.requery.android.database.sqlite.SQLiteDatabase.compileStatement(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:7)
at io.requery.android.database.sqlite.SQLiteDatabase.compileStatement(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:19)
at androidx.sqlite.driver.SupportSQLiteStatement$OtherSQLiteStatement.(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:13)
at androidx.sqlite.driver.SupportSQLiteConnection.prepare(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:347)
at androidx.sqlite.SQLite.execSQL(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:4)
at me.rerere.rikkahub.data.db.AppDatabase_AutoMigration_1_2_Impl.migrate(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:1438)
at okio.FileMetadata.onMigrate(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:189)
at androidx.room.RoomConnectionManager$SupportOpenHelperCallback.onUpgrade(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:11)
at io.requery.android.database.sqlite.RequerySQLiteOpenHelperFactory$CallbackSQLiteOpenHelper.onUpgrade(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:3)
at io.requery.android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:190)
at io.requery.android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:3)
at io.requery.android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:12)
at androidx.paging.HintHandler.open(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:73)
at androidx.room.RoomDatabase$$ExternalSyntheticLambda1.invoke(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:123)
at kotlin.SynchronizedLazyImpl.getValue(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:21)
at androidx.room.coroutines.PassthroughConnectionPool.useConnection(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:31)
at androidx.room.RoomDatabase.useConnection(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:9)
at androidx.room.TriggerBasedInvalidationTracker.syncTriggers$room_runtime(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:74)
at io.ktor.client.engine.okhttp.OkHttpEngine$1.invokeSuspend(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:1611)
at io.ktor.client.engine.okhttp.OkHttpEngine$1.invoke(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:302)
at androidx.transition.ViewUtilsApi19.startUndispatched(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:19)
at kotlinx.coroutines.JobKt.withContext(dex-id-93a1ecc00224e4bb184c2ffab04cef8902500317:80)
at androidx.room.TriggerBasedInvalidationTracker$createFlow$1.invokeSuspend(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:1175)
at androidx.room.TriggerBasedInvalidationTracker$createFlow$1.invoke(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:78)
at kotlinx.coroutines.flow.SafeFlow.collect(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:750)
at androidx.room.paging.CommonLimitOffsetImpl$1.invokeSuspend(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:128)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:8)
at kotlinx.coroutines.DispatchedTask.run(r8-map-id-025b6369bcdf30d749708ac5b9e7bff46147da48757487536c3cfb1a3ad6478e:114)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1100)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:1572)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@3b76e5d, androidx.arch.core.executor.ArchTaskExecutor$$ExternalSyntheticLambda0@1a883d2]

使用的提供商 | Provider

No response

使用的模型 | Model

No response

接口类型 | API Type

None

APP 版本 | App Version

v2.4.1

安卓版本 | Android Version

Android 13

手机型号 | Device Model

Lenovo Tab M9

Activity

  1. ExTV commented on Jul 13, 2026

    @ExTV
    Owner

    Fixed in v2.4.1-agent.2.

    The crash came from a database schema-version mismatch. A backup exported by the original RikkaHub is stamped with a lower internal DB version than this fork uses, so on import the app replayed a migration that re-added a column the backup already had (custom_system_prompt) and then crashed on every launch.

    To recover: install v2.4.1-agent.2, then import your backup again. It now restores and opens normally.

    Note: backups from RikkaHub versions older than 2.4 may still not import cleanly. If you hit that, update the original RikkaHub to a current version and export a fresh backup first.

    Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions