The web interface seems stuck/not responsive/broken

If OctoPrint's web interface appears to be non functional - it loads but the buttons don't appear to do anything, no terminal output or temperature updates are shown and things in general feel non-responsive - there can be several causes for this.

One thing is a simple JavaScript error, possibly caused by one of your installed plugins. Another possible reason are stuck requests, preventing any additional requests from going through to the server. Starting with 1.3.10 there's also the possibility that the websocket used for push updates from the server to the browser has not been authenticated due to some error or outdated frontend files and hence the bundled ForceLogin plugin is preventing data from getting through.

JavaScript errors

Open your browser's development console and take a look at the "Console" tab. If you see any messages there referring to "exceptions", there's probably a JavaScript error.

First thing to do is restart OctoPrint in safe mode and see if that makes the error go away. If so it's been caused by one of your installed third party plugins. Disable all of them, re-enable one by one and figure out which one triggers the error. Report the problem in the plugin's issue tracker.

If safe mode doesn't fix the problem, open a new topic in #support, include your JavaScript console output and also your octoprint.log and all the other info asked for in the pre filled template.

Stuck requests

Open your browser's development console and take a look at the "Network" tab. If you see a lot of requests there stuck at "pending" and not finishing even after several seconds, something is stuck.

First thing to do is restart OctoPrint in safe mode and see if that makes the error go away. If so it's been caused by one of your installed third party plugins. Disable all of them, re-enable one by one and figure out which one triggers the error. Report the problem in the plugin's issue tracker.

If safe mode doesn't fix the problem, open a new topic in #support, include your JavaScript console output and also your octoprint.log and all the other info asked for in the pre filled template.

Missing socket authentication

A lack of socket authentication can be identified by taking a look into octoprint.log. When you load the web interface and log in/are already logged in, your browser should authenticate the web socket and this should cause a message like the following being written to octoprint.log (with user being your user name):

2018-12-10 13:53:27,960 - octoprint.server.util.sockjs - INFO - User user logged in on the socket from client 192.168.1.3

If this isn't happening, something's not working out with the socket authentication.

First thing to do is restart OctoPrint in safe mode and see if that makes the error go away. If so it's been caused by one of your installed third party plugins. Disable all of them, re-enable one by one and figure out which one triggers the error. Report the problem in the plugin's issue tracker.

If safe mode does not fix this, read on.

There have now been two cases (1, 2) of users running into dependency mismatches on older OctoPrint installs where some old version of OctoPrint was partially loaded and causing the files making up the web interface not to be the correct ones, causing this particular problem. The reason for this are old OctoPrint .egg directories on Python's sys.path, interfering with the actual current install in some way. To get rid of these old files, you need to remove the offending references in a file called easy-install.pth in your Python environment's so called site packages folder.

I'm looking into how to detect and fix this automatically, but this can also be quickly resolved by opening a command line on your OctoPrint server (e.g. on OctoPi SSH into the machine, user is pi, default password is raspberry), activating the virtual environment that OctoPrint is installed in (on OctoPi: source ~/oprint/bin/activate) and then executing the following (long & single lined!) command:

sed -ibck '/^\.\/OctoPrint-[0-9]\+\.[0-9]\+\.[0-9]\+-.*\.egg$/d' `python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"`/easy-install.pth

This will edit the offending file accordingly (and also create a backup of it just in case). Restart the server afterwards (on OctoPi: sudo service octoprint restart), reload the web interface in your browser and check if the issue is gone now.

:spiral_notepad: Note

If you want to do the same thing manually, go into your Python environment's site-packages folder, open easy-install.pth in a text editor and remove any entries that match OctoPrint-x.y.z-py2.7.egg with x.y.z being a version number that is not the currently installed version.

If you can rule out outdated entries in easy-install.pth as the cause for this, open a new topic in #support, include your JavaScript console output and also your octoprint.log and all the other info asked for in the pre filled template.

Aha! That what fix my problem! I can recall I’ve updated the script for browser.

I'll take this into account next time my Octoprint tab on Chrome goes walkabout. I've found that if I switch away from the Octoprint tab for a while, when I get back to the tab it's a crapshoot whether it will be usable or whether I'll have to reload the page. After reloading the page it always works correctly.

My hypothesis is that it's Chrome's fault - it sees a background tab that's doing a lot of work and "helpfully" suspends Javascript on it.

Hello,
I am new to octoprint.
It works from time to time but UI is very unstable/flickering/frozen and connection to printer unstable.
I initially thought the printer connection was the issue and tried many many cables but now realised that even without printer connected there is a UI issue. It is unresponsive and flickers, for example in safe mode the safe mode popup keeps on showing up/blinking. When I try to delete a file, the button is unresponsive and flickering lightly.

fyi connection to pi is perfect, ping, ssh and camera feed.
I have tried different browsers.

I have looked at the above.

Even when I do nothing there are constant message flows in console (may be normal... no clue!)
In console I get the below repeating at high speed:

Safe mode is active. Third party plugins and language packs are disabled and cannot be enabled.
packed_core.js?8f90e417:840 :exclamation: Reason for safe mode: settings
packed_core.js?8f90e417:844 Triggering connect on all view models
packed_core.js?8f90e417:846 Server (re)connect processed
packed_core.js?8f90e417:839 Connected to the server

in Network I get this constantly repeating at high speed:

login:
1. Request URL:
http://octopi.local/api/login
2. Request Method:
POST
3. Status Code:
200 OK

file?recursive=true
1. Request URL:
http://octopi.local/api/files?recursive=true
2. Request Method:
GET
3. Status Code:
304 NOT MODIFIED

info?t=1613013498537
1. Request URL:
http://octopi.local/sockjs/info?t=1613013498537
2. Request Method:
GET
3. Status Code:
200 OK

websocket:
1. Request URL:
ws://octopi.local/sockjs/285/jrfl1zyh/websocket
2. Request Method:
GET
3. Status Code:
101 Switching Protocols

If the above is repeating constantly that means the front-end is constantly losing connection and the reconnecting to the backend, so something about that network connection to the pi is not rock steady.

In any case, open a new topic in #support please and fill out the template.

Edit: I see you already did: UI unresponsive and flickering