[BUG] Can't authenticate using OAuth U2M in a dev container
Describe the bug Can't authenticate using OAuth U2M in a dev container. No browser window opens, no link is available.
To Reproduce Steps to reproduce the behavior:
- Clone https://github.com/mcollins-ttd/vscode-databricks-oauth
- Open in a dev container
- Open Databricks extension
- Click "Create configuration"
- Enter a Databricks host
- Select OAuth for authentication
- Enter a profile name
- No browser window is opened, and no link to authenticate is available. Extension says "Databricks: Logging in using OAuth U2M".
System information:
- Paste the output ot the
Help: Aboutcommand (CMD-Shift-P).
Version: 1.103.1 (user setup)
Commit: 360a4e4fd251bfce169a4ddf857c7d25d1ad40da
Date: 2025-08-12T16:25:40.542Z
Electron: 37.2.3
ElectronBuildId: 12035395
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Windows_NT x64 10.0.22621
- Databricks Extension Version: 2.10.2
Additional context
The Databricks extension seems to use the Databricks CLI to authentication, which in turn uses /pkg/browser.
/pkg/browser supports xdg-open, x-www-browser, or www-browser, which are not available on the base Ubuntu dev container image; see https://github.com/devcontainers/images/issues/885.
Meanwhile, VS Code sets the BROWSER environment variable which can be used to open a browser on the host machine, but this is not supported by /pkg/browser. See https://github.com/pkg/browser/issues/41.
Workaround is to install xdg-utils in the dev container.