
Having a bit of an issue configuring my Github App for functions in my self-hosted instance. I've checked the app configuration (callbacks, permissions, etc) and everything seems to be in order.
Relevant env variables (obviously simplified)
- _APP_DOMAIN=my.domain.com
- _APP_DOMAIN_FUNCTIONS=my.domain.com
- _APP_DOMAIN_TARGET=my.domain.com
- _APP_FUNCTIONS_SIZE_LIMIT=30000000
- _APP_FUNCTIONS_TIMEOUT=900
- _APP_FUNCTIONS_BUILD_TIMEOUT=900
- _APP_FUNCTIONS_CONTAINERS=
- _APP_FUNCTIONS_CPUS=0
- _APP_FUNCTIONS_MEMORY=0
- _APP_FUNCTIONS_MEMORY_SWAP=
- _APP_FUNCTIONS_RUNTIMES=node-16.0,php-8.0,python-3.9,ruby-3.0,dart-3.0
- _APP_EXECUTOR_SECRET=my-secret
- _APP_EXECUTOR_HOST=http://appwrite-executor/v1
- _APP_EXECUTOR_RUNTIME_NETWORK=
- _APP_FUNCTIONS_ENVS=
- _APP_FUNCTIONS_INACTIVE_THRESHOLD=
- OPEN_RUNTIMES_NETWORK=
- _APP_FUNCTIONS_RUNTIMES_NETWORK=
- _APP_FUNCTIONS_MAINTENANCE_INTERVAL=
- _APP_VCS_GITHUB_APP_NAME=my-appwrite-app
- _APP_VCS_GITHUB_PRIVATE_KEY=-----BEGIN RSA PRIVATE KEY-----\n...8LHNx6PA==\n-----END RSA PRIVATE KEY-----
- _APP_VCS_GITHUB_APP_ID=685648
- _APP_VCS_GITHUB_CLIENT_ID=Iv1.8637b081cde7d136
- _APP_VCS_GITHUB_CLIENT_SECRET=d353e36...620
- _APP_VCS_GITHUB_WEBHOOK_SECRET=QxqzUv...vzS
Logs from appwrite:
2023-12-10T10:02:49.409190414Z [Error] Timestamp: 2023-12-10T10:02:49+00:00
2023-12-10T10:02:49.409267174Z [Error] Method: GET
2023-12-10T10:02:49.409271254Z [Error] URL: /v1/account/sessions/oauth2/:provider/redirect
2023-12-10T10:02:49.409274214Z [Error] Type: Appwrite\Extend\Exception
2023-12-10T10:02:49.409277054Z [Error] Message: Failed to obtain access token. The GitHub OAuth2 provider returned an error: Not Found
2023-12-10T10:02:49.409280094Z [Error] File: /usr/src/code/app/controllers/api/account.php
2023-12-10T10:02:49.409282854Z [Error] Line: 489

Solution here. The callback url fields are buggy even though everything was correct, I had to delete both callbacks, reload and add them again 🤦♂️ There should be a notice of this on that section so that devs don't end up going bald from all the hair pulling. https://discord.com/channels/564160730845151244/1172239299081666682/1172757175228186694

[Solved] Github App configuration not working
Recommended threads
- Logs do not work when debugging openrunt...
Hey there. Trying to debug some openruntimes functions locally. I manage to run the server and make requests to it, but for some reason the logger is not printi...
- Adjusting Node Heap limit on Appwrite Si...
I am running into a build issue with Appwrite Sites. I'm trying to build and deploy one of my Nuxt applications, and I am getting a failed deploy every time. Th...
- Issue: Incorrect input type for cron sch...
Description: The input field for setting the function schedule is of type email, which prevents entering a valid cron expression. Error Message: Please include...
