Canot cancel print in Octoprint

Almost every time if I cancel print Octoprint it's get stuck in Canceling and I have to disconnect and reconnect fix this it's annoying
Problem exists since update to 1.3.8 version of Octoprint

Raspberry PI Zero
Prusa i3 MK3

dump from console

Send: N11182 G1 X229.918 Y30.274 E0.0166685
Recv: ok
Send: N11183 G1 X229.332 Y30.266 E0.01671
83
Recv: ok
Send: N11184 G1 X228.747 Y30.222 E0.0167183
Recv: ok
Send: N11185 G1 X228.166 Y30.143 E0.01671
83
Recv: ok
Send: N11186 G1 X227.591 Y30.030 E0.0167186
Recv: ok
Send: N11187 G1 X227.023 Y29.882 E0.01671
82
Recv: ok
Send: N11188 G1 X226.466 Y29.701 E0.0167193
Recv: ok
Send: N11189 G1 X225.920 Y29.487 E0.01671
93
Recv: ok
Send: N11190 G1 X225.388 Y29.240 E0.0167180
Recv: ok
Send: N11191 G1 X224.873 Y28.963 E0.01666
82
Recv: ok
Send: N11192 G1 X224.133 Y28.485 E0.0251290
Recv: ok
Send: N11193 G1 X223.433 Y27.950 E0.02512
83
Recv: ok
Send: N11194 G1 X222.999 Y27.559 E0.0166694
Recv: ok
Send: N11195 G1 X222.587 Y27.141 E0.01671
87
Recv: ok
Send: N11196 G1 X222.202 Y26.700 E0.0167192
Recv: ok
Send: N11197 G1 X221.843 Y26.236 E0.01671
81
Recv: ok
Send: N11198 G1 X221.513 Y25.751 E0.0167181
Recv: ok
Send: N11199 G1 X221.212 Y25.248 E0.01671
91
Recv: ok
Send: N11200 G1 X220.942 Y24.727 E0.0167190
Recv: ok
Send: N11201 G1 X220.703 Y24.192 E0.01671
88
Recv: ok
Send: N11202 G1 X220.497 Y23.643 E0.0167189
Recv: ok
Send: N11203 G1 X220.325 Y23.083 E0.01671
92
Recv: ok
Send: N11204 G1 X220.186 Y22.513 E0.0167193
Recv: ok
Send: N11205 G1 X220.081 Y21.938 E0.01666
90
Recv: ok
Send: N11206 G1 X219.993 Y21.061 E0.0251295
Recv: ok
Send: N11207 G1 X219.976 Y20.180 E0.02512
90
Recv: ok
Send: N11208 G1 X220.011 Y19.597 E0.0166692
Recv: ok
Send: N11209 G1 X220.081 Y19.015 E0.01671
93
Recv: ok
Send: N11210 G1 X220.186 Y18.438 E0.0167189
Recv: ok
Send: N11211 G1 X220.325 Y17.868 E0.01671
85
Recv: ok
Send: N11212 G1 X220.497 Y17.310 E0.01666*90
Changing monitoring state from "Printing" to "Cancelling"
Recv: ok

and Octoprint log for this event

2018-05-23 09:09:19,281 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2018-05-23 09:09:19,283 - octoprint.server - INFO - OctoPrint 1.3.8
2018-05-23 09:09:19,306 - octoprint.plugin.core - INFO - 12 plugin(s) registered with the system:
| Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
| Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
| !CuraEngine (<= 15.04) (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/cura
| Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
| GcodeEditor (0.2.6) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_GcodeEditor
| ipOnConnect Plugin (0.1.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_ipOnConnect
| Logging (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging
| OctoPi Support Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/octopi_support
| Plugin Manager (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/pluginmanager
| Printer Safety Check (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/printer_safety_check
| Software Update (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate
| Virtual Printer (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/virtual_printer
2018-05-23 09:09:19,476 - octoprint.environment - INFO - Detected environment is Python 2.7.9 under Linux (linux2). Details:
| hardware:
| cores: 1
| freq: 1000.0
| ram: 388681728
| os:
| id: linux
| platform: linux2
| plugins:
| octopi_support:
| model: Zero W
| revision: 9000c1
| version: 0.14.0
| python:
| pip: 9.0.3
| version: 2.7.9
| virtualenv: /home/pi/oprint
2018-05-23 09:09:19,479 - octoprint.server - INFO - ------------------------------------------------------------------------------
2018-05-23 09:09:19,266 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-05-23 09:24:19,487 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-05-23 09:24:35,737 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Printing"
2018-05-23 09:24:35,819 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2018-05-23 09:39:19,490 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-05-23 09:45:51,917 - tornado.access - WARNING - 409 POST /api/files/local (127.0.0.1) 140.88ms
2018-05-23 09:47:22,719 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Cancelling"
2018-05-23 09:47:22,723 - octoprint.filemanager.analysis - INFO - Starting analysis of local:Red_box.gcode
2018-05-23 09:47:22,752 - octoprint.filemanager.analysis - INFO - Invoking analysis command: /home/pi/oprint/bin/python -m octoprint analysis gcode --speed-x=6000 --speed-y=6000 --max-t=10 --throttle=0.0 --throttle-lines=100 /home/pi/.octoprint/uploads/Red_box.gcode
2018-05-23 09:54:19,496 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2018-05-23 09:54:47,235 - octoprint.util.comm - INFO - Changing monitoring state from "Cancelling" to "Offline"
2018-05-23 09:54:50,554 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Opening serial port"
2018-05-23 09:54:50,601 - octoprint.util.comm - INFO - Changing monitoring state from "Opening serial port" to "Detecting baudrate"
2018-05-23 09:54:50,687 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2018-05-23 09:54:50,738 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting baudrate" to "Operational"
2018-05-23 09:54:50,826 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2018-05-23 09:54:50,909 - octoprint.util.comm - INFO - Printer reports firmware name "Prusa-Firmware 3.2.1 based on Marlin"
2018-05-23 09:55:09,310 - octoprint.server.util.sockjs - INFO - Client connection closed: 192.168.1.7

Sounds like this, to be honest.

didyougetthememo

1 Like

And this where they already got that link as well. Slightly more friendly OP here though :wink:

I have this same issue. Didn't want to create a new topic unless I should have. Running OP version 1.3.10. Was this ever resolved? I can be printing, have an issue with the job and want to use OP to cancel the job. The printer stops, the extruder just stops and doesn't go home.The steppers are off. I have to disconnect to actually get OP functional again. serial.log (164.5 KB)
I've attached my serial.log for examination. Since OP doesn't cancel properly I usually just use the printer control panel to cancel when needed. What can I do to help resolve this?

Kelly

2019-01-17 19:50:47,258 - Send: N867 G1 X12.260 Y-12.260 E0.9297*115
2019-01-17 19:50:48,391 - Changing monitoring state from "Printing" to "Cancelling"
2019-01-17 19:50:50,883 - Recv:  T:210 /0 B:50 /0 T0:210 /0 T1:49 /0 @:0 B@:100:

OctoPrint never receives an ok to that final G1 there and hence communication stalls. Since this is apparently a GPX based printer I can't say whether this is caused by GPX or the printer itself (maybe @markwal might have an idea), but unless the printer tells OctoPrint "hey, I'm done, please continue sending messages" it can't really do anything with it anymore.

Thanks for elaborating on the issue. Yes, it uses the GPX plugin. The printer is a QIDI Tech 1 2018 model with sailfish 7.8 I think the board is something called "Mightyboard" Is there something I could do that would make it work? The printer's cancel command works fine and Octoprint seems to understand that I cancelled it, resets and is ready to go. Or will I have to use the printer's cancel print command as a workaround?

Ah interesting. All the ok's are generated from the plugin based on status returns from s3g protocol. During a cancel, the plugin may decide not to send a gcode command while waiting for the cancel operation to complete.

@markwal is there any solution for this?
I have the same problem as this. Cancelling never works without disconnect/connect, and the Octoprint.log looks the same as reported above.
I've tried the things mentioned in the FAQ about this (Fake Acknowledge and Disabling position on pause/cancel), but neither of those things have any effect on this.

Running FlashForge Creator Pro (2016) with the GPX plugin.
Octoprint 1.3.12 running on RPi (OctoPi)

I too am having a similar issue.

Printer: Flashforge Creator Pro
Using the x3g plugin

Log output (without temperature updates):

Send: N97296 G1 X-8.880 Y24.639 E0.0078*65
Recv: ok
Send: N97297 G1 X-8.880 Y22.661 E0.0658*79
Recv: ok
Send: N97298 G1 X-8.717 Y22.648 E0.0054*64
Recv: ok
Send: N97299 G1 X-8.527 Y22.602 E0.0065*76
Changing monitoring state from "Printing" to "Cancelling"
Recv: ok
Send: N97300 M108*39
Recv: ok
Send: (@clear_cancel)

Not sure if there's a work around? Presently the best option I have is to cancel from the printer and not from Octoprint which is unfortunate.

I should mention that the other 'work around' for when I forget and cancel in Octoprint is to then restart Octoprint, which is equally unideal.

It might be nice if Octoprint had a timeout in cancelling that put you in a "Cancelling Failed" state that let you manually click a button to say "Recheck connection" which puts you back in operational versus the nuclear "Restart Octoprint" button; just my two pennies!