WebUI sends duplicate DELETE /message/{id} when leaving the page with pending deletes
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 80/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, typescript
- Ambito
- frontend
Direzione di ricerca
Inizia da reactions.ts, dove executePendingDeletes è registrata sia per pagehide sia per beforeunload, poi leggi MessagesStore.removeSingle, che controlla pendingDeletes ma svuota la voce solo dopo che la DELETE di axios restituisce una risposta. Riproduci il problema eliminando dei messaggi nell'interfaccia web, chiudendo la scheda mentre la snackbar di annullamento è aperta e osservando il registro di rete alla ricerca di richieste DELETE duplicate. Il lavoro è completo quando ogni messaggio riceve esattamente una richiesta DELETE quando la pagina viene abbandonata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I stumbled across some 404 in the docker logs and asked my artifical friend to dig deeper into this. He drills it down to some js code in the web frontend. If that is okay with you maybe you'll take a look at it - thanks 😅
Can the issue be reproduced with the latest available release? (y/n)
y (v3.1.1)
Which one is the environment gotify server is running in?
- Docker
- Linux machine
- Windows machine
Docker startup command or config file here (please mask sensitive information)
image: gotify/server:latest # 3.1.1, commit e6361ca
Do you have an reverse proxy installed in front of gotify server? (Please select None if the problem can be reproduced without the presense of a reverse proxy)
- None
- Nginx
- Apache
- Caddy
- Traefik (not relevant, the duplicate requests originate in the WebUI)
On which client do you experience problems? (Select as many as you can see)
- WebUI
- gotify-cli
- Android Client
- 3rd-party API call
What did you do?
Deleted messages in the WebUI and left/closed the tab while the undo snackbar was still open.
What did you expect to see?
One DELETE /message/{id} per message.
What did you see instead?
Two DELETE /message/{id} per message in the same second; the second one usually fails:
INF HTTP method=DELETE path=/message/150242 status=200
WRN HTTP errors="Error #01: message does not exist" method=DELETE path=/message/150242 status=404
Cause: reactions.ts registers executePendingDeletes for both pagehide and beforeunload, which usually both fire when leaving the page. MessagesStore.removeSingle checks pendingDeletes.has(id) but only removes the entry (cancelPendingDelete) after await axios.delete(...) returns, so the second call passes the check and sends another DELETE.
Possible fix: remove the entry from pendingDeletes before sending the request (or guard executePendingDeletes so it runs only once).
- Lingua principale
- Go
- Stelle
- 16k
- Fork
- 891
- Merge medio
- 2g 11h
- PR unite (30g)
- 6
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun 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 gotify/server
-
Session elevation duration is unbounded, and large values silently overflow to a past timestampForse già presa @piyush295 l’ha presa 13 giorni fa. Apertaa:bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 78/100
gotify/server#1051 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
a:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
gotify/server#1047 · 6 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
a:feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
-
OIDC: Disallow changing admin permissions for oidc users when OIDC group mapping is configuredApertaa:feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
I maintainer di solito rispondono entro 2 giorni
-
a:feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di gotify/server
Issue simili
-
bug go
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
genkit-ai/genkit#6761 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug(backend): `make test-update` in backend/src/v2 fails because the --update flag was removedApertaready
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
kubeflow/pipelines#14784 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
bug frontend good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 1 giorno
-
trust: update-propagation-directive requires developer mode while add and remove do notForse già presa @bhuvan-somisetty l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
oalders/clodhopper#133 ·