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

Facebook Marketing API failing asking for upgrade to v15 #18167

Closed
louismorinkar opened this issue Oct 19, 2022 · 16 comments · Fixed by #18467
Closed

Facebook Marketing API failing asking for upgrade to v15 #18167

louismorinkar opened this issue Oct 19, 2022 · 16 comments · Fixed by #18467

Comments

@louismorinkar
Copy link

Environment

  • Airbyte version: 0.40.3
  • OS Version / Instance: GCP n2
  • Deployment: Docker
  • Source Connector and version: Facebook Marketing 0.2.69
  • Destination Connector and version:
  • Step where error happened: Setup new connection

Current Behavior

The connection tests failed, with an error message "FacebookAPIException: You are calling a deprecated version of the Ads API. Please update to the latest version: v15.0.')"

Expected Behavior

The connection tests should succeed

Logs

server-logs.txt
scheduler-logs.txt

Steps to Reproduce

  1. Create a connector with Facebook Marketing
  2. Test the connection

Are you willing to submit a PR?

No

@YowanR
Copy link
Contributor

YowanR commented Oct 19, 2022

@YuliiaNahoha Can you please take a look at this ASAP? Thanks! 🙏

@grubberr
Copy link
Contributor

@louismorinkar I don't understand where I can see this error message
FacebookAPIException: You are calling a deprecated version of the Ads API. Please update to the latest version: v15.0.
I downloaded both logs: server-logs.txt, scheduler-logs.txt
I did not see such error message in both log files

@louismorinkar
Copy link
Author

Hi, the message is shown in the UI :
The connection tests failed

@grubberr
Copy link
Contributor

@louismorinkar can you please put here a log of failed "check" command
You need to press [Set up source] and get logs from UI

@louismorinkar
Copy link
Author

I don't understand why the logs can't be found in the scheduler / server logs but here are the logs :

7:07PM 05/22
2022-10-20 07:27:25 INFO i.a.w.t.TemporalAttemptExecution(get):105 - Docker volume job log path: /tmp/workspace/90eac019-f747-4435-bf63-4b065557b452/0/logs.log
2022-10-20 07:27:25 INFO i.a.w.t.TemporalAttemptExecution(get):110 - Executing worker wrapper. Airbyte version: 0.40.3
2022-10-20 07:27:25 INFO i.a.c.f.EnvVariableFeatureFlags(getEnvOrDefault):49 - Using default value for environment variable USE_STREAM_CAPABLE_STATE: 'false'
2022-10-20 07:27:25 INFO i.a.c.i.LineGobbler(voidCall):83 - Checking if airbyte/source-facebook-marketing:0.2.69 exists...
2022-10-20 07:27:25 INFO i.a.w.p.DockerProcessFactory(create):108 - Creating docker job ID: 90eac019-f747-4435-bf63-4b065557b452
2022-10-20 07:27:25 INFO i.a.w.p.DockerProcessFactory(create):163 - Preparing command: docker run --rm --init -i -w /data/90eac019-f747-4435-bf63-4b065557b452/0 --log-driver none --name source-facebook-marketing-check-90eac019-f747-4435-bf63-4b065557b452-0-ootie --network host -v airbyte_workspace:/data -v /tmp/airbyte_local:/local -e DEPLOYMENT_MODE=OSS -e USE_STREAM_CAPABLE_STATE=false -e AIRBYTE_ROLE= -e WORKER_ENVIRONMENT=DOCKER -e WORKER_JOB_ATTEMPT=0 -e WORKER_CONNECTOR_IMAGE=airbyte/source-facebook-marketing:0.2.69 -e AIRBYTE_VERSION=0.40.3 -e WORKER_JOB_ID=90eac019-f747-4435-bf63-4b065557b452 airbyte/source-facebook-marketing:0.2.69 check --config source_config.json
2022-10-20 07:27:25 INFO i.a.c.i.LineGobbler(voidCall):83 - airbyte/source-facebook-marketing:0.2.69 was found locally.
2022-10-20 07:27:27 ERROR i.a.w.i.DefaultAirbyteStreamFactory(internalLog):95 - Giving up call(...) after 1 tries (facebook_business.exceptions.FacebookRequestError: 
  Message: Call was not successful
  Method:  GET
  Path:    https://graph.facebook.com/v14.0/act_1379063265742873/
  Params:  {}
  Status:  400
  Response:
    {
      "error": {
        "message": "(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v15.0.",
        "type": "OAuthException",
        "code": 2635,
        ```

@grubberr
Copy link
Contributor

@louismorinkar

I suspect that problem can be in Facebook application settings
Can you look on your facebook application settings like:

https://developers.facebook.com/ -> Settings -> Advanced -> Upgrade API version

maybe we will find something interesting here ?

@louismorinkar
Copy link
Author

@grubberr I can see that the version is indeed written here :
image
But I cannot change it to a lower version like v14

@YuliiaNahoha YuliiaNahoha assigned grubberr and unassigned davydov-d Oct 20, 2022
@grubberr
Copy link
Contributor

grubberr commented Oct 20, 2022

@louismorinkar @YowanR
it looks like you someway restricted your facebook application to use only API v15.
One option to re-create facebook application with lower API version.
I am not sure if we will migrate to API v15 pretty fast.

@sh4sh sh4sh added area/connectors Connector related issues connectors/source/facebook-marketing and removed needs-triage team/tse Technical Support Engineers autoteam labels Oct 20, 2022
@yoanyahemdi
Copy link

Hello @grubberr
It is not possible to downgrade to lower version on Facebook App, even though by creating a new app from scratch.
It only offers v15.

@BrianGiraldo
Copy link

Facebook only enables applications that have consumed older versions of the API to use them, as yoanyahemdi indicates, new applications are limited to using the latest version of the published API.

It would be great to be able to choose the API version in the Airbyte interface when configuring the feed.

@grubberr
Copy link
Contributor

@YowanR
it looks like this is problem only for new open-source customers.
Probably we need to schedule some time to rewrite this connector on Facebook API v15 in future.

@girarda
Copy link
Contributor

girarda commented Oct 24, 2022

@YowanR FYI: the SDK for Facebook API v15 isn't available yet. Latest one is still v14.0 https://pypi.org/project/facebook-business/

@BrianGiraldo
Copy link

@YowanR FYI: the SDK for Facebook API v15 isn't available yet. Latest one is still v14.0 https://pypi.org/project/facebook-business/

v15.0.0 is available now

@girarda
Copy link
Contributor

girarda commented Oct 27, 2022

@louismorinkar can you try again with Facebook Marketing 0.2.70? We upgrade it uses v15.0 of the Facebook Marketing API

@lazebnyi lazebnyi assigned girarda and unassigned grubberr Nov 1, 2022
@girarda
Copy link
Contributor

girarda commented Nov 4, 2022

Closing because it's been fixed in 0.2.70.

@girarda girarda closed this as completed Nov 4, 2022
@louismorinkar
Copy link
Author

Thanks !

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

Successfully merging a pull request may close this issue.

9 participants