Hi folks, I'm having trouble getting started. I am...
# getting-started
c
Hi folks, I'm having trouble getting started. I am trying to hook up to salesforce through the UI and I am getting an error with no details when I test the connection. Can anyone point me in the right direction?
a
Hi, @cory_hurst. Can you try running
meltano --log-level=debug config tap-salesforce test
in a command line (docs here)? That may surface additional information to help in debugging.
Most often these failures are caused by connection/credential issues but hopefully we can get you a more clear error message.
(Also, I'm not sure if this is affecting you or not, but occasionally refreshing the UI can help surface logs which otherwise aren't getting loaded. May be worth a shot in addition to the above.)
c
@aaronsteers So, its telling me I have an incomplete configuration file. I tried to set it up with uname and password auth with a security token. Then I was going to try to create a connected app. I don't know what callback url I should use for OAuth connection especially if I am going to be developing locally and then pushing that code to airflow etc.
So, I did create an app with a dummy url to get client_id and secret. I entered them into the config ui, still the same error. Here is what I get when I test the connection: 'Opps! Somethign went wrong!' result of running the command you indicated:
Copy code
The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/miniconda3/envs/meltano/lib/python3.6/site-packages/meltano/cli/__init__.py", line 52, in main
    raise CliError(str(err)) from err
meltano.cli.utils.CliError: Plugin configuration is invalid
Catalog discovery failed: command ['/Users/coryhurst/PycharmProjects/meltano/convertiv-salesforce/.meltano/extractors/tap-salesforce/venv/bin/tap-salesforce', '--config', '/Users/coryhurst/PycharmProjects/meltano/convertiv-salesforce/.meltano/run/tap-salesforce/tap.5d0789bf-fee3-4f22-9363-f82178f1828a.config.json', '--discover'] returned 1
Plugin configuration is invalid
Catalog discovery failed: command ['/Users/coryhurst/PycharmProjects/meltano/convertiv-salesforce/.meltano/extractors/tap-salesforce/venv/bin/tap-salesforce', '--config', '/Users/coryhurst/PycharmProjects/meltano/convertiv-salesforce/.meltano/run/tap-salesforce/tap.5d0789bf-fee3-4f22-9363-f82178f1828a.config.json', '--discover'] returned 1
(meltano) coryhurst@ip-192-1
How do I know what redirect url to use?
a
I don't know personally, sorry. I just know there are multiple ways of authenticating and sometimes it's a bit confusing which auth works for which flows.
p
@cory_hurst you can try running
meltano invoke --dump config tap-salesforce
to see if your config.json file looks as expected
you can compare it against the example in here https://gitlab.com/meltano/tap-salesforce
a
You should also be able to use example.com as a callback URL even locally
I don't think that's the issue, but just in case it's bothered by you not having one that should work
c
so, I just looked in that directory and the file that it references as being invalid an that file doesn't seem to exist in that directory.
p
yeah agreed - I think you might just have an issue with the configuration right now
c
there are 6 in there with data, but not the one it seems to be referencing in the test command.
p
that file gets generated on the fly then deleted but if you run the
dump
command I sent above you can get it output in your terminal
c
ok
is this how it is supposed to look?
Copy code
{
  "client_id": "3MVGXR",
  "client_secret": "1A06759",
  "refresh_token": "6C",
  "start_date": "2021-01-04",
  "is_sandbox": false,
  "api_type": "REST",
  "select_fields_by_default": false,
  "state_message_threshold": 1000,
  "max_workers": 8
}
I am not sure that refresh token is valid. I don;t know how to get one I was attempting to use the "initial access token"
and I think I should be using "enable device flow" right? If I am not on a UI?
which says in some docs somewhere that it doesn't require a redirect url
I did this a long time ago so im trying to refresh my memory on how we did it
and yeah that config.json looks fine to me as long as those secrets were populated. Seems like you just need to validate your credentials
I always like to validate that I can make a connection using new credentials with something like postman. Once youre confident those credentials work and you have a good refresh token you can give it another shot in meltano
c
Ok. I guess the refresh token is the thing I am missing. I have never really messed with oauth before. Its time. Thanks for the help and happy Friday.
p
yeah its a pain sometimes - good luck!