databricks-vscode icon indicating copy to clipboard operation
databricks-vscode copied to clipboard

[BUG] Can't authenticate using OAuth U2M in a dev container

Open mcollins-ttd opened this issue 4 months ago • 0 comments

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:

  1. Clone https://github.com/mcollins-ttd/vscode-databricks-oauth
  2. Open in a dev container
  3. Open Databricks extension
  4. Click "Create configuration"
  5. Enter a Databricks host
  6. Select OAuth for authentication
  7. Enter a profile name
  8. No browser window is opened, and no link to authenticate is available. Extension says "Databricks: Logging in using OAuth U2M".

System information:

  1. Paste the output ot the Help: About command (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
  1. 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.

mcollins-ttd avatar Aug 21 '25 01:08 mcollins-ttd