Android: opening a session crashes the app
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 22/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 领域
- mobile-dev
调研方向
The crash happens when opening a non-archived session from Home, so start with the Home transcript cache, prefetch, and unread-anchor code that runs on open, not the message renderer. Reproduce with a session of about 437 messages on an Android device, capture logcat -b crash for the failing open, and check whether the unread anchor points outside the loaded limit=30 window. Done means the session opens from Home without crashing and a regression check covers that path.
由索引模型根据 Issue 内容生成。
描述
Summary
Opening one specific session crashes the Android app immediately. The same session opens fine on iOS. Every other session on the same Android install opens fine.
Archiving the session makes it open normally from the Archived page, with the exact same server payload. So the crash is not in the message content; it looks tied to the non-archived open path (Home transcript cache / unread positioning / Catch Up).
Environment
- App: 0.8.4 (Android)
- Device: Lenovo Pad, Android 13 (tablet)
- Server: opencode 2.3.2, V2 contract
- Session: ~437 messages, ~1.2 MB
Steps
- Pair the app with the server.
- Tap the affected session from Home.
- The app closes immediately (no error screen).
Expected
Session opens and shows the latest replies.
Actual
Instant crash from Home. Other sessions open normally. iOS opens the affected session without problems.
Key observation: archiving fixes it
After archiving the session, opening it from the Archived page works normally.
Reverse-proxy logs show the app requested the same endpoint before and after archiving:
- before archive:
GET /api/session/<id>/message?order=desc&limit=30→ 18397 bytes - after archive:
GET /api/session/<id>/message?order=desc&limit=30→ 18397 bytes (identical) - after archive the app also paged older history:
GET /api/session/<id>/message?limit=80&cursor=…→ 73095 bytes, rendered fine
The archived session's newest 30 messages include the two assistant replies with Markdown tables and the 1090-char single-line tool output. They render fine in that path, so the content is not the trigger.
Hypothesis
Non-archived sessions are in Home's prefetch/cache, Catch Up and unread/new-message tracking. Archived sessions are excluded from all of those, so they open with a clean load of limit=30.
This points at the Home transcript cache or the unread-anchor logic during opening (possibly positioning on a message outside the loaded window), not at message rendering.
Ask
If useful, I can bisect further and capture logcat -b crash for the failing open. Happy to provide the full /api/session/<id>/message?order=desc&limit=30 response (sanitized) if you want to reproduce.
- 主要语言
- Kotlin
- 星标
- 146
- 派生
- 35
- 平均合并
- 7 小时 41 分钟
- 30 天内合并 PR
- 221
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
anomalyco/opencode-android 的其他 Issue
-
F-droid release未关闭
难度 3/5 1-2 天 新手友好度 55/100
anomalyco/opencode-android#345 ·
维护者通常 1 天内回复
-
Crash: IllegalStateException in AppContext.getLiveValue可能已有人在做 @Tarquinen 于 1 天前认领。 未关闭crash crash-triaged
难度 3/5 半天 新手友好度 65/100
anomalyco/opencode-android#343 · 1 条评论 ·
维护者通常 1 天内回复
-
crash crash-needs-human crash-triaged
难度 3/5 1-2 天 新手友好度 58/100
anomalyco/opencode-android#341 · 1 条评论 ·
维护者通常 1 天内回复
-
crash crash-needs-human crash-triaged
难度 3/5 1-2 天 新手友好度 45/100
anomalyco/opencode-android#340 · 1 条评论 ·
维护者通常 1 天内回复
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponse可能已有人在做 @Tarquinen 于 3 天前认领。 未关闭crash crash-triaged
难度 2/5 1-3 小时 新手友好度 35/100
anomalyco/opencode-android#320 · 1 条评论 ·
维护者通常 1 天内回复
查看 anomalyco/opencode-android 的全部 Issue
相似的 Issue
-
feature request needs decision
难度 2/5 1-3 小时 新手友好度 83/100
tswistak/Battery-Monitor#207 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
-
F-Droid FOSS question
难度 1/5 1 小时以内 新手友好度 75/100
d4rken-org/butler#365 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
panel-assistant/android#224 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复