New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1.4.0rc2] Losing session and running into permission errors #3370
Comments
If this works in safe mode then whatever is happening there is happening due to a third party plugin. I cannot reproduce the behaviour at all, I got a bunch of instances on 1.4.0rc2 here and they all behave. So let's take a look at your plugin list:
The only third party plugins here appear to be
Can you try disabling/temporarily uninstalling Octolapse, then start in normal mode and see if the issue still reproduces? Considering that you ran into additional issues with that specific plugin according to your comment at #3360 (comment) it's currently the most likely candidate. Also pinging @FormerLurker just in case. edit Also please fix your undervoltage situation, that's known to cause all kinds of ridiculous problems:
|
@gege2b., are you running python 3? If so, Octolapse is not yet compatible (thought I've gotten it working mostly in devel). If you are running python 2.7, it looks like there is probably an error in your javascript console (make sure ERRORS are not being filtered from the console). Find it and paste it in here, but not until after you solve your issues with Octolapse disabled. Thanks! |
Restart in safe mode, uninstall, restart in normal mode. Safe mode can asks so be triggered through the command line. Or is that in safe mode? |
hi So first, @FormerLurker : nope, I'm running Python 2.7 for now (but of course I'm planning to upgrade to 3 as soon as all is Ok) @foosel : pretty weird, I got the same error this time in safe mode Weir thing is, once octolapse disabled and OP restarted in normal mode (from command line), it worked... a few minutes
If I do a ctrl+F5 then it's gone and all works as expected :
But it's really random... I've cleared the browser cache many times and nothing changes |
It looks almost as if something is killing your session. Can you share a screenshot of how your user and your groups look like in Settings > Access Control? And can you also mail me your |
Yep, I'll do that
|
Got the files, thank you. I cannot see anything weird in either them or the screenshots. And I cannot reproduce your problems at all, neither with FF 70 nor 71. But I just spotted something in your log excerpt:
v4 address on the login, but
link local v6 addresses on the denied requests. I remember that the session cookies in Flask can also be bound to the client IP. I thought I had disabled that (specifically because windows clients appear to happily toggle between all possible options on name resolution for requests on the same page). I'll have to check if maybe some third party lib update or something changed the behaviour here which would explain what you are seeing. A clue! |
damn it At first when I read your comment, I wondered if the fact that eth AND wifi are connected at the same time could be the cause of all this mess, but the pair ipv4/ipv6 are both from my ethernet EDIT : I tested under firefox on linux (kubuntu) and indeed, there is no such problem Don't hesitate to ask me for any further infos |
It would be interesting to know if the issue goes away if you only have wifi or ethernet connected. I've been digging through the related session code in Flask-Login for most of the day and so far I have not found a smoking gun sadly and am hence a bit at a loss for the moment. |
No it does not goes away (I'm testing in eth since I read your comment) As edited on my comment above, tested under linux (different PC) and it's OK |
So it definitely is that weird Windows issue again with the multiple host addresses, but for some reason the workaround for that using |
Can you do me a favor and see if the issue goes away if you explicitly access OctoPrint only via the v4 address? I want to make sure it's really the ip switching that's at fault here, would suck if I was barking up the wrong tree. |
Also, just to make sure - this issue does NOT happen with 1.3.12 and the exact same setup, right? |
I disabled ipv6 on my win10 machine and it does not happens anymore (I still have an error from octolapse about settings that could not be loaded, but it does not talk about permissions (like earlier), so I guess it's something else going on here) And indeed, this didn't happen on 1.3.12 |
I didn't mean disabling v6, I meant accessing the whole instance via whatever the v4 IP might be instead of I'm still unable to reproduce this myself on site and it's driving me a bit nuts because I'm very sure the issue is the v4/v6 toggling and I need to solve this because if it happens for you it can happen for others, but right now I have no clue why it's even happening because the fix I did for it a year or so ago is still there and holds. Something weird is happening here and I don't get it yet. |
But disabling IPv6 did force all the trafic over IPv4 instead, thus proving the theory that the IPv4/IPv6 hopping is the problem. |
... you are indeed right and I'm apparently more tired than I thought. It's been a bit of a long week 😅 |
@fieldOfView that was the point indeed :) |
@gege2b, checkout this issue in the Octolapse repo. Using that thread for anything Octolapse related will help keep the OctoPrint issues focused on OctoPrint itself. FYI, I have just finished making Octolapse compatible with OctoPrint v1.4.0 (both python2 and 3) and have completed regression testing on OctoPrint v1.3.12. Hopefully your load state issues will go away. I believe I tracked your issue down to differences in the json.dumps command (actual syntax problems that didn't cause issues in an older version), though other since corrected issues could have contributed. Thanks! |
I think I know what is going on and why it is happening under 1.4.0 and not under 1.3.x: https://github.com/foosel/OctoPrint/blob/devel/src/octoprint/server/__init__.py#L133-L136 This gets triggered when an IP change happens. Which causes the user to basically get logged out. Which right now appears to be wrong, but I'll have to dig a bit deeper and try to figure out why I thought that was necessary. Might just have been a simple misunderstanding though in which case the fix should be easy. |
We should only clear out the identity when the session has actually been deemed deleted, not just on staleness due to e.g. a client IP change. Closes #3370
That should be fixed by the above commit, ready for 1.4.0rc3. Note that I have still not been able to reproduce and thus cannot confirm myself. Based on the code though I see what was wrong. |
Be able to deal with that. Follow up to #3370
1.4.0rc3 has just been released |
This is the follow up from my message in #3360
What were you doing?
I wanted to open/print a file
or
restart octoprint in safe mode (or just restart it)
or
Start the mjpeg_streamer server from the menu
or
Reboot the system
or
Disable some plugins
...
What did you expect to happen?
The desired operation to complete flawlessly
What happened instead?
Errors everywheeeere (see screenshot above)
Did the same happen when running OctoPrint in safe mode?
Nope (Once restarted in safe mode with another way than the menu)
Version of OctoPrint
1.4.0rc2
Operating System running OctoPrint
Raspbian 9
Printer model & used firmware incl. version
Marlin 1.1.8
Browser and version of browser, operating system running browser
Firefox 70
Link to octoprint.log
octoprint.log (snipped to the two restart)
For every failing action, I got a " tornado.access - WARNING - 403 (...)"
Link to contents of terminal tab or serial.log
Not related (Octprint is correctly connected to the printer)
Link to contents of Javascript console in the browser
Nothing fancy
Screenshot(s)/video(s) showing the problem:
see above
I have read the FAQ.
The text was updated successfully, but these errors were encountered: