airbyte icon indicating copy to clipboard operation
airbyte copied to clipboard

Source Square: Config Validation Error on connection setup

Open sabbiu opened this issue 2 years ago • 2 comments

Environment

  • Airbyte version: 0.40.29
  • OS Version / Instance: macOS
  • Deployment: Docker local
  • Source Connector and version: Square(0.2.0)
  • Destination Connector and version:
  • Step where error happened: Setup new connection

Current Behavior

I tried to create a new source for Square.

  • When I enter API key token, it throws an error saying Config Validation Error 'OAuth Credentials' was expected. image

  • And, when I enter OAuth key token, it throws an error saying Config Validation Error 'API Key' was expected image

Expected Behavior

Tell us what should happen. It should connect successfully without throwing an error.

Logs

Logs when I try to connect Square using API Key

2023-01-26 13:53:36 INFO i.a.w.t.TemporalAttemptExecution(get):136 - Docker volume job log path: /tmp/workspace/393a26d1-e5b7-46d2-9845-c4c0737b3233/0/logs.log
2023-01-26 13:53:36 INFO i.a.w.t.TemporalAttemptExecution(get):141 - Executing worker wrapper. Airbyte version: 0.40.29
2023-01-26 13:53:36 INFO i.a.a.c.AirbyteApiClient(retryWithJitter):172 - Attempt 0 to save workflow id for cancellation
2023-01-26 13:53:36 INFO i.a.c.i.LineGobbler(voidCall):114 - 
2023-01-26 13:53:36 INFO i.a.c.i.LineGobbler(voidCall):114 - ----- START CHECK -----
2023-01-26 13:53:36 INFO i.a.c.i.LineGobbler(voidCall):114 - 
2023-01-26 13:53:36 INFO i.a.c.i.LineGobbler(voidCall):114 - Checking if airbyte/source-square:0.2.0 exists...
2023-01-26 13:53:36 INFO i.a.c.i.LineGobbler(voidCall):114 - airbyte/source-square:0.2.0 was found locally.
2023-01-26 13:53:36 INFO i.a.w.p.DockerProcessFactory(create):123 - Creating docker container = source-square-check-393a26d1-e5b7-46d2-9845-c4c0737b3233-0-ozzrt with resources io.airbyte.config.ResourceRequirements@57f6f2d2[cpuRequest=,cpuLimit=,memoryRequest=,memoryLimit=]
2023-01-26 13:53:36 INFO i.a.w.p.DockerProcessFactory(create):168 - Preparing command: docker run --rm --init -i -w /data/393a26d1-e5b7-46d2-9845-c4c0737b3233/0 --log-driver none --name source-square-check-393a26d1-e5b7-46d2-9845-c4c0737b3233-0-ozzrt --network host -v airbyte_workspace:/data -v /tmp/airbyte_local:/local -e DEPLOYMENT_MODE=OSS -e USE_STREAM_CAPABLE_STATE=true -e FIELD_SELECTION_WORKSPACES= -e AIRBYTE_ROLE= -e WORKER_ENVIRONMENT=DOCKER -e APPLY_FIELD_SELECTION=false -e WORKER_JOB_ATTEMPT=0 -e WORKER_CONNECTOR_IMAGE=airbyte/source-square:0.2.0 -e AUTO_DETECT_SCHEMA=true -e AIRBYTE_VERSION=0.40.29 -e WORKER_JOB_ID=393a26d1-e5b7-46d2-9845-c4c0737b3233 airbyte/source-square:0.2.0 check --config source_config.json
2023-01-26 13:53:36 INFO i.a.w.i.VersionedAirbyteStreamFactory(create):102 - Reading messages from protocol version 0.2.0
2023-01-26 13:53:39 INFO i.a.w.g.DefaultCheckConnectionWorker(run):114 - Check connection job received output: io.airbyte.config.StandardCheckConnectionOutput@1ed7f551[status=failed,message=Config validation error: 'OAuth Credentials' was expected]
2023-01-26 13:53:39 INFO i.a.w.t.TemporalAttemptExecution(get):163 - Stopping cancellation check scheduling...
2023-01-26 13:53:39 INFO i.a.c.i.LineGobbler(voidCall):114 - 
2023-01-26 13:53:39 INFO i.a.c.i.LineGobbler(voidCall):114 - ----- END CHECK -----
2023-01-26 13:53:39 INFO i.a.c.i.LineGobbler(voidCall):114 - 

And, when I try to connect using OAuth Key Token

2023-01-26 13:51:58 INFO i.a.w.t.TemporalAttemptExecution(get):136 - Docker volume job log path: /tmp/workspace/545ad37b-96bc-4de5-a7dc-ab0a0c223606/0/logs.log
2023-01-26 13:51:58 INFO i.a.w.t.TemporalAttemptExecution(get):141 - Executing worker wrapper. Airbyte version: 0.40.29
2023-01-26 13:51:58 INFO i.a.a.c.AirbyteApiClient(retryWithJitter):172 - Attempt 0 to save workflow id for cancellation
2023-01-26 13:51:58 INFO i.a.c.i.LineGobbler(voidCall):114 - 
2023-01-26 13:51:58 INFO i.a.c.i.LineGobbler(voidCall):114 - ----- START CHECK -----
2023-01-26 13:51:58 INFO i.a.c.i.LineGobbler(voidCall):114 - 
2023-01-26 13:51:58 INFO i.a.c.i.LineGobbler(voidCall):114 - Checking if airbyte/source-square:0.2.0 exists...
2023-01-26 13:51:58 INFO i.a.c.i.LineGobbler(voidCall):114 - airbyte/source-square:0.2.0 was found locally.
2023-01-26 13:51:58 INFO i.a.w.p.DockerProcessFactory(create):123 - Creating docker container = source-square-check-545ad37b-96bc-4de5-a7dc-ab0a0c223606-0-qljud with resources io.airbyte.config.ResourceRequirements@57f6f2d2[cpuRequest=,cpuLimit=,memoryRequest=,memoryLimit=]
2023-01-26 13:51:58 INFO i.a.w.p.DockerProcessFactory(create):168 - Preparing command: docker run --rm --init -i -w /data/545ad37b-96bc-4de5-a7dc-ab0a0c223606/0 --log-driver none --name source-square-check-545ad37b-96bc-4de5-a7dc-ab0a0c223606-0-qljud --network host -v airbyte_workspace:/data -v /tmp/airbyte_local:/local -e DEPLOYMENT_MODE=OSS -e USE_STREAM_CAPABLE_STATE=true -e FIELD_SELECTION_WORKSPACES= -e AIRBYTE_ROLE= -e WORKER_ENVIRONMENT=DOCKER -e APPLY_FIELD_SELECTION=false -e WORKER_JOB_ATTEMPT=0 -e WORKER_CONNECTOR_IMAGE=airbyte/source-square:0.2.0 -e AUTO_DETECT_SCHEMA=true -e AIRBYTE_VERSION=0.40.29 -e WORKER_JOB_ID=545ad37b-96bc-4de5-a7dc-ab0a0c223606 airbyte/source-square:0.2.0 check --config source_config.json
2023-01-26 13:51:58 INFO i.a.w.i.VersionedAirbyteStreamFactory(create):102 - Reading messages from protocol version 0.2.0
2023-01-26 13:52:00 INFO i.a.w.g.DefaultCheckConnectionWorker(run):114 - Check connection job received output: io.airbyte.config.StandardCheckConnectionOutput@64af25db[status=failed,message=Config validation error: 'API Key' was expected]
2023-01-26 13:52:00 INFO i.a.w.t.TemporalAttemptExecution(get):163 - Stopping cancellation check scheduling...
2023-01-26 13:52:00 INFO i.a.c.i.LineGobbler(voidCall):114 - 
2023-01-26 13:52:00 INFO i.a.c.i.LineGobbler(voidCall):114 - ----- END CHECK -----
2023-01-26 13:52:00 INFO i.a.c.i.LineGobbler(voidCall):114 -

Steps to Reproduce

  1. Create a new source
  2. Choose Square
  3. Choose API key in dropdown
  4. Enter API key
  5. Click "Set up Source" button

Are you willing to submit a PR?

I am trying to figure out the issue. If I find something I'll definitely prefer to make a PR.

sabbiu avatar Jan 27 '23 01:01 sabbiu

The connections seems to be working fine in the airbyte version: v0.39.42-alpha

sabbiu avatar Jan 27 '23 02:01 sabbiu

Having exactly the same error when trying to authenticate using API Key.

wesley-ks avatar Jan 28 '23 00:01 wesley-ks

@natalyjazzviolin

I have created a PR (https://github.com/airbytehq/airbyte/pull/22125) for this issue. But there seems to be some issue while creating the source. It references the old spec.json file when create API is triggered.

Demo: https://youtu.be/Fw6XP8kdoOQ

sabbiu avatar Jan 31 '23 04:01 sabbiu

@sabbiu what happens when you try to run the integration tests locally? (we can continue the conversation over on your PR, if that's preferred as well)

sajarin avatar Jan 31 '23 19:01 sajarin

any update on this PR? Screen Shot 2023-03-23 at 8 46 53 AM

mattotodd avatar Mar 23 '23 12:03 mattotodd

This appears to have been fixed here https://github.com/airbytehq/airbyte/pull/25784 @justinbchau @marcosmarxm

topefolorunso avatar Oct 05 '23 23:10 topefolorunso