KNOWLEDGE BASE

Error: Couldn't connect to OAuth Server at localhost When Connect To Data sources that Require OAuth Authentication Since 2020.3


Published: 19 Mar 2021
Last Modified Date: 14 Oct 2021

Issue

Upon connecting to data sources that require OAuth authentication from Tableau Desktop 2020.3 (and later) where a proxy server is configured, the following error occurs:
Error: Couldn't connect to OAuth Server at localhost

Environment

  • Tableau Desktop 2020.3 and later
  • Data sources that require OAuth authentication(Google BigQuery, Google Analytics, Salesforce.com .etc)

Resolution

Option 1

Delete the environment variables HTTP_PROXY and HTTPS_PROXY

Option 2

Use a batch file like bellow to launch Tableau Desktop. (This will disable the environment variables for the proxy setting)

------ tab_exec.bat -------------------
@echo off

set HTTP_PROXY=
set HTTPS_PROXY=

start "" "C:\Program Files\Tableau\Tableau 2020.4\bin\tableau.exe"
----------------------------------------

Option 3

Set an exception so that the proxy server will not be used for communicating with localhost via Internet Option in IE as described in the article below.
Tableau Fails To Connect to Amazon Athena through Proxy With Error Code 37CE01A3

Option 4
Add an environmental variable NO_PROXY to bypass a proxy server when accessing localhost.

  1. Click the search (magnifying glass) icon on the Windows menu.
  2. Enter sysdm.cpl to the text box and click the icon
  3. Open the Advanced tab and click Environmental Variables.
  4. In the system variables section, click New to add the following environmental variable.
  • Variable: NO_PROXY
  • Value: 127.0.0.1;localhost
  1. Click OK to close the window.

Cause

On Tableau Desktop 2020.3 and later, the design for connecting to data sources that require OAuth authentication, such as Google BigQuery, Google Analytics, Salesforce.com .etc changed, and it uses an additional java process to connect to these data sources. This java process is responsible for connecting data sources that require OAuth authentication as well as communicating to Tableau Desktop using local port.
If there is a proxy server configured on the machine where Tableau Desktop is running, the java process will try to communicate with Tableau Desktop via proxy server and fails.
Did this article resolve the issue?