Crash: IllegalStateException in AppContext.getLiveValue

Offen
#343 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Tarquinen arbeitet bereits daran.

Seit 28.11.2026.

  • #344 von @Tarquinen — offen

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
65/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
android, kotlin
Bereich
mobile-dev

Rechercherichtung

Start with ai.opencode.core.dependencies.AppContext.getLiveValue in AppContext.java, then follow the dependency initialization through DependencyValues.kt, AppFeatureMigrations.kt, and MainActivity.kt as shown in the stack trace. Reproduce the startup path and identify why the live dependency value throws IllegalStateException. The change is done when the affected startup path no longer crashes and the relevant dependency lifecycle behavior is covered by a test.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

crash crash-triaged

Google Play reported this crash (Android vitals).

  • Exception: java.lang.IllegalStateException
  • Where: ai.opencode.core.dependencies.AppContext.getLiveValue
  • Last 7 days: 2 reports from about 2 users
  • Version codes: 380–1015
  • Android API levels: 34–36
  • Last seen: 2026-11-27
  • Sample: Samsung Galaxy A72, Android API 34, version code 380, commit 82079247e
Exception java.lang.RuntimeException
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4164)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:4322)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:103)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:139)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:96)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2685)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:8919)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:578)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)
  at ai.opencode.core.dependencies.AppContext.getLiveValue (AppContext.java:20)
  at ai.opencode.core.dependencies.AppContext.getLiveValue (AppContext.java:18)
  at ai.opencode.core.dependencies.DependencyValues$Companion.live (DependencyValues.java:65)
  at ai.opencode.core.dependencies.DependencyValues$Companion.access$live (DependencyValues.java:60)
  at ai.opencode.core.dependencies.DependencyValues.get (DependencyValues.kt:35)
  at ai.opencode.core.dependencies.DependencyValuesKt.dependency (DependencyValues.kt:135)
  at ai.opencode.core.sharing.LiveSharedBytes$Companion.create (LiveSharedBytes.java:185)
  at ai.opencode.core.sharing.SharedStore.liveValue_delegate$lambda$0 (SharedStore.java:150)
  at kotlin.SynchronizedLazyImpl.getValue (LazyJVM.kt:86)
  at ai.opencode.core.sharing.SharedStore$Key.getLiveValue (SharedStore.java:150)
  at ai.opencode.core.sharing.SharedStore$Key.getLiveValue (SharedStore.java:149)
  at ai.opencode.core.dependencies.DependencyValues$Companion.live (DependencyValues.java:65)
  at ai.opencode.core.dependencies.DependencyValues$Companion.access$live (DependencyValues.java:60)
  at ai.opencode.core.dependencies.DependencyValues.get (DependencyValues.kt:35)
  at ai.opencode.core.dependencies.DependencyValuesKt.dependency (DependencyValues.kt:135)
  at ai.opencode.app.AppFeatureMigrationsKt.migrateBeforeRestore (AppFeatureMigrations.kt:58)
  at ai.opencode.app.AppFeature$State$Companion.initial (AppFeature.java:278)
  at ai.opencode.app.RootStore.resolve$lambda$0 (RootStore.java:245)
  at ai.opencode.app.RootStore.resolve (RootStore.java:261)
  at ai.opencode.app.RootStore.resolve (RootStore.java:244)
  at ai.opencode.app.MainActivity.onCreate (MainActivity.kt:100)
  at android.app.Activity.performCreate (Activity.java:8975)
  at android.app.Activity.performCreate (Activity.java:8944)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1456)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:4146)

Play Console (needs access):

Vorherrschende Sprache
Kotlin
Sterne
146
Forks
35
Ø Merge
7 Std. 41 Min.
Gemergte PRs (30 T.)
221

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus anomalyco/opencode-android

Alle Issues in anomalyco/opencode-android

Ähnliche Issues

Weitere Issues zu Kotlin

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.