Skip to content
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.0rc1] AttributeError: 'AdminUser' object has no attribute 'session' #3361

Closed
sentry-io bot opened this issue Dec 2, 2019 · 2 comments

Comments

@sentry-io
Copy link

@sentry-io sentry-io bot commented Dec 2, 2019

Sentry Issue: SERVER-1F4

AttributeError: 'AdminUser' object has no attribute 'session'
  File "octoprint/access/users.py", line 133, in logout_user
    listener.on_user_logged_out(user)
  File "octoprint/server/util/sockjs.py", line 308, in on_user_logged_out
    if user.get_id() == self._user.get_id() and hasattr(user, "session") and user.session == self._user.session:

Error in on_user_logged_out on <octoprint.server.util.sockjs.PrinterStateConnection object at 0x670ec0b0>
@foosel

This comment has been minimized.

Copy link
Owner

@foosel foosel commented Dec 2, 2019

Seems to be caused by a socket disconnect when access control is disabled. Logout methods should check if user is the special AdminUser and if so not try to handle a logout.

foosel added a commit that referenced this issue Dec 2, 2019
If ACL is disabled it doesn't make sense to log it out and it's causing
issues further down the line due to different handling.

Fixes #3361
@foosel foosel added the status:solved label Dec 2, 2019
@foosel

This comment has been minimized.

Copy link
Owner

@foosel foosel commented Dec 2, 2019

1.4.0rc2 is out.

@foosel foosel closed this Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.