Skip to content

Handle polkit timeout during udev setup#2456

Open
Ajeem-git wants to merge 1 commit intobit-team:devfrom
Ajeem-git:issue-2375-polkit-timeout
Open

Handle polkit timeout during udev setup#2456
Ajeem-git wants to merge 1 commit intobit-team:devfrom
Ajeem-git:issue-2375-polkit-timeout

Conversation

@Ajeem-git
Copy link
Copy Markdown

Summary: Prevent a crash when the authentication dialog times out while saving udev scheduling rules.

What changed:

  • Convert org.freedesktop.DBus.Error.NoReply from SetupUdev.save() into an internal Timeout condition.
  • Catch Timeout in Config._setup_event_based_automation(), notify the user, and return without crashing.

Why:
When the polkit password prompt times out, the D-Bus call returns NoReply. That exception was not handled in the udev setup path, so the Manage Profiles dialog crashed instead of reporting the failure gracefully.

Verification:

  • Traced the exception path from the issue traceback.
  • Verified the updated files compile with python3.11 -m py_compile common/tools.py common/config.py.

Note:
I could not fully reproduce the Linux polkit dialog flow on macOS, so this is a traceback-driven fix.

@buhtz buhtz added the PR: Waiting for review PR won't be merged until review and approval from a member of the maintenance team. label Mar 30, 2026
@buhtz buhtz added this to the Upcoming next (2.0.0) milestone Mar 30, 2026
@buhtz
Copy link
Copy Markdown
Member

buhtz commented Mar 30, 2026

Hello Ajeem,

thank you for your contribution and taking time to improve Back In Time. I appreciate it.

On a quick initial review your PR looks good. I'll review it in detail later.

Please note that currently I have to put all PRs on hold, because the Back In Time code base is in a transition phase. I am rewriting the mounting subsystem from scratch (PR #2449). Since the components are not well isolated, this affects nearly every file. To avoid complex merge conflicts, all other PRs are temporarily on hold.

Best wishes,
Christian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Waiting for review PR won't be merged until review and approval from a member of the maintenance team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants