Helloo anyone here extracting from fb ads? Is ther...
# troubleshooting
a
Helloo anyone here extracting from fb ads? Is there a guide on which Token is needed? I've tried my access token and account ID but it's not working
seems like i need to upgrade the SDK?
a
I don't use the tap but you should be able to specify your API version in the config: https://hub.meltano.com/extractors/tap-facebook#api_version-setting
The SDK is raising the error, but no upgrade needed.
a
I tried setting the api_version to v17.0, but i got diff error now
p
@akmal could you run the tap using
meltano --log-level=debug tap-facebook
to get more info on that error? I see this issue that I suspect is related https://github.com/MeltanoLabs/tap-facebook/issues/90
also can you run
meltano config tap-facebook
to print your expected config and share it here with your credentials removed
a
Hey @pat_nadolny, here's the traceback of the error ```Traceback (most recent call last): File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/core.py", line 1166, in sync for _ in self._sync_records(context=context): File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/core.py", line 1061, in _sync_records for record_result in self.get_records(current_context): File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/rest.py", line 574, in get_records for record in self.request_records(context): File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/rest.py", line 395, in request_records resp = decorated_request(prepared_request, context) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/backoff/_sync.py", line 105, in retry ret = target(*args, **kwargs) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/rest.py", line 274, in _request self.validate_response(response) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/tap_facebook/client.py", line 153, in validate_response raise FatalAPIError(msg) singer_sdk.exceptions.FatalAPIError: 400 Client Error: b'{"error":{"message":"(#12) Since we have ODAX enforcement from v17, this field is useless and should always be assumed true is deprecated for versions v17.0 and higher","type":"OAuthException","code":12,"fbtrace_id":"AzatFQb1xy081BM4_4Pt_nt"}}' (Reason: Bad Request) for path: /v17.0/me/adaccounts Traceback (most recent call last): File "/meltano_project/.meltano/extractors/tap-facebook/venv/bin/tap-facebook", line 8, in <module> sys.exit(TapFacebook.cli()) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/click/core.py", line 1157, in call return self.main(*args, **kwargs) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/tap_base.py", line 492, in invoke tap.sync_all() File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/tap_base.py", line 450, in sync_all stream.sync() File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/core.py", line 1173, in sync raise ex File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/core.py", line 1166, in sync for _ in self._sync_records(context=context): File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/core.py", line 1061, in _sync_records for record_result in self.get_records(current_context): File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/rest.py", line 574, in get_records for record in self.request_records(context): File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/singer_sdk/streams/rest.py", line 395, in request_records resp = decorated_request(prepared_request, context) File "/meltano_project/.meltano/extractors/tap-facebook/venv/lib/python3.9/site-packages/backoff/_sync.py", line 105, in retry ret = t…
here's the config
Copy code
{
  "access_token": "",
  "account_id": "",
  "api_version": "v17.0",
  "start_date": "2023-08-10"
}
p
cc @neil_gorman is this an error you've seen before? Any ideas what might be causing it?
@akmal I wonder if you deselect
has_advertiser_opted_in_odax
from the adaccounts stream. It seems like that error message is saying that you arent allowed to request a certain field anymore and that one is odax related.
Copy code
- name: tap-facebook
    variant: meltanolabs
    pip_url: git+<https://github.com/MeltanoLabs/tap-facebook.git>
    select:
    - '*.*'
    - '!adaccounts.has_advertiser_opted_in_odax'
a
Ohhh i completely forgot about
select
. Yeah that works, thanks so much @pat_nadolny!