I don't see any illegal moves
both of those castlings are completely legal
On my game screen the castling failed. The rook did not move.
the rook is on h1 on my screen
Does the problem still persist?
Strange .. White castling is OK when i replay this game : the Rh1 is moved to f1. Also Black castling is OK. What's the problem ? Which device do you use ? I see it on a laptop in Chromium browser.