Communication Error and Error:Line Number is not Last Line Number+1

What is the problem?

Recently I have been having print issues.
From time to time the printer stops extruding mid print, and sometimes skip line (not skipping layer, only skipping some lines).

Upon closer inspection, it appears that the filament has been retracted to the point that the direct extruder gear can no longer grip onto the filament.

Looking at the log files, there are loads of communication errors and errors about line number is not last line.

Is this an indication of bad gcode file? I have been printing this file for several years though.

What did you already try to solve it?

I haven't done anything yet since all hardware has been the same for the past few years.

Have you tried running in safe mode?

Haven't tried.

Did running in safe mode solve the problem?

Haven't tried.

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!) (232.7 KB)

Additional information about your setup

Octoprint 1.8.6; Ender 3 with board 4.2.7, FW Marlin Python 3.7.3 Raspberry Pi 3 B Rev 1.2, Octopi 0.17.0

octoprint.log (423.6 KB)
plugin_pluginmanager_console.log (12.7 KB)
plugin_softwareupdate_console.log (1.2 MB)
serial (1).log (328.1 KB) (292.4 KB)

Problem went away after I removed 5V from the USB cable between Raspberry PI and Ender 3 board 4.2.7 following the method here: Put tape on the 5V pin - Why and how