Can't log in to OctoPrint web interface

What is the problem?

I'm getting a socket connection failure after logging in to OctoPrint. There's no error apparent in octoprint.log and no previous errors in the browser console. The issue happens only after the login screen.

What did you already try to solve it?

I've tried starting in safe mode as well as rebooting the Pi. I also tried uninstalling some recently installed plugins via pip to see if that would help it work in "regular" mode.

Logs (octoprint.log, serial.log or output on terminal tab at a minimum, browser error console if UI issue ... no logs, no support!)

Browser log

packed_core.js?3514a079:16964 Starting dependency resolution...
packed_core.js?3514a079:17074 ... dependency resolution done
packed_core.js?3514a079:17384 Initial application setup done, connecting to server...
packed_core.js?3514a079:8263 Loading error: Socket connection failed. Please check prior messages and 'octoprint.log' for possible reasons.
UiStateViewModel.self.showLoadingError @ packed_core.js?3514a079:8263
packed_core.js?3514a079:15010 Connected to the server

octoprint.log (56.3 KB)

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible)

Octoprint version: OctoPrint 1.4.0
Raspberry Pi: Raspberry Pi Zero W Rev1.1 with Octopi 0.15.0PE
Printer: Original Prusa MK3S with Prusa-Firmware 3.8.1
Browser: Google Chrome 81.0.4044.138 on Windows 10 build 18363

Thanks in advance for helping out!


You shouldn't use an underpowered device like a pi zero for octoprint.
I would suggest at least a pi 3.

Since you're using prusaprint you should ask in the prusa forums because I don't know what they changed in their fork.

I will ask there as well, didn't think to do that. I feel like I should add/specify the zero w is specifically recommended by Prusa as it can attach directly to the printer main board and run off the power supply. I did run several successful prints prior to this issue, it just showed up out of nowhere

But the programmer of octoprint, @foosel, specifically recommends against it :slight_smile:

I hope they will release a pi zero 2 someday

It's too bad Prusa doesn't switch to (or provide an option for) a

I'm not sure that is quite correct. While the Mk3s mainboard has a handy spot (both electrically and physically) for a Pi Zero, that board was obviously designed before it became clear that the zero was under-powered for the task. The passage of time has only made that situation worse, as Prusa firmware and OctoPrint have become more complex.

I think I have resolved the issue. When the issue first appeared I was able to connect after leaving the pi on overnight but as it was a one-time thing I didn't think anything of it. I was able to connect via octoprint api (via prusaslicer and the printoid app) to get another print started and the issue has not appeared since.

Based on another forum answer I saw to a similar problem (can't find the link again) one cause of this error is that the pi is busy working in the back end and the frontend gets confused and times out. Based on everyone's comments on how weak the Pi Zero is, I think the issue may be that it was doing gcode analysis on a large gcode file (you can see this command start in all the logs) and once I loaded a different file the problem still exists but the file is smaller so analysis is fast enough that the issue isn't noticable on startup.

RE: the banana pi - If the GPIO pins are all the same and it can run octopi I don't see why that wouldn't work; even if the prusaprint image is Pi Zero specific they do provide the option to build your own image. If the problem comes up again I will look into one of those. I quite like being able to mount the Pi right onto the printer so there's no harm in giving it a shot.