Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

If POST takes longer than 8 seconds, installer immediately gives up rather than continuing to wait

Aperta
#146 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
javascript, python
Ambito
cli, desktop, tooling

Direzione di ricerca

Esamina il codice frontend dell'installer per la gestione del timeout di XMLHttpRequest, probabilmente in un file JavaScript che gestisce le richieste POST. La logica di scansione del backend è in Python; esamina le funzioni di rilevamento del percorso del gioco. L'issue menziona commit per il timeout di scansione e il pulsante di annullamento; rivedi tali modifiche per comprendere lo stato attuale. Determina come modificare il timeout per non annullare la richiesta e regola i messaggi di errore di conseguenza.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

We had an issue where a user had an infinite loading screen on the part of the installer which autodetects game paths.

There were no relevant errors on the install log, but the browser showed a POST error, as if the python side never responded.

What actually happened was that the python side had no errors, but it took longer than 8 seconds to respond. Because the HTML side gives up after 8 seconds, the HTML side raised an error, but the Python side did not. This was because I implemented the timeout using the native XMLHttpRequest timeout functionality, which cancels the POST after a timeout (...or at least I think that's how it works).

The installer should really show an error after 8 seconds (or however many seconds), but continue to listen for the response.

The error message should also be adjusted to tell the user to wait some time in case the operation just takes a long time.

I actually had hard-coded that if the request type was showFileChooser, there was no POST timeout, but I feel hard-coding specific requests to not the right way to do this.

A related issue is why the game scanning step took so long - the user was using a SSD, and didn't have that many games installed on their computer. It could be:

  • my installer is doing something really bad and taking ages
  • your computer is slow for some reason
  • there is a game which causes the installer's scanning algorithm to give worst-case behavior

The scanning should really give up if it took more than a certain amount of time to scan, as even if scanning fails, the installer can still be used. Or perhaps have a per-directory scan timeout.

The installer also doesn't print how long/which folders were scanned,


  • Fix POST timeout behavior
  • Investigate slow game scanning
  • Set a timeout on game scanning (make sure to only enable this when scanning many paths, not when checking a user-specified path) 4efd0b9f3ef1691ff3c4ac8ec281c343587184da
  • Add button to cancel scanning (currently becomes greyed out forever if scanning never finishes) e6371a58aa81bcc1fcbe6ad2bf75cd215feaac26
Lingua principale
JavaScript
Stelle
214
Fork
12
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di 07th-mod/python-patcher

Tutte le issue di 07th-mod/python-patcher

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.