Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE] Databricks CLI authentication error #903

Open
lw-halfspace opened this issue May 1, 2024 · 2 comments
Open

[ISSUE] Databricks CLI authentication error #903

lw-halfspace opened this issue May 1, 2024 · 2 comments

Comments

@lw-halfspace
Copy link

Describe the issue

Error when entering a Databricks Profile Name when authenticating Databricks via cmd and powershell.

Steps to reproduce the behavior

After installing Databricks CLI v0.218.0 and running:
databricks auth login --host [workspace url]
Databricks Profile Name: adb-[Workspace ID]-dev

Returns:

Error: oidc: fetch .well-known: unexpected error handling request: invalid character '<' looking for beginning of value. This is likely a bug in the Databricks SDK for Go or the underlying REST API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:
GET /login.html?o=[Workspace ID]/oidc/.well-known/oauth-authorization-server
> * Host:
> * Accept: application/json
> * Referer: https://adb-[Databricks Instance].azuredatabricks.net/?o=[Workspace ID]/oidc/.well-known/oauth-authorization-server
> * User-Agent: cli/0.218.0 databricks-sdk-go/0.38.0 go/1.21.9 os/windows cmd/auth_login
< HTTP/2.0 200 OK
< * Cache-Control: no-cache, no-store, must-revalidate
< * Content-Security-Policy: default-src *; font-src * data:; frame-src * blob:; img-src * blob: data:; media-src * data:; object-src 'none'; style-src * 'unsafe-inline'; worker-src * blob:; script-src 'self' 'unsafe-eval' 'unsafe-hashes' 'report-sample' https://*.databricks.com https://databricks.github.io/debug-bookmarklet/ https://widget.intercom.io https://js.intercomcdn.com https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js https://databricks-ui-assets.azureedge.net https://ui-serving-cdn-testing.azureedge.net https://uiserviceprodwestus-cdn-endpoint.azureedge.net https://databricks-ui-infra.s3.us-west-2.amazonaws.com 'sha256-[Redacted]' 'sha256-[Redacted]' 'sha256-[Redacted]' 'sha256-[Redacted]'; report-uri /ui-csp-reports; frame-ancestors *.vocareum.com *.docebosaas.com *.edx.org *.deloitte.com *.cloudlabs.ai *.databricks.com *.myteksi.net
< * Content-Type: text/html; charset=utf-8
< * Date: Wed, 1 May 2024 08:05:40 GMT
< * Server: databricks
< * Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
< * X-Content-Type-Options: nosniff
< * X-Ui-Svc: true
< * X-Xss-Protection: 1; mode=block
< <!doctype html>
< <html>
<  <head>
<   <meta charset="utf-8">
<   <meta http-equiv="Content-Language" content="en">
<   <title>Databricks - Sign In</title>
<   <meta name="viewport" content="width=960">
<   <link rel="icon" type="image/png" href="https://databricks-ui-assets.azureedge.net/favicon.ico">
<   <meta http-equiv="content-type" content="text/html; charset=UTF8">
<   <script id="__databricks_react_script"></script>
<   <script>window.__DATABRICKS_SAFE_FLAGS__={"databricks.infra.showErrorModalOnFetchError":true,"databricks.fe.infra.useReact18":true,"databricks.fe.infra.useReact18NewAPI":false,"databricks.fe.infra.fixConfigPrefetch":true},window.__DATABRICKS_CONFIG__={"publicPath":{"mlflow":"https://databricks-ui-assets.azureedge.net/","dbsql":"https://databricks-ui-assets.azureedge.net/","feature-store":"https://databricks-ui-assets.azureedge.net/","monolith":"https://databricks-ui-assets.azureedge.net/","jaws":"https://databricks-ui-assets.azureedge.net/"}}</script>
<   <link rel="icon" href="https://databricks-ui-assets.azureedge.net/favicon.ico">
<   <script>
<   function setNoCdnAndReload() {
<       document.cookie = `x-databricks-cdn-inaccessible=true; path=/; max-age=86400`;
<       const metric = 'cdnFallbackOccurred';
<       const browserUserAgent = navigator.userAgent;
<       const browserTabId = window.browserTabId;
<       const performanceEntry = performance.getEntriesByType('resource').filter(e => e.initiatorType === 'script').slice(-1)[0]
<       sessionStorage.setItem('databricks-cdn-fallback-telemetry-key', JSON.stringify({ tags: { browserUserAgent, browserTabId }, performanceEntry}));
<       window.location.reload();
<   }
< </script>
<   <script>
<   // Set a manual timeout for dropped packets to CDN
<   function loadScriptWithTimeout(src, timeout) {
<      return new Promise((resolve, reject) => {
<         const script = document.createElement('script');
<           script.defer = true;
<           script.src = src;
<           script.onload = resolve;
<           script.onerror = reject;
<           document.head.appendChild(script);
<           setTimeout(() => {
<               reject(new Error('Script load timeout'));
<           }, timeout);
<       });
<   }
<   loadScriptWithTimeout('https://databricks-ui-assets.azureedge.net/static/js/login/login.71184aca.js', 10000).catch(setNoCdnAndReload);
< </script>
<  </head>
<  <body class="light-mode">
<   <uses-legacy-bootstrap>
<    <div id="login-page"></div>
<   </uses-legacy-bootstrap>
<  </body>
< </html>

Expected Behavior

Authentication successful as in What are Databricks Asset Bundles? at For OAuth U2M authentication.

Actual Behavior

Opens powershell
databricks auth login --host [workspace url]
Databricks Profile Name: adb-[Workspace ID]-dev
Return errror.

OS and CLI version

  • Databricks CLI v0.218.0
  • OS: Microsoft Windows 11 Enterprise
  • OS Version: 10.0.22631

Is this a regression?

First time trying it.
Can reproduce on a colleague's workstation with same specs.

Debug Logs

Output logs if you run the command with debug logs enabled. Example: databricks clusters list --log-level=debug. Redact if needed:

PS C:\Users[User]> databricks auth login --host [Workspace url] --log-level=debug
10:12:30 INFO start pid=3688 version=0.218.0 args="C:\Users\[User]\AppData\Local\Microsoft\WinGet\Packages\Databricks.DatabricksCLI_Microsoft.Winget.Source_8wekyb3d8bbwe\databricks.exe, auth, login, --host, [Workspace url], --log-level=debug"
Databricks Profile Name: adb-[Workspace ID]-dev
10:12:34 DEBUG GET /login.html?o=[Workspace ID]/oidc/.well-known/oauth-authorization-server
< HTTP/2.0 200 OK
< <!doctype html>
<
<
<
< <meta http-equiv="Content-Language" co... (2348 more bytes) pid=3688 sdk=true
Error: oidc: fetch .well-known: unexpected error handling request: invalid character '<' looking for beginning of value. This is likely a bug in the Databricks SDK for Go or the underlying REST API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:

GET /login.html?o=[Workspace ID]/oidc/.well-known/oauth-authorization-server
> * Host:
> * Accept: application/json
> * Referer: https://adb-[Databricks Instance].azuredatabricks.net/?o=[Workspace ID]/oidc/.well-known/oauth-authorization-server
> * User-Agent: cli/0.218.0 databricks-sdk-go/0.38.0 go/1.21.9 os/windows cmd/auth_login
< HTTP/2.0 200 OK
< * Cache-Control: no-cache, no-store, must-revalidate
< * Content-Security-Policy: default-src *; font-src * data:; frame-src * blob:; img-src * blob: data:; media-src * data:; object-src 'none'; style-src * 'unsafe-inline'; worker-src * blob:; script-src 'self' 'unsafe-eval' 'unsafe-hashes' 'report-sample' https://*.databricks.com https://databricks.github.io/debug-bookmarklet/ https://widget.intercom.io https://js.intercomcdn.com https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js https://databricks-ui-assets.azureedge.net https://ui-serving-cdn-testing.azureedge.net https://uiserviceprodwestus-cdn-endpoint.azureedge.net https://databricks-ui-infra.s3.us-west-2.amazonaws.com 'sha256-[Redacted]' 'sha256-[Redacted]' 'sha256-[Redacted]' 'sha256-[Redacted]'; report-uri /ui-csp-reports; frame-ancestors *.vocareum.com *.docebosaas.com *.edx.org *.deloitte.com *.cloudlabs.ai *.databricks.com *.myteksi.net
< * Content-Type: text/html; charset=utf-8
< * Date: Wed, 1 May 2024 08:12:34 GMT
< * Server: databricks
< * Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
< * X-Content-Type-Options: nosniff
< * X-Ui-Svc: true
< * X-Xss-Protection: 1; mode=block
< <!doctype html>
< <html>
<  <head>
<   <meta charset="utf-8">
<   <meta http-equiv="Content-Language" content="en">
<   <title>Databricks - Sign In</title>
<   <meta name="viewport" content="width=960">
<   <link rel="icon" type="image/png" href="https://databricks-ui-assets.azureedge.net/favicon.ico">
<   <meta http-equiv="content-type" content="text/html; charset=UTF8">
<   <script id="__databricks_react_script"></script>
<   <script>window.__DATABRICKS_SAFE_FLAGS__={"databricks.infra.showErrorModalOnFetchError":true,"databricks.fe.infra.useReact18":true,"databricks.fe.infra.useReact18NewAPI":false,"databricks.fe.infra.fixConfigPrefetch":true},window.__DATABRICKS_CONFIG__={"publicPath":{"mlflow":"https://databricks-ui-assets.azureedge.net/","dbsql":"https://databricks-ui-assets.azureedge.net/","feature-store":"https://databricks-ui-assets.azureedge.net/","monolith":"https://databricks-ui-assets.azureedge.net/","jaws":"https://databricks-ui-assets.azureedge.net/"}}</script>
<   <link rel="icon" href="https://databricks-ui-assets.azureedge.net/favicon.ico">
<   <script>
<   function setNoCdnAndReload() {
<       document.cookie = `x-databricks-cdn-inaccessible=true; path=/; max-age=86400`;
<       const metric = 'cdnFallbackOccurred';
<       const browserUserAgent = navigator.userAgent;
<       const browserTabId = window.browserTabId;
<       const performanceEntry = performance.getEntriesByType('resource').filter(e => e.initiatorType === 'script').slice(-1)[0]
<       sessionStorage.setItem('databricks-cdn-fallback-telemetry-key', JSON.stringify({ tags: { browserUserAgent, browserTabId }, performanceEntry}));
<       window.location.reload();
<   }
< </script>
<   <script>
<   // Set a manual timeout for dropped packets to CDN
<   function loadScriptWithTimeout(src, timeout) {
<      return new Promise((resolve, reject) => {
<         const script = document.createElement('script');
<           script.defer = true;
<           script.src = src;
<           script.onload = resolve;
<           script.onerror = reject;
<           document.head.appendChild(script);
<           setTimeout(() => {
<               reject(new Error('Script load timeout'));
<           }, timeout);
<       });
<   }
<   loadScriptWithTimeout('https://databricks-ui-assets.azureedge.net/static/js/login/login.71184aca.js', 10000).catch(setNoCdnAndReload);
< </script>
<  </head>
<  <body class="light-mode">
<   <uses-legacy-bootstrap>
<    <div id="login-page"></div>
<   </uses-legacy-bootstrap>
<  </body>
< </html>

10:12:34 ERROR failed execution pid=3688 exit_code=1 error="oidc: fetch .well-known: unexpected error handling request: invalid character '<' looking for beginning of value. This is likely a bug in the Databricks SDK for Go or the underlying REST API. Please report this issue with the following debugging information to the SDK issue tracker at https://github.com/databricks/databricks-sdk-go/issues. Request log:\n\nGET /login.html?o=[Workspace ID]/oidc/.well-known/oauth-authorization-server\n> * Host: \n> * Accept: application/json\n> * Referer: https://adb-[Databricks Instance].azuredatabricks.net/?o=[Workspace ID]/oidc/.well-known/oauth-authorization-server\n> * User-Agent: cli/0.218.0 databricks-sdk-go/0.38.0 go/1.21.9 os/windows cmd/auth_login\n< HTTP/2.0 200 OK\n< * Cache-Control: no-cache, no-store, must-revalidate\n< * Content-Security-Policy: default-src *; font-src * data:; frame-src * blob:; img-src * blob: data:; media-src * data:; object-src 'none'; style-src * 'unsafe-inline'; worker-src * blob:; script-src 'self' 'unsafe-eval' 'unsafe-hashes' 'report-sample' https://*.databricks.com https://databricks.github.io/debug-bookmarklet/ https://widget.intercom.io https://js.intercomcdn.com https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js https://databricks-ui-assets.azureedge.net https://ui-serving-cdn-testing.azureedge.net https://uiserviceprodwestus-cdn-endpoint.azureedge.net https://databricks-ui-infra.s3.us-west-2.amazonaws.com 'sha256-[Redacted]' 'sha256-[Redacted]' 'sha256-[Redacted]' 'sha256-[Redacted]'; report-uri /ui-csp-reports; frame-ancestors *.vocareum.com *.docebosaas.com *.edx.org *.deloitte.com *.cloudlabs.ai *.databricks.com *.myteksi.net\n< * Content-Type: text/html; charset=utf-8\n< * Date: Wed, 1 May 2024 08:12:34 GMT\n< * Server: databricks\n< * Strict-Transport-Security: max-age=31536000; includeSubDomains; preload\n< * X-Content-Type-Options: nosniff\n< * X-Ui-Svc: true\n< * X-Xss-Protection: 1; mode=block\n< <!doctype html>\n< <html>\n< <head>\n< <meta charset=\"utf-8\">\n< <meta http-equiv=\"Content-Language\" content=\"en\">\n< <title>Databricks - Sign In</title>\n< <meta name=\"viewport\" content=\"width=960\">\n< <link rel=\"icon\" type=\"image/png\" href=\"https://databricks-ui-assets.azureedge.net/favicon.ico\">\n< <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF8\">\n< <script id=\"__databricks_react_script\"></script>\n< <script>window.__DATABRICKS_SAFE_FLAGS__={\"databricks.infra.showErrorModalOnFetchError\":true,\"databricks.fe.infra.useReact18\":true,\"databricks.fe.infra.useReact18NewAPI\":false,\"databricks.fe.infra.fixConfigPrefetch\":true},window.__DATABRICKS_CONFIG__={\"publicPath\":{\"mlflow\":\"https://databricks-ui-assets.azureedge.net/\",\"dbsql\":\"https://databricks-ui-assets.azureedge.net/\",\"feature-store\":\"https://databricks-ui-assets.azureedge.net/\",\"monolith\":\"https://databricks-ui-assets.azureedge.net/\",\"jaws\":\"https://databricks-ui-assets.azureedge.net/\"}}</script>\n< <link rel=\"icon\" href=\"https://databricks-ui-assets.azureedge.net/favicon.ico\">\n< <script>\n< function setNoCdnAndReload() {\n< document.cookie = `x-databricks-cdn-inaccessible=true; path=/; max-age=86400`;\n< const metric = 'cdnFallbackOccurred';\n< const browserUserAgent = navigator.userAgent;\n< const browserTabId = window.browserTabId;\n< const performanceEntry = performance.getEntriesByType('resource').filter(e => e.initiatorType === 'script').slice(-1)[0]\n< sessionStorage.setItem('databricks-cdn-fallback-telemetry-key', JSON.stringify({ tags: { browserUserAgent, browserTabId }, performanceEntry}));\n< window.location.reload();\n< }\n< </script>\n< <script>\n< // Set a manual timeout for dropped packets to CDN\n< function loadScriptWithTimeout(src, timeout) {\n< return new Promise((resolve, reject) => {\n< const script = document.createElement('script');\n< script.defer = true;\n< script.src = src;\n< script.onload = resolve;\n< script.onerror = reject;\n< document.head.appendChild(script);\n< setTimeout(() => {\n< reject(new Error('Script load timeout'));\n< }, timeout);\n< });\n< }\n< loadScriptWithTimeout('https://databricks-ui-assets.azureedge.net/static/js/login/login.71184aca.js', 10000).catch(setNoCdnAndReload);\n< </script>\n< </head>\n< <body class=\"light-mode\">\n< <uses-legacy-bootstrap>\n< <div id=\"login-page\"></div>\n< </uses-legacy-bootstrap>\n< </body>\n< </html>\n"

@andrewnester andrewnester transferred this issue from databricks/cli May 1, 2024
@bayees
Copy link

bayees commented May 1, 2024

I am experiencing the same error. Rolling the CLI version back does not fix the issue.

@lw-halfspace
Copy link
Author

lw-halfspace commented May 1, 2024

Workaround:
In Powershell: databricks configure and entering the Databricks workspace instance URL, as well as a personal access token will achieve the same result.
However, databricks auth login still throws the above error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants