Skip to content

Crashes if a command is approved after longer period if time #160

Description

@scrool
  1. Get a a connection over ssh or over a paired one
  2. Open a thread and keep it open
  3. Either in kitty litter or on the remote host get codex do its job which would result in an approval
  4. Once approval shows up, ignore it, wait few minutes, possibly some time after screen locks
  5. Tap on approval

Observe: Application quits.

Adb logs show a crash. Stack trace:

05-25 16:50:37.867 14497 14497 E AndroidRuntime: FATAL EXCEPTION: main
05-25 16:50:37.867 14497 14497 E AndroidRuntime: Process: com.sigkitten.litter.android, PID: 14497
05-25 16:50:37.867 14497 14497 E AndroidRuntime: uniffi.codex_mobile_client.ClientException$Rpc: v1=transport error: disconnected
    at uniffi.codex_mobile_client.FfiConverterTypeClientError.read(codex_mobile_client.kt:26266)
    ... (UniFFI lifting machinery)
    at uniffi.codex_mobile_client.Codex_mobile_clientKt.uniffiCheckCallStatus(codex_mobile_client.kt:252)
    at uniffi.codex_mobile_client.Codex_mobile_clientKt.uniffiRustCallAsync(codex_mobile_client.kt:36299)
    at uniffi.codex_mobile_client.Codex_mobile_clientKt$uniffiRustCallAsync$1.invokeSuspend(Unknown Source:19)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81)
    ...
    at android.app.ActivityThread.main(ActivityThread.java:10346)
    Suppressed: DiagnosticCoroutineContextException: [..., StandaloneCoroutine{Cancelling}@725a4ba, AndroidUiDispatcher@513ff6b]

05-25 16:50:37.870  1335 21029 W ActivityManager: crash : com.sigkitten.litter.android,10600
05-25 16:50:37.871  1335  5226 W ActivityTaskManager: Force finishing activity com.sigkitten.litter.android/com.litter.android.MainActivity

Additional info

  • Sometimes I see the server disconnected and upon switching to the app it reconnects.
  • If I respond fast enough, there is no crash
  • If I start the app again and wait for the reconnect I get the same approval and on reaction I don't see a crash either
  • I have one remote device over ssh and other paired one. I'm able to get all crash with either of them.
  • I have tested this with codex only.
  • I have full adb logs and I can provide more excerpts, pseudonymized logs or full in private if info in this report is not enough to reproduce the issue.
  • Amp code provided me some analysis, but I'm unable to confirm how accurate it is so I'm not sharing that. Again, if it would be helpful I can share that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions