Amazon ADS source KeyError

Hey everyone.
I am trying to create an Amazon ADS source but I am receiving the following error:

image

Have anyone seen this error before?

Hello! Can you upload the complete server logs? You can download it from the settings page in the UI.
Could you also please share the Amazon Ads connector version you are using in Airbyte?

Here are the server logs:

server.log (78.4 KB)

I am currently using the version 0.1.8

Hey @bruno-azevedo-merama,
Do you mind restarting Airbyte (or at least the server), and re-running the check (or sending the full server logs) + resharing the logs? I can’t find this error in the logs you sent…
Could you also please check the network calls from your browser’s inspector and share the output of calls to check_connection

I can’t reproduce this bug on my side when I set up a new amazon ads source. Could you please share a screenshot of your connection setup too?

Here are the new logs:

server.log (22.9 KB)

check_connection output:

{

"status": "failed",

"message": "KeyError('amazon-advertising-api-scope')",

"jobInfo": {

    "id": "68e42cba-72f2-43f4-a2d7-8092edc7e4c9",

    "configType": "check_connection_source",

    "configId": "Optional[c6b0a29e-1da9-4512-9002-7bfd0cba2246]",

    "createdAt": 1651774357089,

    "endedAt": 1651774358621,

    "succeeded": true,

    "logs": {

        "logLines": [

            "2022-05-05 18:12:37 \u001B[32mINFO\u001B[m i.a.w.t.TemporalAttemptExecution(get):108 - Docker volume job log path: /tmp/workspace/d5907e99-9876-4c85-a336-78ab5da52f59/0/logs.log",

            "2022-05-05 18:12:37 \u001B[32mINFO\u001B[m i.a.w.t.TemporalAttemptExecution(get):113 - Executing worker wrapper. Airbyte version: 0.36.8-alpha",

            "2022-05-05 18:12:37 \u001B[32mINFO\u001B[m i.a.c.i.LineGobbler(voidCall):82 - Checking if airbyte/source-amazon-ads:0.1.8 exists...",

            "2022-05-05 18:12:37 \u001B[32mINFO\u001B[m i.a.w.p.DockerProcessFactory(create):107 - Creating docker job ID: d5907e99-9876-4c85-a336-78ab5da52f59",

            "2022-05-05 18:12:37 \u001B[32mINFO\u001B[m i.a.w.p.DockerProcessFactory(create):162 - Preparing command: docker run --rm --init -i -w /data/d5907e99-9876-4c85-a336-78ab5da52f59/0 --log-driver none --name source-amazon-ads-sync-d5907e99-9876-4c85-a336-78ab5da52f59-0-bxqzn --network host -v airbyte_workspace:/data -v /tmp/airbyte_local:/local -e WORKER_CONNECTOR_IMAGE=airbyte/source-amazon-ads:0.1.8 -e WORKER_JOB_ATTEMPT=0 -e WORKER_ENVIRONMENT=DOCKER -e AIRBYTE_ROLE= -e AIRBYTE_VERSION=0.36.8-alpha -e WORKER_JOB_ID=d5907e99-9876-4c85-a336-78ab5da52f59 airbyte/source-amazon-ads:0.1.8 check --config source_config.json",

            "2022-05-05 18:12:37 \u001B[32mINFO\u001B[m i.a.c.i.LineGobbler(voidCall):82 - airbyte/source-amazon-ads:0.1.8 was found locally.",

            "2022-05-05 18:12:38 \u001B[1;31mERROR\u001B[m i.a.w.p.a.DefaultAirbyteStreamFactory(internalLog):95 - Check failed",

            "2022-05-05 18:12:38 \u001B[32mINFO\u001B[m i.a.w.t.TemporalAttemptExecution(get):134 - Stopping cancellation check scheduling..."

        ]

    }

}

}

Screenshot of connection setup:

Seems like a missing parameter error. In the documentation, the “scope” parameter is mentioned but is not shown in the UI.

Could you please try to run this command on your docker host and share its output?

docker run --rm --init -i -w /data/d5907e99-9876-4c85-a336-78ab5da52f59/0 --log-driver none --name source-amazon-ads-sync-d5907e99-9876-4c85-a336-78ab5da52f59-0-bxqzn --network host -v airbyte_workspace:/data -v /tmp/airbyte_local:/local -e WORKER_CONNECTOR_IMAGE=airbyte/source-amazon-ads:0.1.8 -e WORKER_JOB_ATTEMPT=0 -e WORKER_ENVIRONMENT=DOCKER -e AIRBYTE_ROLE= -e AIRBYTE_VERSION=0.36.8-alpha -e WORKER_JOB_ID=d5907e99-9876-4c85-a336-78ab5da52f59 airbyte/source-amazon-ads:0.1.8 check --config source_config.json

Output:

{"type": "CONNECTION_STATUS", "connectionStatus": {"status": "FAILED", "message": "KeyError('amazon-advertising-api-scope')"}}

Could you please try to:

  • Delete your Amazon Ads source
  • Upgrade the connector to 0.1.9
  • Create a new Amazon Ads source and check if the error persists

If I can’t reproduce this bug I think this might be related to an API permission error on your side but the connector is not very good at explaining the root cause…
Can you consume Amazon Ads API with the same set of credentials using Postman or curl ?
If your error persists I will ask you to open an issue on our repo and share its link here.