What is the problem?
Most of the time, after disconnecting from my printer, the connection process freezes on reconnect. From all outward appearances, it looks like a connection has been made (Terminal says it's connected and provides updates from the printer, temperature graph updates), but the state of the connection never updates. I can't start a print or control the printer.
Serial logs show that when the connection is successfully made, there is a handshake attempt after a connection attempt, a few GCODE commands are sent and the status is updated from "Detecting serial connection" to "Operational"
2024-01-25 18:42:33,264 - Changing monitoring state from "Offline" to "Detecting serial connection"
2024-01-25 18:42:33,475 - Performing autodetection with 7 port/baudrate candidates: /dev/ttyACM0@115200, /dev/ttyACM0@250000, /dev/ttyACM0@230400, /dev/ttyACM0@57600, /dev/ttyACM0@38400, /dev/ttyACM0@19200, /dev/ttyACM0@9600
2024-01-25 18:42:33,476 - Trying port /dev/ttyACM0, baudrate 115200
2024-01-25 18:42:33,498 - Connecting to port /dev/ttyACM0, baudrate 115200
2024-01-25 18:42:33,609 - Handshake attempt #1 with timeout 2.0s
2024-01-25 18:42:33,622 - Connected to: Serial<id=0x71a1f9a0, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=2.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2024-01-25 18:42:33,626 - Send: N0 M110 N0*125
2024-01-25 18:42:33,635 - Recv: ok
2024-01-25 18:42:33,667 - Changing monitoring state from "Detecting serial connection" to "Operational"
2024-01-25 18:42:33,710 - Send: N0 M110 N0*125
2024-01-25 18:42:33,792 - Recv: ok
2024-01-25 18:42:33,803 - Send: N1 M115*39
Safemode serial logs show that, during the failure, a connection was completed. However, there is no handshake attempt, and the status is updated from "Detecting serial connection" to "Connecting"
2024-01-25 18:43:40,992 - Changing monitoring state from "Offline" to "Opening serial connection"
2024-01-25 18:43:41,007 - Connecting to port /dev/ttyACM0, baudrate 115200
2024-01-25 18:43:41,031 - Changing monitoring state from "Opening serial connection" to "Connecting"
2024-01-25 18:43:41,036 - Connected to: Serial<id=0x6f0e6a48, open=True>(port='/dev/ttyACM0', baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=10.0, xonxoff=False, rtscts=False, dsrdtr=False), starting monitor
2024-01-25 18:43:41,588 - Recv: X:0.00 Y:220.00 Z:31.20 E:3670.10 Count X:0 Y:17512 Z:12543
2024-01-25 18:43:41,746 - Recv: Not SD printing
2024-01-25 18:43:42,615 - Recv: T:16.21 /0.00 B:16.51 /0.00 @:0 B@:0
2024-01-25 18:43:42,733 - Recv: Not SD printing
2024-01-25 18:43:43,734 - Recv: Not SD printing
2024-01-25 18:43:44,609 - Recv: T:16.24 /0.00 B:16.62 /0.00 @:0 B@:0
2024-01-25 18:43:44,733 - Recv: Not SD printing
2024-01-25 18:43:45,734 - Recv: Not SD printing
What did you already try to solve it?
Refreshing browser: Still stuck on connecting
Opening WebUI in Incognito mode: Shows stuck on connecting.
Disconnect and reconnect: Off and on successes, mostly off.
Disconnect and wait for a few hours before reconnecting: 75% effective
Restart Octoprint: Connects on restart, if disconnected, won't reconnect reliably
Restart Octoprint in safe mode: Connects on restart, if disconnected, won't reconnect reliably
Restart system: Connects on startup, if disconnected, won't reconnect reliably
Power cycling the printer and reconnecting: (Just started trying this moments ago) seems to reliably connect....
Have you tried running in safe mode?
Yes, problem persists
Did running in safe mode solve the problem?
No, seeing exact same problem.
Systeminfo Bundle
octoprint-systeminfo-20240125165725.zip (179.1 KB)
A failure captured in serial on safe mode
serial (1).log (3.1 KB)
A success on restart captured in serial logs, and a later failure on disconnect/reconnect on safe mode
serial (2).log (14.1 KB)
Syslog
Additional information about your setup
OctoPrint Version: 1.9.3
OctoPi version: Build 2023.07.18.111854 with "webcamd", based on OctoPi 1.0.0, running on Raspberry Pi 3 Model B Rev 1.2
Ender 3 Pro, SKR Mini E3 V3
Custom Marlin bugfix-2.1.x Build (just printing parameters for max temp, z-probe, etc.... Nothing connection-y)
Chrome Version 120.0.6099.225 (Official Build) (64-bit) on Windows 11
This only surfaced in the last few days. I've been running on that firmware and this version of octopi/octoprint for months.