
Hello all,
- I created a Github app (following the doc here https://appwrite.io/docs/configuration#git)
- Then adding all vars in
.env
then relaunch server with docker - I go to "Function", "Connect Git repository", "GitHub"
- App is installed & ensured to click on "Only select repositories" then "All repositories" then "Save" to ensure access are good
- I click on "Create function", from Quick Start I select "Node.js" for ex.
- I click on Next for all step then "Create a new repository"
- I click on "GitHub" & I see error 500 (sometimes I see the same screen: Repository Access, I do the same trick as previously)
What can I do ? Thanks 🙂

Apparently I had a 401 error...

{"message":"Invalid webhook signature.","code":401,"type":"general_access_forbidden","version":"1.4.1"}

please set the webhook secret in appwrite and github

I generated a random string, set on Github & set _APP_VCS_GITHUB_WEBHOOK_SECRET
too :/

did you run docker compose up -d
to apply the changes?

Yep !

I verified with `docker-compose exec appwrite vars``

Tried to change webhook secret but not working too ...

It seems some requests works now but I see error 500 again ...

maybe network problem. maybe permissions problem with the github app

Hum I got something helpful, in the URL of my appwrite instance I got this after install github app:
https://my.server.com/console/project-test/functions?from=github&to=cover&error=%7B%22message%22%3A%22Failed+to+obtain+access+token.+The+GitHub+OAuth2+provider+returned+an+error%3A+Not+Found%22%2C%22type%22%3A%22user_oauth2_provider_error%22%2C%22code%22%3A404%7D#

I'm sure about permissions, I checked it again and it's OK 🙂

double check the callback urls in github. they need to be the same order as in the docs. then ninstall the github app from your account and go through the flow again

Ah ok ! It's not on the same order !

I will try thanks 🙂

It works 🎉 Thank you for your (very quick) help !

[SOLVED] Error 500 when creating a function with Github
Recommended threads
- Runtime secret not found. Please re-crea...
Functions aren't working for my project suddenly, They worked fine for the past few weeks and were also working 15-20 minutes ago.
- Local function cant access itself for li...
I use appwrite cloud, but before uploading, i want to work locally. in my local machine (windows 11) i have a running appwrite. I created a new appwrite func...
- ID.unique() is not creating unique ID in...
The Error is at line 65. See image. A Transaction should be created but it fails. Errors: Document with the requested ID already exists. Try again with a diff...
