Skip to content

Fix misleading WSLInterop browser login errors - #33932

Open
Aditya Pujara (a0x1ab) with Copilot wants to merge 10 commits into
devfrom
copilot/fix-wslinterop-error-message
Open

Fix misleading WSLInterop browser login errors#33932
Aditya Pujara (a0x1ab) with Copilot wants to merge 10 commits into
devfrom
copilot/fix-wslinterop-error-message

Conversation

Copilot AI commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Related command

az login

Description

On newer WSL environments, interop can be enabled through entries such as WSLInterop-late, while older browser-launch fallbacks still probe /proc/sys/fs/binfmt_misc/WSLInterop and emit misleading “WSL Interoperability is disabled” errors. az login can still succeed, but the error output incorrectly suggests WSL is misconfigured.

  • WSL interop detection

    • Detects enabled WSLInterop* binfmt entries, including WSLInterop-late.
    • Falls back to WSL_INTEROP when binfmt metadata is unavailable.
  • Interactive login browser launch

    • Routes MSAL browser opening through Azure CLI’s WSL-aware launcher when interop is enabled.
    • Avoids noisy WSL fallback output by launching through PowerShell with stderr/stdout suppressed.
    • Passes the login URL via subprocess environment rather than command interpolation.
  • Safety and concurrency

    • Validates browser URLs as HTTP(S) with a host and no control characters.
    • Serializes temporary webbrowser.open patching during interactive login.

Testing Guide

Focused regression coverage was added for:

  • WSLInterop-late detection
  • WSL browser wrapper behavior
  • unsafe URL rejection
  • az login interactive auth-code path using the WSL browser wrapper

History Notes

[Profile] az login: Fix misleading WSLInterop disabled errors during browser login on WSL


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi Copilot,
Since the current milestone time is less than 7 days, this pr may not catch up with this release.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI linked an issue Aug 19, 2026 that may be closed by this pull request
@azure-client-tools-agent
azure-client-tools-agent Bot marked this pull request as ready for review August 19, 2026 17:10
Copilot AI lite review requested due to automatic review settings August 19, 2026 17:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Copilot AI requested review from a team as code owners August 19, 2026 17:10
Copilot AI and others added 8 commits August 19, 2026 17:11
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix misleading error about WSL interop Fix misleading WSLInterop browser login errors Aug 19, 2026
@azure-client-tools-agent

Copy link
Copy Markdown
Contributor

Live test skipped

⏭️ Skipping the live test for this revision because the only test file(s) changed are azure-cli-core unit tests, which the live-test pipeline (azdev test --live) does not run — it covers command-module and extension tests only.

These azure-cli-core tests are exercised by upstream CI's unit-test jobs instead. This is informational; no action is required.

@azure-client-tools-agent azure-client-tools-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated Review Summary — PR #33932

Live test: Skipped — the only changed test file is an azure-cli-core unit test, which is not runnable via azdev test --live. Not a gap in coverage; unit tests are exercised by upstream CI instead.

CI checks: ✅ All passed (1/1 completed, 0 failed, 0 pending).

No outstanding issues found. This PR looks ready for human maintainer review/merge.

@azure-client-tools-agent azure-client-tools-agent Bot added the azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent label Aug 19, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

🔔 Routing this PR to @Azure/act-identity-squad.

@yonzhan

Copy link
Copy Markdown
Collaborator

az login

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

Labels

Account az login/account act-identity-squad Auto-Assign Auto assign by bot azure-client-tools-agent Pull request reviewed by Azure Client Tools Agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misleading error about WSLInterop

5 participants