Octoprint re-login needed very often

#1

Since some months I have the issue that I have to re-login into octoprint UI very often. I did not have that when I startet to use octoprint (around 2 years ago).

I can't tell what causes me to have to login again.

On my phone I have to login nearly everytime. On my ipad "nearly never". On my Laptop sometimes.
I already deleted the cache but that did not help.

Samba watched folder
#2

It's entirely possible that this is a cookie-based problem. I would guess that OctoPrint saves the session's ID in a cookie so that it knows you're the same person who logged in earlier.

If you have something that automatically deletes or blocks cookies then this might explain things.

#3

I don’t have something that automatically deletes cookies. Or at least I think I don’t have that.

However I do have Pihole in my network. Could this cause this issue?

#4

I dunno. It doesn't sound probable but then again, it's something different. Feel free to turn it off, use a different DNS server temporarily and see if that works better.

#5

I turned it off, but the issue persists. I changed the local IP of my octoprint some months ago. Could this be the issue? An old cookie or something like that?

#6

Now you're getting somewhere. Could be arp caching but seems unlikely. If you have Windows then install the Bonjour client.

If you had an iPhone (unlikely), it would probably just work fine. So I'll guess that you have an Android-based phone. Android calls this Network Service Discovery, for what it's worth. The only documentation I found was how to add the broadcasting side of this to an app rather than to verify whether or not the phone has the service toggled on or not.

That said, your phone can't discover network services unless you're connected to your local wi-fi network, right? And further, your phone needs to be connected to the same 2.4GHz network that your Raspi is connected to (rather than trying to route through your router which may not forward broadcasts like this).

#7

It doesn't sound like @h4nc is having issues connecting but rather staying loggedin. Service discovery and bonjour has nothing to do with that.

@h4nc please provide some more info about your setup and logs. Where does OctoPrint run. What phone, what browser on your phone. How's your network setup. And so on. The more info the better.