Skip to content

[Feature Request] Add user-friendly error handling for missing libwebkitgtk in PyMsalRuntime v0.20.0 #862

@Alex-AZPS

Description

@Alex-AZPS

MSAL client type

Public

Problem Statement

PyMsalRuntime v0.20.0 does not bundle libwebkitgtk, requiring users to manually install this dependency.
The official documentation (https://learn.microsoft.com/en-us/entra/msal/python/advanced/linux-broker-py?tabs=ubuntudep#linux-dependencies) is not easily discoverable, leaving users to encounter obscure _dlopen(...) errors when the dependency is missing.
This issue could complicate Azure CLI packaging steps and lead to runtime errors after customer upgrades, increasing the risk of ICMs.

Proposed solution

Add a try ... except ... block around the _dlopen(...) call in PyMsalRuntime.
When the dependency is missing, raise a RuntimeError with a clear, actionable message:

Extra dependency missing: libwebkitgtk. Please follow https://learn.microsoft.com/en-us/entra/msal/python/advanced/linux-broker-py?tabs=ubuntudep#linux-dependencies

This approach ensures users can quickly resolve the issue instead of facing cryptic errors.
If the team decides to maintain the current packaging strategy, this improvement should still be implemented to minimize customer impact.

related issue: #854

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions