
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
- deno 2 Cloud random errors
we have big problems with the functions. although we do not change anything in the function, we have the following random behaviour: - no scope permissions erro...
- Functions not work on Server only Localh...
Hi, I successfully upgraded from 1.4 to 1.7, but I'm having a problem. The functions no longer work with the settings I had. I assume some changes were made. It...
- Console Login after upgrade
Hi, running a small instance self hosted, upgraded from 1.6.0 to 1.74 this morning before spotting the migration guide... When trying to login to the console n...
