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

[0.6.0-rc2 QA] Client crashes on login if user was logged out due to deletion #1414

Closed
eloquence opened this issue Feb 3, 2022 · 1 comment · Fixed by #1415
Closed

[0.6.0-rc2 QA] Client crashes on login if user was logged out due to deletion #1414

eloquence opened this issue Feb 3, 2022 · 1 comment · Fixed by #1415
Labels
bug Something isn't working release QA

Comments

@eloquence
Copy link
Member

eloquence commented Feb 3, 2022

Environment: Qubes 4.0.4, staging environment, RC2 0.6.0 package, 2.1.0 prod server

STR

  1. Create a user with username = "deleteme"
  2. Log into the client as the user
  3. Send a reply as the user (not sure if necessary)
  4. Disconnect the workstation from the network
  5. Delete the user via the Journalist Interface on another computer
  6. Reconnect the workstation to the network
  7. Wait until you get bounced to the login screen with a session expiry error
  8. Log back in as a different user

Expected behavior

User is logged in

Actual behavior

Client crashes. Logs say:

2022-02-02 16:40:57,179 - securedrop_client.logic:534(on_authenticate_success) INFO: erik successfully logged in
2022-02-02 16:40:57,193 - root:63(excepthook) ERROR: Unrecoverable error
Traceback (most recent call last):
  File "/opt/venvs/securedrop-client/lib/python3.7/site-packages/securedrop_client/gui/widgets.py", line 2037, in _on_update_authenticated_user
    if user.uuid == self.sender.uuid:
  File "/opt/venvs/securedrop-client/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py", line 276, in __get__
    return self.impl.get(instance_state(instance), dict_)
  File "/opt/venvs/securedrop-client/lib/python3.7/site-packages/sqlalchemy/orm/attributes.py", line 677, in get
    value = state._load_expired(state, passive)
  File "/opt/venvs/securedrop-client/lib/python3.7/site-packages/sqlalchemy/orm/state.py", line 660, in _load_expired
    self.manager.deferred_scalar_loader(self, toload)
  File "/opt/venvs/securedrop-client/lib/python3.7/site-packages/sqlalchemy/orm/loading.py", line 985, in load_scalar_attributes
    raise orm_exc.ObjectDeletedError(state)
sqlalchemy.orm.exc.ObjectDeletedError: Instance '<User at 0x70ff1a06bc50>' has been deleted, or its row is otherwise not present.
(END)

This error is ephemeral: after restarting the client, the error goes away.

@eloquence eloquence added bug Something isn't working release QA labels Feb 3, 2022
@sssoleileraaa
Copy link
Contributor

I was able to repro just now 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release QA
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants