fishtest icon indicating copy to clipboard operation
fishtest copied to clipboard

Uncaught javascript error and blank screen.

Open vdbergh opened this issue 11 months ago • 3 comments

With this URL

https://tests.stockfishchess.org/tests/view/67843b58460e2910c51ddcc6?show_task=0

I get an uncaught javascript error and a blank screen

image

I don't know if it is reproducible for other people since it seems to have something to do with the github api.

vdbergh avatar Jan 12 '25 23:01 vdbergh

It seems it was a temporary glitch since now it works.

vdbergh avatar Jan 13 '25 05:01 vdbergh

Hint: https://github.com/official-stockfish/fishtest/blob/6232b7722b52b30e543f16e978476de4bcf9b633/server/fishtest/templates/tests_view.mak#L994 This is the culprit line. If any of the promises gets rejected then Promise.all does not enter the then, adding a catch would verify you that. You might want to look at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled

peregrineshahin avatar Jan 25 '25 23:01 peregrineshahin

Ok I see. Why don't you make a PR yourself? The code in that file has changed substantially since I last looked at it.

I wonder though if it would not be better to catch exceptions closer to where they appear.

vdbergh avatar Jan 26 '25 10:01 vdbergh