any idea? i just want to run the frontend (base) m...
# help-connector-development
m
any idea? i just want to run the frontend (base) michael@michael:~/airbyte-platform/airbyte-webapp$ pnpm run generate-client
airbyte-webapp@0.50.5 generate-client /home/michael/airbyte-platform/airbyte-webapp
./scripts/load-declarative-schema.sh && orval
Found cached CDK manifest schema 0.43.0 🍻 Start orval v6.15.0 - A swagger client generator for typescript Running afterAllFilesWrite hook... Make options parameter mandatory in AirbyteClient.ts... Write type re-export file for AirbyteClient... 🎉 api - Your OpenAPI spec has been converted into ready to use orval! Running afterAllFilesWrite hook... Make options parameter mandatory in CloudApi.ts... Write type re-export file for CloudApi... 🎉 cloudApi - Your OpenAPI spec has been converted into ready to use orval! Running afterAllFilesWrite hook... Make options parameter mandatory in ConnectorBuilderClient.ts... Write type re-export file for ConnectorBuilderClient... 🎉 connectorBuilder - Your OpenAPI spec has been converted into ready to use orval! ⚠️ SyntaxError: Swagger schema validation failed. #/components/schemas/ConnectorManifest must be object #/components/schemas/ConnectorManifest must be object #/components/schemas/ConnectorManifest must match exactly one schema in oneOf 🛑 connectorManifest - TypeError: Cannot read properties of undefined (reading 'openapi')
k
A message from kapa.ai
It seems like you're having trouble running the frontend of Airbyte due to an issue with the ConnectorManifest schema. The error message suggests that the ConnectorManifest must be an object and it must match exactly one schema in oneOf. When working on the connector builder UI and doing changes to the CDK and the webapp at the same time, you can start the dev server with
CDK_MANIFEST_PATH
or
CDK_VERSION
environment variables set to have the correct Typescript types built. If
CDK_VERSION
is set, it's loading the specified version of the CDK from pypi instead of the default one, if
CDK_MANIFEST_PATH
is set, it's copying the schema file locally. For example:
Copy code
bash CDK_MANIFEST_PATH=../../airbyte/airbyte-cdk/python/airbyte_cdk/sources/declarative/declarative_component_schema.yaml pnpm start
This command will start the development server with the specified CDK manifest path. Make sure the path points to the correct schema file. If the issue persists, it might be a good idea to check the schema file for any inconsistencies or errors. The error message suggests that there might be an issue with the structure of the ConnectorManifest schema. Source: [Developing Locally](https://docs.airbyte.com/contributing-to-airbyte/developing-locally)
j
• Make sure you have the most recent dependencies installed (
pnpm install
) • Delete the `build`directory in the webapp folder and try again
m
thx for aswaring. still the same error
j
I just tried this locally with the most recent state of main and it runs through successfully for me
Could you • verify you have the most recent state of main (seems like you do already) • paste your node and pnpm version here (it's v18.15.0 and 7.29.0 for me)
Also, what OS are you using?
m
windows with wsl
i also try this cmd (base) michael@michael:~/airbyte-platform/airbyte-webapp$ CDK_MANIFEST_PATH=../../airbyte/airbyte-cdk/python/airbyte_cdk/sources/declarative/declarative_component_schema.yaml pnpm start
airbyte-webapp@0.50.5 prestart /home/michael/airbyte-platform/airbyte-webapp
TS_NODE_TRANSPILE_ONLY=true pnpm run generate-client
airbyte-webapp@0.50.5 generate-client /home/michael/airbyte-platform/airbyte-webapp
./scripts/load-declarative-schema.sh && orval
Copying local CDK manifest version from ../../airbyte/airbyte-cdk/python/airbyte_cdk/sources/declarative/declarative_component_schema.yaml 🍻 Start orval v6.15.0 - A swagger client generator for typescript Running afterAllFilesWrite hook... Make options parameter mandatory in AirbyteClient.ts... Write type re-export file for AirbyteClient... 🎉 api - Your OpenAPI spec has been converted into ready to use orval! Running afterAllFilesWrite hook... Make options parameter mandatory in CloudApi.ts... Write type re-export file for CloudApi... 🎉 cloudApi - Your OpenAPI spec has been converted into ready to use orval! Running afterAllFilesWrite hook... Make options parameter mandatory in ConnectorBuilderClient.ts... Write type re-export file for ConnectorBuilderClient... 🎉 connectorBuilder - Your OpenAPI spec has been converted into ready to use orval! Running afterAllFilesWrite hook... Make options parameter mandatory in ConnectorManifest.ts... Write type re-export file for ConnectorManifest... 🎉 connectorManifest - Your OpenAPI spec has been converted into ready to use orval!
airbyte-webapp@0.50.5 start /home/michael/airbyte-platform/airbyte-webapp
vite
🔨 Use build hash -dev- ✘ [ERROR] Unterminated string literal src/components/connectorBuilder/cdk.ts234: 2 │ export const CDK_VERSION = "0.43.0 ╵ ^ at failureErrorWithLog (/home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js163615) at /home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js104825 at runOnEndCallbacks (/home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js147145) at buildResponseToResult (/home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js10467) at /home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js10589 at new Promise (<anonymous>) at requestCallbacks.on-end (/home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js105754) at handleRequest (/home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js72319) at handleIncomingPacket (/home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js7457) at Socket.readFromStdout (/home/michael/airbyte-platform/airbyte-webapp/node_modules/.pnpm/esbuild@0.17.12/node_modules/esbuild/lib/main.js6737) [Stylelint] Found 0 error and 0 warning ERROR(TypeScript) Unterminated string literal. FILE /home/michael/airbyte-platform/airbyte-webapp/src/components/connectorBuilder/cdk.ts235 1 | // generated, do not change manually > 2 | export const CDK_VERSION = "0.43.0 | ^ 3 | "; 4 | ERROR(TypeScript) Unterminated string literal. FILE /home/michael/airbyte-platform/airbyte-webapp/src/components/connectorBuilder/cdk.ts33 1 | // generated, do not change manually 2 | export const CDK_VERSION = "0.43.0 > 3 | "; | ^ 4 | [TypeScript] Found 2 errors. Watching for file changes.
im not sure what the diffrent but i see another err
j
cdk.ts is written by the load-declarative-schema.sh script
It seems like your wsl environment is doing things slightly different
Could you try removing the trailing newline in
airbyte-connector-builder-resources/CDK_VERSION
?
Just to get you unblocked
m
i did it but after i run the script , it back again to be
any chance it regenerate the code? or something
j
i did it but after i run the script , it back again to be
what do you mean?
m
i chnged the file
after i run (base) michael@michael:~/airbyte-platform/airbyte-webapp$ CDK_MANIFEST_PATH=../../airbyte/airbyte-cdk/python/airbyte_cdk/sources/declarative/declarative_component_schema.yaml pnpm start
it back
j
Change
airbyte-connector-builder-resources/CDK_VERSION
not cdk.ts
m
here?
Copy code
#! /bin/sh
# This script makes sure the json schema for the low code connector manifest is provided for orval to build the Typescript types
# used by the connector builder UI. It either downloads a released version from PyPI or copies it over from a specified file path.

set -e
mkdir -p build

DEFAULT_CDK_VERSION=`cat ../airbyte-connector-builder-resources/CDK_VERSION`

if [ -z "$CDK_VERSION" ]
then
    CDK_VERSION=$DEFAULT_CDK_VERSION
fi

# Export as Typescript module so the version is available in the webapp during compile time and run time.
printf "// generated, do not change manually\nexport const CDK_VERSION = \"$CDK_VERSION\";\n" > src/components/connectorBuilder/cdk.ts

if [ -z "$CDK_MANIFEST_PATH" ]
then
    TARGET_FILE="build/declarative_component_schema-${CDK_VERSION}.yaml"
    if [ ! -f "$TARGET_FILE" ]; then
        echo "Downloading CDK manifest schema $CDK_VERSION from pypi"
        curl -L <https://pypi.python.org/packages/source/a/airbyte-cdk/airbyte-cdk-${CDK_VERSION}.tar.gz> | tar -xzO airbyte-cdk-${CDK_VERSION}/airbyte_cdk/sources/declarative/declarative_component_schema.yaml > ${TARGET_FILE}
    else
        echo "Found cached CDK manifest schema $CDK_VERSION"
    fi
    cp ${TARGET_FILE} build/declarative_component_schema.yaml
else
    echo "Copying local CDK manifest version from $CDK_MANIFEST_PATH"
    cp ${CDK_MANIFEST_PATH} build/declarative_component_schema.yaml
fi
j
That's not what I meant, but yeah you could hardcode it there as well. See the printf statement halfway through
just replace $CDK_VERSION with 0.43.0
m
coool it run but when i try to connect with chrome. i cant
image.png
j
That's normal, it's using a local certificate
just accept
m
mmm how?
how to accept?
image.png
my sever run in docker
image.png
image.png
j
Looks good to me
m
i cant connect with the script
this connection only when i connect to the docker
not from my building code
image.png
j
I don't know what WSL is doing under the hood, it's nothing we officially support.
m
u support linux and wondows?
?
i mean the airbyte
image.png
also look auth bug
cuz it trying connect to server, i see the logs
ok it run for me thanks alot!!!!!!!!
i let it run without auth!!!!!!!😇
BASIC_AUTH_USERNAME="" BASIC_AUTH_PASSWORD="" docker compose up
is it posible to run on windows?