Have to clear browser cache to log into interface each time


#1

What is the problem?
When going to web interface in Chrome I need to continually clear cached images and files to be able to log in. I log in the first time at the new login page and everything is okay. When I close the browser and go to the web interface again, it goes to the Octoprint interface (not the standalone login page). If I use the login drop down and enter the admin credentials nothing happens - even if I enter incorrect details. The page remains a template and empty. If I go into Chrome settings and clear just cached images and files, when I next open Chrome I get the new login page and can login again without issue. Once logged in successfully I can close the Octoprint tab and get to the web interface without any problem until I close the browser and re-open it.

When the web interface doesn't display, the below can be seen in the browser console:

Finalizing application startup
core.js?c628a227:15860
Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
:5000/api/files?recursive=true:1
Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
:5000/api/printerprofiles:1
Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
:5000/api/timelapse?unrendered=true:1
Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
:5000/api/printer/command/custom:1
Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
:5000/api/slicing:1
Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
:5000/api/settings:1
Failed to load resource: the server responded with a status of 403 (FORBIDDEN)
:5000/api/connection:1

I have also noticed that when I log in using the new login page and tick remember me, it doesn't seem to remember when I next go to the web interface. I'm assuming with the box ticked there should be a cookie or something created so that I don't need to enter the credentials again and it will log me straight back in? Again in Chrome looking at the cookie information for the IP address of my Octoprint server, it looks as though it expires on session end. This could be normal though.

What did you already try to solve it?
Have tried other browsers such as IE with the same results. I need to clear the cached images and files to be able to log in.

I also get the same issue if I RDP to the Raspbian box and use Chromium directly on it. I need to clear the cached images and files to be able to log into the interface successfully.

I haven't gone to the step of rolling back to a snapshot of the VM prior to upgrading to 1.3.10 without the new login page as yet but I didn't experience this until installing the update.

If I set the browser to clear cache on exit, then each time I open the browser I can log in fine.

Additional information about your setup
Chrome version 72.0.3626.96 (Official Build) (64-bit)
Windows 10 Pro build 1803
Octoprint version 1.3.10 running Raspberry Pi Desktop (kernel version 4.9) in an Esxi VM.


#2

Rolled back to 1.3.9 with the old login method and everything is now working as expected.
Not sure if it's something to do with some of my browser settings or something else as I'd expect there to be more people reporting a similar issue if it was widespread.

Hoping someone can offer some insight into how to fix/workaround so I can continue to use latest version.


#3

That's a known bug that's going to be fixed in 1.3.11.

[cache issues]

What you are running into there is highly unusual. OctoPrint sends headers that should tell your browser whether to cache or not, and also should trigger cache clearing on its own if needed.

I take it you have installed this yourself considering that you are talking about running it on "Raspberry Pi Desktop" (btw, not recommended, a desktop environment needs system resources that might then be lacking for driving a print, but I digress). Could you please explain how you've setup things, how you are accessing them (with reverse proxy or without)? Also please provide a full octoprint.log.

In general, you should also be able to update to 1.3.10 and just disable the bundled forcelogin plugin if that is what's causing your problems. However, based on your description I suspect there might be a general problem in your setup that has caused other problems in the past and will continue to do so unless fixed, and the login issues are just one symptom of that.