Crash opening the classic editor for a post that was just deleted (precondition in AztecPostViewController.init)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- ios, swift
- 领域
- mobile-dev
调研方向
Start with EditPostViewController.swift and AztecPostViewController.swift, then trace the candidate flow through PostListEditorPresenter and PostRepository.paginate. Build the Jetpack scheme and try the repro steps with a site containing more than 40 posts. Done means reporting whether you reproduced a deleted post reaching the editor precondition and, if so, what cause or fix approach you found.
由索引模型根据 Issue 内容生成。
描述
Likely shares a root cause with #26316, #26317, #26318, #26320. See #26323: posts are deleted locally by a first-page list sync while still in use.
Sentry: JETPACK-IOS-1GFE
Not actually new in 27.3. On 27.3 these events land in JETPACK-IOS-1GFE, but the same crash (same title, culprit and stack) was grouped as JETPACK-IOS-1HPP and JETPACK-IOS-1HQY on 26.9 to 27.2. Sentry regrouped it on 27.3, possibly because 27.3 was the first build made with Xcode 27 (#26018); that's unconfirmed. The 27.2→27.3 window has no editor or post-list change that explains it.
Sentry snapshot (as of Oct 30, 2026)
Users by release (all three groups, last 90 days): 27.3: 46 · 27.2: 43 · 27.1: 42 · 27.0: 10 · 26.9: 4. 27.3 has about 4.2× as many users reporting any error as 27.2, so per user this is lower on 27.3, not a regression.
Devices: mostly recent iPhones (iPhone 14 to 17 Pro), plus a few iPads. iOS 26.5 to 27.2. App in the foreground.
Stack (fatal, EXC_BREAKPOINT):
EditPostViewController.viewDidAppear → showEditor() (EditPostViewController.swift:128) → EditorFactory.instantiateEditor (EditorFactory.swift:23) → AztecPostViewController.init (AztecPostViewController.swift:450) → precondition(post.managedObjectContext != nil).
The post handed to the editor has already been deleted from Core Data.
Breadcrumb patterns (3 events read)
- 3 of 3: the user closes an editor (
closeWasPressed, sometimes with the discard/save alert) while aPOST …/posts/…?context=editsave is still in flight, then opens an editor again within ~1–2 seconds. The newEditPostViewControllercrashes as it appears. - 2 of 3: the Posts list (Drafts tab) is open and its first page re-syncs (
status=draft,pending&offset=0) repeatedly while the editor is up. - 1 of 3: iPad split view.
Candidate code (hypotheses, not confirmed)
- Stale rows while an editor is open.
PostListEditorPresenter.openEditorposts.postListEditorPresenterWillShowEditor, andAbstractPostListViewControllerresponds by settingfetchResultsController.delegate = niluntil the editor closes. Meanwhile, a first-page sync (PostRepository.paginatewithoffset == 0→deleteOtherLocalPosts: true→PostHelper.merge(purgeExisting:)), or the post save itself, can delete aPostthat a visible row still references. Tapping that row right after closing passes the deleted object toEditPostViewController. - No guard. Neither
PostListEditorPresenter.handlenorEditPostViewController.showEditorcheckspost.managedObjectContext == nil || post.isDeletedbefore building the editor.
- Same root cause as the new
mustUseGutenbergcrash issue, which shows the same symptom through a different code path. The two could be fixed together.
Repro to try
- Use a site with more than 40 posts, so the first page doesn't hold everything. Open My Site › Posts.
- Open a post that will use the classic editor (content with no
<!-- wp:blocks), make an edit, then close and save. - Immediately, within a second, tap the same post (or one just below it) again.
- In parallel, change or trash posts from the web so the next first-page sync purges something. Toggle the network to trigger
networkStatusDidChange→automaticallySyncIfAppropriate. - Set a breakpoint on
AztecPostViewController.initand checkpost.isDeleted/post.managedObjectContext.
Pass: the precondition hits, or you can show a row whose post.managedObjectContext is nil.
Representative events
de586a8fa25c4e4d8b1827419669bbd124365c1b9f13436780e6e8eacffc4d2142b1534daaa749fb9f20dfc8e8c12e9b(iPad, split view)70393420835f4750966abde0e6d390fd
Build the Jetpack scheme and sign in using docs/simulator-sign-in.md, with bundle ID com.automattic.jetpack.
When you're done: post the results here. If you now have reliable steps, remove [Status] Needs Repro. If you found the cause and a fix approach, remove [Status] Needs Plan and add [Status] Ready for Dev. Remove Simulator Testable when you're finished.
Generated by Claude Code
- 主要语言
- Swift
- 星标
- 3.9k
- 派生
- 1.2k
- 平均合并
- 1 天 23 小时
- 30 天内合并 PR
- 136
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wordpress-mobile/WordPress-iOS 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
wordpress-mobile/WordPress-iOS#26423 · 1 条评论 ·
维护者通常 1 天内回复
-
[Pri] Low [Status] Ready for Dev [Type] Bug /Me
难度 2/5 1-3 小时 新手友好度 78/100
wordpress-mobile/WordPress-iOS#26279 · 1 条评论 ·
维护者通常 1 天内回复
-
[Pri] Low [Status] Ready for Dev [Type] Bug Share Extension
难度 2/5 1-3 小时 新手友好度 88/100
wordpress-mobile/WordPress-iOS#26276 · 1 条评论 ·
维护者通常 1 天内回复
-
[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications
难度 2/5 1-3 小时 新手友好度 79/100
wordpress-mobile/WordPress-iOS#26256 · 1 条评论 ·
维护者通常 1 天内回复
-
[Status] Ready for Dev [Type] Bug Reader
难度 2/5 1-3 小时 新手友好度 83/100
wordpress-mobile/WordPress-iOS#26254 · 2 条评论 ·
维护者通常 1 天内回复
查看 wordpress-mobile/WordPress-iOS 的全部 Issue
相似的 Issue
-
Optional callbacks log "Unable to create JSCallback" when passed null可能已有人在做 @cmsj 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
cmsj/Hammerspoon2#464 ·
-
android bug
难度 2/5 1-3 小时 新手友好度 76/100
VocaHQ/vocaphone#470 · 1 条评论 ·
维护者通常 1 天内回复
-
new-compilers request
难度 2/5 1-3 小时 新手友好度 65/100
compiler-explorer/compiler-explorer#9640 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
-
bug
难度 2/5 1-3 小时 新手友好度 74/100