franciscoBSalgueiro / en-croissant

The Ultimate Chess Toolkit
https://encroissant.org
GNU General Public License v3.0
611 stars 76 forks source link

Generate report error analyzing an imported game with pgn #184

Closed Shjpr9 closed 8 months ago

Shjpr9 commented 8 months ago

Describe the bug

I imported a game from chess.com as pgn and tried to generate a report of it using lichess reference database and stockfish engine. When the report ends, I get this error

image

Reproduction

  1. import a game from chess.com as pgn. ex:

    
    [Site "Chess.com"]
    [Date "2024.02.14"]
    [Round "?"]
    [White "PLAYER1"]
    [Black "PLAYER2"]
    [Result "1-0"]
    [ECO "B50"]
    [WhiteElo "416"]
    [BlackElo "384"]
    [TimeControl "300"]
    [EndTime "10:23:33 PST"]
    [Termination "PLAYER1 won by checkmate"]
  2. e4 c5 2. Nf3 d6 3. Nc3 Nf6 4. Bb5+ Nc6 5. O-O g6 6. d3 Bd7 7. Bc4 Bg4 8. h3 Bxf3 9. Qxf3 Bg7 10. Bf4 e5 11. Bg5 O-O 12. a3 Nd4 13. Qe3 h5 14. b4 Nxc2 15. Qf3 Nxa1 16. Rxa1 cxb4 17. axb4 a6 18. Nd5 Kh8 19. Nxf6 Bxf6 20. Bxf6+ Qxf6 21. Qxf6+ Kh7 22. Qxd6 Rad8 23. Qxe5 f6 24. Qc7+ Kh8 25. Qxb7 f5 26. Qxa6 f4 27. f3 g5 28. Qh6# 1-0

  3. try to generate report for the game

Platform and versions

En Croissant: Version: 0.9.1 lichess_database: 2017 - February stockfish: Stockfish dev-20240121

Stack trace

Cannot read properties of undefined (reading 'score')
TypeError: Cannot read properties of undefined (reading 'score')
    at Y5e (https://tauri.localhost/assets/index.js:143:4643)
    at https://tauri.localhost/assets/index.js:143:2165
    at fg.with (https://tauri.localhost/assets/index.js:43:8118)
    at bJ (https://tauri.localhost/assets/index.js:143:2115)
    at https://tauri.localhost/assets/index.js:243:900385
    at wIe.produce (https://tauri.localhost/assets/index.js:243:900536)
    at https://tauri.localhost/assets/index.js:243:900370
    at Object.ax [as useReducer] (https://tauri.localhost/assets/index.js:38:20835)
    at Nt.useReducer (https://tauri.localhost/assets/index.js:9:6300)
    at Xre (https://tauri.localhost/assets/index.js:243:902397)
franciscoBSalgueiro commented 8 months ago

This has been fixed in the 0.9.2