syxolk / euro2024

Euro 2024: Betting with your friends
https://www.wetten2024.de
51 stars 22 forks source link

Receiving internal server error on /past after autoupdate #84

Closed martonrideg closed 2 weeks ago

martonrideg commented 2 weeks ago

When any match result is in table "match", the /past node returns "internal server error".

syxolk commented 2 weeks ago

Ok, do you see any error messages in the terminal/shell?

martonrideg commented 2 weeks ago

In the Docker log for app-euro2024-web-1:

2024-06-15 20:17:18 TypeError: match.all_bets is not iterable
2024-06-15 20:17:18     at /app/routes/past.js:124:33
2024-06-15 20:17:18     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Btw, thanks for your great work! You made our team happy to run it internally!

syxolk commented 2 weeks ago

Ah, I guess you don't have any bets on the first match. I will fix it later.

martonrideg commented 2 weeks ago

Correct! I have added rows to bet through Docker exec with psql for matches id 49, 50, 51 with insert into bet values ('7','0','0','1','51'); That fixes the issue. If there is a match without a single bet, internal server error occurs again. As we have experienced on our sandbox testing, the fix is low prio for us as we are confident to update prod. We have enough bets there...

Thank you so much!

syxolk commented 2 weeks ago

I fixed the bug with https://github.com/syxolk/euro2024/commit/30aa08b9c4775b6c70de31c5764d57d7510c57f4

martonrideg commented 2 weeks ago

Thanks, Hans! Wish you were support for our upcoming core system! ;)