Skip to content

Handle polkit timeout during udev setup#2456

Open
Ajeem-git wants to merge 2 commits into
bit-team:devfrom
Ajeem-git:issue-2375-polkit-timeout
Open

Handle polkit timeout during udev setup#2456
Ajeem-git wants to merge 2 commits into
bit-team:devfrom
Ajeem-git:issue-2375-polkit-timeout

Conversation

@Ajeem-git

Copy link
Copy Markdown
Contributor

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

buhtz commented Mar 30, 2026

Copy link
Copy Markdown
Member

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

@buhtz

buhtz commented May 25, 2026

Copy link
Copy Markdown
Member

The new mount subsystem is read for testing incl. full gocryptfs support as encfs replacement.

@buhtz buhtz 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.

Hello Ajeem,
thank you for this PR. Would be nice if you could add a changelog entry refering to the issue and also to your name and/or nick name.

Please pull/fetch first before doing modifications. I updated your branch to the latest dev version.

After that I am fine with merging it.

Regards,
Christian

@buhtz buhtz added Feedback needs user response, may be closed after timeout without a response PR: Modifications requested Maintenance team requested modifications and waiting for their implementation and removed PR: Waiting for review PR won't be merged until review and approval from a member of the maintenance team. labels Jun 5, 2026

@buhtz buhtz 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.

Are you still with me?

Comment thread common/config.py
'Timed out while waiting for the authentication dialog. '
'Please try again.'
)
logger.error(msg, self)

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.

Please don't translate log messages. Just user messages.

@buhtz

buhtz commented Jun 16, 2026

Copy link
Copy Markdown
Member

Hello Ajeem,

can you please give me a life sign and explain your plans with this PR.

Best,
Christian

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

Labels

Feedback needs user response, may be closed after timeout without a response PR: Modifications requested Maintenance team requested modifications and waiting for their implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants