Stats: Tags and Categories details crashes when two expanded groups share a tag
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 76/100
Direzione di ricerca
Inizia da StatsDataHelper.swift, in particolare da childRowsForItems e expandableDataRowsFor, poi esamina l’uguaglianza di DetailExpandableChildRow e la correzione dell’issue #26415. Riproduci il problema con due gruppi di tag che condividono un tag e almeno sette voci, quindi espandi entrambi i gruppi nella scheda classica Tags and Categories. Il lavoro è completato quando entrambi i gruppi si espandono senza arresti anomali e le sezioni espandibili correlate continuano a funzionare correttamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The app crashes when you expand two groups in the classic Insights → Tags and Categories → View more screen that share a tag. We reproduced it on an iOS 27.2 simulator using stats data served from a local proxy. None of the crash reports Sentry still keeps for this crash signature (JETPACK-IOS-1ASW) come from this screen, so we don't know how many users hit it.
Who hits it
Anyone whose top tags include two groups with a tag in common. The Stats API groups tags that appear together on a post, so a site with posts tagged "news, tech" and "news, sport" shows two groups that both contain "news". Expanding both crashes the app.
Why
The expanded tag rows only hold the tag's name, an empty count and its URL. Nothing ties a row to the group it's in, so the two "news" rows are equal, and the diffable table rejects them as duplicate items (NSInternalInconsistencyException: "supplied item identifiers are not unique"). The rows are built by childRowsForItems:
#26415 fixes the same crash for Post Stats month rows, which is the case behind all retained Sentry reports, but it does not cover tags.
Fix
- Make each expanded child row include its parent row's identity (for example the parent's
nameandstatSection) inDetailExpandableChildRowequality, set inexpandableDataRowsFor. - That one change covers every expandable section built there: tags, months, and possibly Authors (a co-authored post under two authors) and repeated Clicks or Referrers entries. Those last cases have not been reproduced.
How to reproduce
- Use a site whose stats return two tag groups sharing a tag (for example "news, tech" and "news, sport") and at least seven entries, so the card shows View more.
- With New Stats turned off, open Insights, add the Tags and Categories card if needed, and tap View more.
- Expand "news, tech", then "news, sport". The app crashes.
Crash log from the simulator (Jetpack Debug, built from #26415)
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Fatal: supplied item identifiers are not unique. Duplicate identifiers: {(
WordPress.AnyHashableImmuTableRow(immuTableRow: WordPress.DetailExpandableChildRow(rowData: WordPress.StatsTotalRowData(id: nil, name: "news", data: "", ..., showDisclosure: true, disclosureURL: Optional(https://jkmassel.wordpress.com/tag/news/), multiline: true, childRows: Optional([]), statSection: nil, isReferrerSpam: false, month: nil), ..., hideIndentedSeparator: true, hideFullSeparator: true, ...))
)}'
The tags response the proxy served:
{"tags": [
{"views": 20, "tags": [{"name": "news", "type": "tag"}, {"name": "tech", "type": "tag"}]},
{"views": 10, "tags": [{"name": "news", "type": "tag"}, {"name": "sport", "type": "tag"}]},
{"views": 9, "tags": [{"name": "filler0", "type": "tag"}]},
"... five more single-tag entries"
]}
- Lingua principale
- Swift
- Stelle
- 3.9k
- Fork
- 1.2k
- Merge medio
- 1g 21h
- PR unite (30g)
- 126
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di wordpress-mobile/WordPress-iOS
-
Bug iOS Reader
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
wordpress-mobile/WordPress-iOS#26423 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Pri] Low [Status] Ready for Dev [Type] Bug /Me
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
wordpress-mobile/WordPress-iOS#26279 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Pri] Low [Status] Ready for Dev [Type] Bug Share Extension
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
wordpress-mobile/WordPress-iOS#26276 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
wordpress-mobile/WordPress-iOS#26256 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Status] Ready for Dev [Type] Bug Reader
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
wordpress-mobile/WordPress-iOS#26254 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di wordpress-mobile/WordPress-iOS
Issue simili
-
bug mac
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
VictorKildahl/cra#818 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[Feature] 自定义动作输入效果较差Forse già presa @zo-no l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 74/100
-
chore
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
lugassawan/swe-workbench#841 ·
-
IINA quits at launch when `input_conf` is a symlink, and loads no plugins when `plugins` is oneForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno