Skip to content

[source-google-sheets] 500 error - Cannot construct instance of io.airbyte.api.model.generated.CompleteOAuthResponse #58122

@stuartjohnpage

Description

@stuartjohnpage

Connector Name

google-sheets

Connector Version

0.9.4

What step the error happened?

Configuring a new connector

Relevant information

Step 1: Retrieve secretId from Oauth
Step 2: Attempt to create source using https://api.airbyte.com/v1/sources endpoint

It looks like something is going wrong on AirByte's end when trying to deserialize and fetch the client_id and client_secret in order to create the source.

Please let me know instead if I'm doing something wrong. This was working for a long time, and failed sometime in the last year - sorry that I can't be more specific.

This part is quite telling:

{\"message\":\"Cannot construct instance of io.airbyte.api.model.generated.CompleteOAuthResponse
(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String
value ('{\\\"request_succeeded\\\":true,\\\"auth_payload\\\":
{\\\"refresh_token\\\":\\\"1//refresh_token\\\",\\\"client_secret\\\":\\\"******\\\",\\\"client_id\\\":\\\"******\\\"}}')\\n ...

it looks like it's finding and using the data using the secretId, but can't do anything with it properly.

Relevant log output

[error] Request to create source on AirByte failed: {:ok, %HTTPoison.Response{status_code: 500, body: "{\"status\":500,\"type\":\"https://reference.airbyte.com/reference/errors\",\"title\":\"unexpected-problem\",\"detail\":\"An unexpected problem has occurred. If this is an error that needs to be addressed, please submit a pull request or github issue.\",\"documentationUrl\":null,\"data\":{\"message\":\"Cannot construct instance of `io.airbyte.api.model.generated.CompleteOAuthResponse` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('{\\\"request_succeeded\\\":true,\\\"auth_payload\\\":{\\\"refresh_token\\\":\\\"1//refresh_token\\\",\\\"client_secret\\\":\\\"******\\\",\\\"client_id\\\":\\\"******\\\"}}')\\n at [Source: UNKNOWN; byte offset: #UNKNOWN]\"}}", headers: [{"content-type", "application/json"}, {"date", "Thu, 17 Apr 2025 16:38:35 GMT"}, {"Content-Length", "766"}, {"Via", "1.1 google"}, {"X-Frame-Options", "SAMEORIGIN"}, {"X-XSS-Protection", "0"}, {"X-Content-Type-Options", "nosniff"}, {"Alt-Svc", "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000"}], request_url: "https://api.airbyte.com/v1/sources", request: %HTTPoison.Request{method: :post, url: "https://api.airbyte.com/v1/sources", headers: [{"Authorization", "Bearer my_bearer_token"}, {"Content-Type", "application/json"}, {"Accept", "application/json"}], body: "{\"configuration\":{\"credentials\":{\"auth_type\":\"Client\"},\"dataset_name\":\"my_dataset\",\"sourceType\":\"google-sheets\",\"spreadsheet_id\":\"https://docs.google.com/spreadsheets/my_spreadsheet/\"},\"name\":\"the_name\",\"secretId\":\"airbyte_oauth_workspace_***_v1\",\"workspaceId\":\"workspace_id\"}", params: %{}, options: [recv_timeout: 30000]}}}
[error] Retrying after 1000ms, attempt 0 received error: "Source creation failed with AirByte API"

What I think is happening

  1. I'm sending secretId: "airbyte_oauth_workspace_..._v1"
  2. Airbyte looks up that secret
  3. Airbyte itself previously stored that secret as a JSON string, not an object
  4. Now it tries to hydrate it into CompleteOAuthResponse and blows up

Contribute

  • Yes, I want to contribute

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions