Hello everybody! I'm trying to extract data from S...
# troubleshooting
a
Hello everybody! I'm trying to extract data from SalesForce Marketing Cloud with
tap-exacttarget
, in the past I was able to run
meltano invoke tap-exacttarget > output.json
but now I get this error:
Copy code
Plugin configuration is invalid
Catalog discovery failed: command ['C:\\Users\\AndreaRadaelli\\Desktop\\Development\\Venvs\\meltano_SFMC_BQ\\Scripts\\SFMC_BQ\\.meltano\\extractors\\tap-exacttarget\\venv\\Scripts\\tap-exacttarget.exe', '--config', 'C:\\Users\\AndreaRadaelli\\Desktop\\Development\\Venvs\\meltano_SFMC_BQ\\Scripts\\SFMC_BQ\\.meltano\\run\\tap-exacttarget\\tap.25504a9f-1ba1-45a0-858b-f0bc391cf34a.config.json', '--discover'] returned 1 with stderr:
 INFO Starting discovery.
INFO Generating auth stub...
INFO Authentication URL is: <https://mctfgh9dtnh0swkcf4g62d18tr81.auth.marketingcloudapis.com/v1/requestToken>
INFO Trying to authenticate using V1 endpoint
INFO Failed to auth using V1 endpoint
INFO Trying to authenticate using V2 endpoint
INFO Authentication URL is: <https://mctfgh9dtnh0swkcf4g62d18tr81.auth.marketingcloudapis.com>
INFO Failed to auth using V2 endpoint
CRITICAL Unable to validate App Keys(ClientID/ClientSecret) provided: {'error': 'invalid_client', 'error_description': 'Client authentication failed. Make sure that the client ID and client secret are valid.', 'error_uri': '<https://developer.salesforce.com/docs>'}. Please check your 'client_id', 'client_secret' or 'tenant_subdomain'.
Traceback (most recent call last):
  File "C:\Users\AndreaRadaelli\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\AndreaRadaelli\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\Scripts\tap-exacttarget.exe\__main__.py", line 7, in <module>
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\lib\site-packages\singer\utils.py", line 229, in wrapped
    return fnc(*args, **kwargs)
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\lib\site-packages\tap_exacttarget\__init__.py", line 168, in main
    do_discover(args)
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\lib\site-packages\tap_exacttarget\__init__.py", line 62, in do_discover
    auth_stub = get_auth_stub(config)
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\lib\site-packages\tap_exacttarget\client.py", line 82, in get_auth_stub
    raise Exception(message.format(str(e))) from None
Exception: Unable to validate App Keys(ClientID/ClientSecret) provided: {'error': 'invalid_client', 'error_description': 'Client authentication failed. Make sure that the client ID and client secret are valid.', 'error_uri': '<https://developer.salesforce.com/docs>'}. Please check your 'client_id', 'client_secret' or 'tenant_subdomain'.
I double checked my
client_id
,
client_secret
and
tenant_subdomain
and they are correct. Does someone know how to resolve this? I've already encountered a
catalog discovery failed
error and I was told to override some settings, maybe someone knows what setting do I need to override to solve this? Thanks in advance! 🤗
p
I'd recommend running
meltano config tap-exacttarget
to view your config and make sure its being populated as expected. The tap doesnt look like its been changed in a while so it wouldnt be related to that. That looks like the direct response from the API
Copy code
Unable to validate App Keys(ClientID/ClientSecret) provided: {'error': 'invalid_client', 'error_description': 'Client authentication failed. Make sure that the client ID and client secret are valid.', 'error_uri': '<https://developer.salesforce.com/docs>'}
You could try making a request using postman or curl to validate that those credentials/subdomain are working
a
Hi @pat_nadolny and thanks again for your support! After the
meltano config tap-exacttarget
I get this:
Copy code
{
  "batch_size": 10000,
  "tenant_subdomain": "<>",
  "start_date": "2023-05-29T00:00:00Z",
  "client_id": "<>",
  "client_secret": "<>"
}
Which is fine I guess? It's similar to a previous
tap-exacttarget
configuration that worked fine. I also tested the credentials with an API call and they worked, I received some data from SFMC. I tried to run
meltano invoke tap-exacttarget > output.json
with both taps (the previous and the current) and I get: • current tap
Copy code
Catalog discovery failed: command ['C:\\Users\\AndreaRadaelli\\Desktop\\Development\\Venvs\\meltano_SFMC_BQ\\Scripts\\SFMC_BQ\\.meltano\\extractors\\tap-exacttarget\\venv\\Scripts\\tap-exacttarget.exe', '--config', 'C:\\Users\\AndreaRadaelli\\Desktop\\Development\\Venvs\\meltano_SFMC_BQ\\Scripts\\SFMC_BQ\\.meltano\\run\\tap-exacttarget\\tap.c86ce97b-ec2c-4712-ad81-54a9f0165cc7.config.json', '--discover'] returned 1 with stderr:
 INFO Starting discovery.
INFO Generating auth stub...
INFO Authentication URL is: <https://mctfgh9dtnh0swkcf4g62d18tr81.auth.marketingcloudapis.com/v1/requestToken>
INFO Trying to authenticate using V1 endpoint
INFO Failed to auth using V1 endpoint
INFO Trying to authenticate using V2 endpoint
INFO Authentication URL is: <https://mctfgh9dtnh0swkcf4g62d18tr81.auth.marketingcloudapis.com>
INFO Failed to auth using V2 endpoint
CRITICAL Unable to validate App Keys(ClientID/ClientSecret) provided: {'error': 'invalid_client', 'error_description': 'Client authentication failed. Make sure that the client ID and client secret are valid.', 'error_uri': '<https://developer.salesforce.com/docs>'}. Please check your 'client_id', 'client_secret' or 'tenant_subdomain'.
Traceback (most recent call last):
  File "C:\Users\AndreaRadaelli\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\AndreaRadaelli\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\Scripts\tap-exacttarget.exe\__main__.py", line 7, in <module>
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\lib\site-packages\singer\utils.py", line 229, in wrapped
    return fnc(*args, **kwargs)
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\lib\site-packages\tap_exacttarget\__init__.py", line 168, in main
    do_discover(args)
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\lib\site-packages\tap_exacttarget\__init__.py", line 62, in do_discover
    auth_stub = get_auth_stub(config)
  File "C:\Users\AndreaRadaelli\Desktop\Development\Venvs\meltano_SFMC_BQ\Scripts\SFMC_BQ\.meltano\extractors\tap-exacttarget\venv\lib\site-packages\tap_exacttarget\client.py", line 82, in get_auth_stub
    raise Exception(message.format(str(e))) from None
Exception: Unable to validate App Keys(ClientID/ClientSecret) provided: {'error': 'invalid_client', 'error_description': 'Client authentication failed. Make sure that the client ID and client secret are valid.', 'error_uri': '<https://developer.salesforce.com/docs>'}. Please check your 'client_id', 'client_secret' or 'tenant_subdomain'.
• previous tap ```Catalog discovery failed: command ['C:\\Users\\AndreaRadaelli\\Desktop\\Development\\Venvs\\Benetton_SFMC\\Meltano_SFMC\\.meltano\\extractors\\tap-exacttarget\\venv\\Scripts\\tap-exacttarget.exe', '--config', 'C:\\Users\\AndreaRadaelli\\Desktop\\Development\\Venvs\\Benetton_SFMC\\Meltano_SFMC\\.meltano\\run\\tap-exacttarget\\tap.e5aec402-aa89-4115-af85-…
here are both yaml files: • current tap
Copy code
version: 1
default_environment: dev
project_id: 93992031-9344-407b-8670-b981ed78ed97
environments:
- name: dev
- name: staging
- name: prod
plugins:
  extractors:
  - name: tap-exacttarget
    variant: singer-io
    pip_url: tap-exacttarget
    config:
      batch_size: 10000
      tenant_subdomain: <>
      start_date: '2023-05-29T00:00:00Z'
• previous tap
Copy code
version: 1
default_environment: dev
project_id: d787519d-d01b-45da-b070-1026fd1d10c4
environments:
- name: dev
- name: staging
- name: prod
plugins:
  extractors:
  - name: tap-exacttarget
    variant: singer-io
    pip_url: tap-exacttarget
    config:
      batch_size: 10000
      tenant_subdomain: <>
      start_date: '2023-02-01T00:00:00Z'
    select:
    - 'event.*'