A failure while painting the first frame bypasses the startup guard and the web smoke test
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Read bootstrapAndRun and runApp to understand where startup ends and the first frame is built; then inspect test/web/smoke/smoke.mjs and the existing widget tests. Add a widget test for a first-build throw and verify the web smoke test fails with the cause when MostroApp.build throws, but passes without the injected failure.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow-up from #405 (review round 3, finding 3).
What happens
bootstrapAndRun runs startup inside a guard: if anything throws, it paints StartupFailureApp naming the step and publishes the cause to the page (mostroBridgeError), which test/web/smoke/smoke.mjs reads.
runApp only schedules the app; the first frame is built afterwards. A throw during that first frame — MostroApp.build, a provider read on the first build, GoRouter's initial redirect — happens after the guard has returned, so:
- the user gets Flutter's error widget (red in debug, grey in release) instead of the failure screen;
mostroBridgeReadyhas already been set at the end of startup (#405), so the smoke test passes.
Measured on fd94e2b: with throw StateError(...) as the first line of MostroApp.build, a release web bundle shows Flutter's grey error box and the smoke test passes — ✓ startup finished, ✓ no console or page errors. Neither the failure screen nor CI sees it.
Proposed fix
For the first frame only:
- Before
runApp, install aFlutterError.onErrorthat paintsStartupFailureApp(step: 'showing the first screen', error: …)and callsmarkBridgeFailed. - In
addPostFrameCallback, restore the previous handler, then callmarkBridgeReady()— moving it from the end of_startupto after the first frame.
How to verify
- A widget test in which the first build throws: the failure surface must be shown, with that step.
- The web smoke test with an injected throw in
MostroApp.build: it must fail with the cause, and pass without it.
- Lingua principale
- Dart
- Stelle
- 11
- Fork
- 9
- Merge medio
- 17h 14m
- PR unite (30g)
- 100
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 MostroP2P/app
-
area: rust-core bug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
The maker's waiting step has no countdown, although mostrod announces when it startsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
area: ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area: ui feature priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
MostroP2P/app#124 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MostroP2P/app
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
ccch1mneyyy/dsh-Go#731 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
berkmancenter/frankly#753 ·
I maintainer di solito rispondono entro 4 giorni