The web interface seems stuck/not responsive/broken


#1

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):

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.