never happened to me but i hope i can help you.
Try updating java if that doesnt work.
Shut down everything (if you play in browser don’t close the browser you play in ) And try again but be sure that you have a stable internet connection .
I have an unstable one on my normal computer that let’s me play 10 mins then 2 hours internet gone .
Hope the 2 things above help you , if not tell me if you have that problem with other games too.