|
| 1 | +--- |
| 2 | +title: Google Drive schema validation failure |
| 3 | +--- |
| 4 | + |
| 5 | +## Issue |
| 6 | + |
| 7 | +When you save and test a Google Drive source connector, you get an error that contains text similar to the following: |
| 8 | + |
| 9 | +```text |
| 10 | +Schema validation failure for GoogleDriveConnectionConfig: |
| 11 | +Value error, Expecting value: line 1 column 1 (char 0) at |
| 12 | +access_config,service_account_key got -----BEGIN PRIVATE KEY----- |
| 13 | +... |
| 14 | +``` |
| 15 | + |
| 16 | +Although you can finish creating and saving this connector, the connection test fails, and you cannot successfully run any |
| 17 | +workflows that use this failed connector. |
| 18 | + |
| 19 | +## Cause |
| 20 | + |
| 21 | +You have configured the Google Drive source connector with the Google Drive service account's key in an incorrect format. |
| 22 | +You likely have specified only a portion of the file, such as just the private key part. Unstructured expects the entire contents |
| 23 | +of the Google Drive service account's key file. |
| 24 | + |
| 25 | +## Solution |
| 26 | + |
| 27 | +1. Find the original Google Drive service account's key file in JSON format, which you downloaded earlier from your Google Cloud account when |
| 28 | + you originally created the Google Drive source connector. |
| 29 | +2. Open the file in a text editor such as Notepad, Visual Studio Code, or TextEdit. |
| 30 | +3. Copy everything in the file, starting from the first opening brace `{` to the final closing brace `}`. |
| 31 | +4. In the original Google Drive source connector's settings, delete the original contents of the **Service Account Key** field, and paste |
| 32 | + the complete JSON content that you just copied. |
| 33 | +5. Save the changes and re-test and re-save the connector. |
| 34 | + |
| 35 | +## Additional resources |
| 36 | + |
| 37 | +- If the connector test still fails, try using a tool such as `tr` for macOS or Linux, or PowerShell for Windows, to copy |
| 38 | + the entire contents of the file, instead of a text editor, as follows: |
| 39 | + |
| 40 | + - For macOS or Linux: |
| 41 | + |
| 42 | + ```text |
| 43 | + tr -d '\n' < <path-to-downloaded-key-file> |
| 44 | + ``` |
| 45 | + |
| 46 | + - For Windows: |
| 47 | + |
| 48 | + ```text |
| 49 | + (Get-Content -Path "<path-to-downloaded-key-file>" -Raw).Replace("`r`n", "").Replace("`n", "") |
| 50 | + ``` |
| 51 | + |
| 52 | +- To ask questions or get additional help with this issue, see [requesting support](/support/request). |
0 commit comments