Skip to content

Prevent hangs in polkit agent dialog - #242

Merged
ids1024 merged 2 commits into
masterfrom
polkit-agent-helper
Nov 5, 2026
Merged

ids1024 merged 2 commits into
masterfrom
polkit-agent-helper

Conversation

@ids1024

@ids1024 ids1024 commented Nov 5, 2026

Copy link
Copy Markdown
Member

This should fix pop-os/cosmic-store#641.

There seem to be a few issues here:

The first issue requires patching polkit, and I'm not sure exactly what to change with the last issue, so for now this fixes the second and third issues here. That should make the dialog generally behave as expected even with the polkit bug, and allow cancelling even if something like this happens again.


  • I have not included any LLM (also known as AI) generated content in this PR, including code, comments, and descriptions.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.
  • I have read and followed all of the above requirements. For more information, see our contributor guide.

There shouldn't be any reason we can't let the user cancel while the
polkit agent helper is running.

If that hangs for any reason, this will also allow getting rid of the
dialog.
If we don't call `.clear()`, `read_line()` will append to the existing
line, and we'll try to parse the combined string with a `\n` in the
middle.
@ids1024
ids1024 requested review from a team November 5, 2026 21:59
@ids1024

ids1024 commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@Elias-Graf was there some specific reason to add the for _ in 0..3 loop in #193? That doesn't really seem to work properly.

@leviport leviport left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Confirmed to fix pop-os/cosmic-store#641 on Resolute. Password prompt still works as expected on Noble.

Regression testing passed:

Checklist

  • Volume hotkeys work
  • Plugging a headset into a combo jack prompts to select the type
  • Screen brightness can be adjusted in 5% increments with hotkeys, down to 1%
  • Keyboard backlight brightness can be adjusted via hotkeys
  • Airplane mode can be enabled and disabled via hotkey
  • Touchpad can be disabled and enabled via hotkey
  • Open the Log Out dialog; tab key works to navigate buttons
    • Enter on Cancel exits dialog
    • Esc key (without anything focused) also exits dialog

@ids1024
ids1024 merged commit d688d7b into master Nov 5, 2026
7 checks passed
@ids1024
ids1024 deleted the polkit-agent-helper branch November 5, 2026 22:34
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.

[Bug] 26.04: If incorrect PW when installing package, hangs auth dialog w/o failure notice

3 participants