A host leaving during the countdown strands the room on GET READY!
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 95/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- nextjs, react, typescript
- Ambito
- frontend, networking
Direzione di ricerca
Inizia in apps/frontend/src/screens/LiveQuiz.tsx, in corrispondenza dell'handler quiz:start e della pulizia esistente del timer. Acquisisci il timer del countdown, cancellalo nella pulizia dell'effetto e proteggi l'invio del socket con readyState === WebSocket.OPEN. Verifica che lo smontaggio durante il countdown annulli l'invio e non produca alcuna eccezione non intercettata nella console.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
In apps/frontend/src/screens/LiveQuiz.tsx, the quiz:start handler schedules the first question three seconds later:
case "quiz:start":
setGameState(GameState.STARTING);
setTimeout(() => {
if (isOrganizer) socket?.send(JSON.stringify({
type: "quiz:next-question",
payload: { sessionId, questionIndex: 0 }
}));
}, 3000);
break;
The handle is never captured, so the effect's cleanup cannot clear it. That cleanup already clears the other three timers in this component (timeoutId, reconnectTimer, refreshTimer) — this one was missed.
Why it matters
If the host navigates away, reloads, or the component remounts inside that three-second window, the timer still fires and calls send() on a socket that is closing or closed. The first question is never broadcast.
Every participant sits on "GET READY!" indefinitely. There is no recovery from the participant side; the host has to start a whole new session.
What a fix looks like
- Capture the handle in the same
letscope as the other timers and clear it in the cleanup. - While in there, guard the send itself —
socket?.sendon a closing socket throwsInvalidStateErrorin a real browser, so checkreadyState === WebSocket.OPENfirst.
Definition of done
- Unmounting during the countdown cancels the pending send
- No uncaught exception in the console when a host leaves mid-countdown
Good first issue: a few lines, in a file that already shows the right pattern three times.
- Lingua principale
- TypeScript
- Stelle
- 21
- Fork
- 7
- Merge medio
- 5h 43m
- PR unite (30g)
- 30
Preparare l'ambiente
- Include un Dockerfile o un 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 TheCodeHeist-Coder/Rexial
-
The join endpoint returns an error shape the frontend cannot readForse già presa @Anshuu2004 l’ha presa oggi. ApertaBackend first issue bug good first issue help wanted level1 nsoc26
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
TheCodeHeist-Coder/Rexial#192 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
bug help wanted UI & UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
TheCodeHeist-Coder/Rexial#175 ·
I maintainer di solito rispondono entro 1 giorno
-
bug enhancement good first issue help wanted UI & UX
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TheCodeHeist-Coder/Rexial#162 ·
I maintainer di solito rispondono entro 1 giorno
-
Critical security: a couple of access control problems in the API and ws-server (details to be shared privately)Forse già presa @Anshuu2004 l’ha presa 1 giorno fa. Apertalevel3 nsoc26
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
TheCodeHeist-Coder/Rexial#215 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement help wanted UI & UX
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
TheCodeHeist-Coder/Rexial#201 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TheCodeHeist-Coder/Rexial
Issue simili
-
bug ui-dashboard
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100
caelestia-dots/caelestia#534 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area: scripts bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
tdk-landscape/tdk-cli-core#2706 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
bobadilla-tech/biasmarket.com#402 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
javvadivijayprasad/sel2pw#28 ·