my print gets stopped at a random percentage and i get messages like this.
There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: Should resend line 90792 but no sufficient history is available, can't resend
only happens sometimes on some prints. (line number different)
There is a lot of interference and unknown commands in the log file. It could be the USB cable is not great. The best cables are as short as possible, and shielded, optionally with ferrite beads as well. The other thing to check is what appliances are nearby that could be electrically noisy that may turn on and disrupt the print. For Ender 3 printers, there's also this problem, they are quite susceptible to interference: