Octoprint warrning: Printer reset detected

What is the problem?

I sent the Gcode from prusaslicer to octoprint , after some minutes in printing, I got a message while I'm printing , it say: Printer reset detected

error

This is the log file
The gcode is called Raspberry_Camera_extender_0.2mm_PLA_ENDER3V2_36m.gcode
octoprint.log (88.0 KB)

Printer: Ender3 V2
Firmware : Smith3d

The thing is here the printer basically rebooted itself somehow. This can happen if there is a drop on the power for a small moment, the external reset button was pressed, or the firmware reset itself (the M997 command can do this).

There is any way to prevent it next time

Considering we don't know what the problem is, probably not. You'd have to find the root cause, there's a fair number of different things (as I said) to look out for.

For what it's worth I experienced this same problem last night for the first time ever, down to the weirdness in the serial.log. Restarting the printer, octoprint host, reseating cables, nothing worked.

As soon as I moved the stl in the slicer program even just a tiny bit and then re-sliced the item for printing, the problem was fixed. It could be a more common thing and the cause of the question raised by aymane, or quite possibly an individual instance of my slicer/printer misbehaving.

Note: I do have a Tron XY 2 Pro, so Octoprint has to do a slight bit of communication translation, so that could be a factor too.