Web UI interface seems to not load

What is the problem?
Web UI has all text on it like the entire html was dumped.

What did you already try to solve it?
Followed the directions here:


Did not see javascript errors
No stuck requests
no Socket Authentication issues
Switched the python env and performed the following:

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

Came back with no file found.

There isn't anything in the log file.
Launched octoprint in safe mode and got the same thing.

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

https://pastebin.com/BFi7CLhe

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

Hello @MechEng!

Have you cleared the cache of the browser? Commonly with Crtl-F5.

1 Like

Yes and used a browser that I haven't used to access it before. Typically use chrome and tried Firefox.

Just noting some things...

  • What you're seeing (too bad we don't have a screenshot) is likely what you see when the CSS stylesheet wasn't loaded by your browser
  • When OctoPrint starts up, it combines all the style and the JavaScript and things like that so that they're optimal, you can see this in the log (which I've filtered a bit):
2020-03-11 19:55:27,118 - octoprint.server - INFO - Reset webasset folder /home/pi/.octoprint/generated/webassets...
2020-03-11 19:55:28,958 - octoprint.server - INFO - Listening on http://127.0.0.1:5000
2020-03-11 19:55:28,968 - octoprint.plugins.pluginmanager - INFO - Looks like we are offline
2020-03-11 19:55:30,557 - octoprint.util.connectivity_checker - INFO - Connectivity changed from offline to online
# Holy crap, you've got a Robo R1 Plus (noting that I contracted for them)
2020-03-11 19:57:01,752 - octoprint.server.util.flask - INFO - Passively logging in user jason

So... I'm not seeing much when I search for webasset in your log. I think I expect to see 1) startup, 2) reset webasset, 3) webasset generated, 4) you log in, etc in that order.

You could always ls ~/.octoprint/generated/webassets to see if there is at least one .css file there. If so, then refreshing your browser at this point might bring up a recognizable interface.

But please, go into Safe Mode for this testing. You have lots of 3rd-party plugins and there's at least an 80%/20% chance that one of those is preventing the assets from being generated.

I did try safe mode and got the same result. That was the thought and I would have started to remove the plug-ins. Which, by the way, is there a command line to remove plugins?

Here is the screenshot that I should have included.

Do that. (Hold off on trying to brute-force any plugins yet—Safe Mode does that.)

When I ran the ls, here are the files in that directory:
-rw-r--r-- 1 pi pi 69011 Mar 12 12:03 packed_client.js
-rw-r--r-- 1 pi pi 97289 Mar 12 12:03 packed_core.css
-rw-r--r-- 1 pi pi 670021 Mar 12 12:03 packed_core.js
-rw-r--r-- 1 pi pi 169065 Mar 12 12:03 packed_libs.css
-rw-r--r-- 1 pi pi 1193183 Mar 12 12:03 packed_libs.js
-rw-r--r-- 1 pi pi 3231 Mar 12 12:03 packed_plugins.css
-rw-r--r-- 1 pi pi 2562899 Mar 12 12:03 packed_plugins.js

Beautiful. packed_core.css is responsible for turning that alphabet soup into something pretty.

So now, open your browser's Developer's Console, hit the reload/refresh button and look for anything that doesn't load.

Yeah, that's good enough to prevent style from happening. Bringing in @foosel to see what she thinks about all this.

The only suggestion I have right now is to disable webasset bundling because clearly something went and continues to do terribly wrong there.

This should work via SSH:

~/oprint/bin/octoprint config set --bool devel.webassets.bundle false
sudo service octoprint restart

and might solve it or at least allow further analysis.

Note that I have no idea why this is happening, I've never seen this before. Just to be sure check that your SD isn't filled to the brim and also not starting to fail.

1 Like

In other words: df -h

pi@octopi:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        58G  1.7G   54G   3% /
devtmpfs        433M     0  433M   0% /dev
tmpfs           438M     0  438M   0% /dev/shm
tmpfs           438M  5.9M  432M   2% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           438M     0  438M   0% /sys/fs/cgroup
/dev/mmcblk0p1   44M   23M   21M  52% /boot
tmpfs            88M     0   88M   0% /run/user/1000

@foosel I stopped the service, ran the code and started the service. Chrome gave me the same output.

Safari however gave me the following:

os.sep) def file_exists(self, path): path, name = self.sanitize(path) file_path = os.path.join(path, name) return os.path.exists(file_path) and os.path.isfile(file_path) def folder_exists(self, path): path, name = self.sanitize(path) folder_path = os.path.join(path, name) return os.path.exists(folder_path) and os.path.isdir(folder_path) def list_files(self, path=None, filter=None, recursive=True): if path: path = self.sanitize_path(to_unicode(path)) base = self.path_in_storage(path) if base: base += u"/" else: path = self.basefolder base = u"" return self._list_folder(path, base=base, entry_filter=filter, recursive=recursive) def add_folder(self, path, ignore_existing=True, display=None): display_path, display_name = self.canonicalize(path) path = self.sanitize_path(display_path) name = self.sanitize_name(display_name) if display is not None: display_name = display folder_path = os.path.join(path, name) if os.path.exists(folder_path): if not ignore_existing: raise StorageError("{name} does already exist in {path}".format(**locals()), code=StorageError.ALREADY_EXISTS) else: os.mkdir(folder_path) if display_name != name: metadata = self._get_metadata_entry(path, name, default=dict()) metadata["display"] = display_name self._update_metadata_entry(path, name, metadata) return self.path_in_storage((path, name)) def remove_folder(self, path, recursive=True): path, name = self.sanitize(path) folder_path = os.path.join(path, name) if not os.path.exists(folder_path): return empty = True for entry in scandir(folder_path): if entry.name == ".metadata.json" or entry.name == ".metadata.yaml": continue empty = False break if not empty and not recursive: raise StorageError("{name} in {path} is not empty".format(**locals()), code=StorageError.NOT_EMPTY) import shutil shutil.rmtree(folder_path) self._remove_metadata_entry(path, name) def _get_source_destination_data(self, source, destination, must_not_equal=False): """Prepares data dicts about source and destination for copy/move.""" source_path, source_name = self.sanitize(source) destination_canon_path, destination_canon_name = self.canonicalize(destination) destination_path = self.sanitize_path(destination_canon_path) destination_name =Preformatted text

Something about your install seems to be completely and utterly broken if you are getting python code in your browser. File corruption? In the habit of just pulling power without shutting down things properly first?

I suggest you make a backup from command line

~/oprint/bin/octoprint plugins backup:backup

Copy the backup from the card (it's at ~/.OctoPrint/data/backups), flash a fresh copy of the image, update and restore the backup.

You could also try if this fixes it

source ~/oprint/bin/activate
pip install --force-reinstall OctoPrint

but frankly, if we have to assume a broken file system here I'd rather err on the side of caution and start fresh.

I believe that the rpi3 did get unpluged and replugged in down the office move. That may be the culprit.

I tried the backup, however, it did not create a backup in the directory that you indicated. Do not have the .OctoPrint. Do have an OctoPrint and there isn't a backup in there. The system did reply with a done after indicating the name of the back up.

I will also try to get the system up and see if I can do a backup from the web gui.

source ~/oprint/bin/activate
pip install --force-reinstall OctoPrint

This got it up and running. thanks.

Ah, shoot, sorry, that was my phone's fault, it autocorrected ~/.octoprint to ./OctoPrint.

1 Like