Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App doesn't start on some devices #2551

Closed
gino-m opened this issue Jul 18, 2024 · 2 comments · Fixed by #2603
Closed

App doesn't start on some devices #2551

gino-m opened this issue Jul 18, 2024 · 2 comments · Fixed by #2603
Assignees
Labels
type: bug Something isn't working

Comments

@gino-m
Copy link
Collaborator

gino-m commented Jul 18, 2024

The app crashes immediately after opening with no error message.

The likely culprit is that we've recently disabled destructive migrations, but we don't have any migrations implemented, so the app crashes when trying to upgrade the local db.

https://console.firebase.google.com/project/of-ground/crashlytics/app/android:org.openforis.ground/issues/5b84c7cbace4a03aa2c306d463cd4c8b?time=last-seven-days&sessionEventKey=66989F78037200016ECEE70338003D9A_1971279737149363807

Workaround: Uninstall and reinstall the app

To fix: Re-enable destructive migrations

@gino-m gino-m added the type: bug Something isn't working label Jul 18, 2024
@anandwana001
Copy link
Collaborator

@gino-m It looks like the crash link is not publically accessible. We can add crash logs if any contributor is interested in fixing the issue.

@gino-m
Copy link
Collaborator Author

gino-m commented Jul 29, 2024

My apologies. Here's the stack trace:

          Fatal Exception: java.lang.IllegalStateException: A migration from 113 to 117 was required but not found. Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...) or allow for destructive migrations via one of the RoomDatabase.Builder.fallbackToDestructiveMigration* methods.
       at androidx.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.kt:109)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onUpgrade(FrameworkSQLiteOpenHelper.kt:253)
       at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:519)
       at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:417)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableOrReadableDatabase(FrameworkSQLiteOpenHelper.kt:232)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.innerGetDatabase(FrameworkSQLiteOpenHelper.kt:190)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getSupportDatabase(FrameworkSQLiteOpenHelper.kt:151)
       at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.kt:104)
       at com.google.android.ground.persistence.local.room.LocalDatabase_Impl.clearAllTables(LocalDatabase_Impl.java:495)
       at com.google.android.ground.MainViewModel$onUserSignedOut$1$1.invokeSuspend(MainViewModel.kt:109)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
       at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)       

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants