Skip to content

#768 - System now successfully resumes from sleep on guardian page#771

Merged
lprichar merged 5 commits intomainfrom
bug/768-hibernate
Aug 26, 2022
Merged

#768 - System now successfully resumes from sleep on guardian page#771
lprichar merged 5 commits intomainfrom
bug/768-hibernate

Conversation

@lprichar
Copy link
Copy Markdown
Contributor

Issue

Fixes #768

Description

The underlying issue was that Eel in Python would die when the system was resuming from sleep. The web-based UI then looked like it was still working when in fact the server had crashed. That gave the appearance of key ceremonies and decryptions not appearing on guardian devices when they should have, when in fact the issue was much larger.

The server-side solution is to disallow eel from ever exiting of its own accord. This allows eel to resume from system sleep, although it has the consequence that the user must now explicitly hit Ctrl+C to end the app.

The client-side solution is to watch for system resume events and when they occur refresh the page. This solution also adds a refresh button for convenience, although the prior solutions should warrant it unnecessary.

Testing

  1. Run the app as a guardian
  2. Sleep/hibernate your system
  3. Have an admin add a key ceremony

Expected the guardian should see the new key ceremony on their home page

Comment thread src/electionguard_gui/main_app.py
Comment thread src/electionguard_gui/components/guardian_home_component.py
Copy link
Copy Markdown
Contributor

@SteveMaier-IRT SteveMaier-IRT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the admin times out because the tablet was put to sleep using the power button, the UI will not show the existing elections. The console will tell the user to hit ctrl+C to close the egui app, but this does not close the gui at all.

The refresh button on the guardian home page worked well and was able to reconnect from a lost socket.

The admin pages are abit more complex and a solution will be needed from multiple pages, not just the home page like the guardians.

@lprichar
Copy link
Copy Markdown
Contributor Author

Great points. Added issue to track remaining work:

#773

I will fix the Ctrl+C comment in this PR shortly.

Copy link
Copy Markdown
Contributor

@SteveMaier-IRT SteveMaier-IRT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm for the guardian

@lprichar lprichar merged commit f4494ec into main Aug 26, 2022
@lprichar lprichar deleted the bug/768-hibernate branch August 26, 2022 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐞 GUI Dies After Several Hours of Running

2 participants