Back

Github 404 after authorizing app

  • 0
  • Functions
SenZi
1 Sep, 2023, 00:31

also webhook secret is set

TL;DR
Issue: User is experiencing a 404 error on GitHub after authorizing an app. Solution: The issue was due to the `_APP_VCS_GITHUB_PRIVATE_KEY=` needing the entire contents of the private-key.pem file, including the new line and double quotes. Once this was corrected, the issue was resolved.
SenZi
1 Sep, 2023, 00:32
Drake
1 Sep, 2023, 00:40

and you checked the Redirect on update box under the Post installation section?

SenZi
1 Sep, 2023, 00:45

ohh it was checked, i unchecked it and now it doesn't redirect or anything anymore. it shows "app was updated for account" in github but in the console it still shows github and clicking it brings me to the github app page

SenZi
1 Sep, 2023, 00:45

its the same if i select a repository or all repositories

Drake
1 Sep, 2023, 00:51

It should be checked

SenZi
1 Sep, 2023, 00:51

but leave the setup url empty?

Drake
1 Sep, 2023, 00:52

What URL?

SenZi
1 Sep, 2023, 00:54
SenZi
1 Sep, 2023, 00:54

this setup url

Drake
1 Sep, 2023, 00:58

Blank.

Drake
1 Sep, 2023, 00:59

Was it blank before?

SenZi
1 Sep, 2023, 01:00

yes it was but the redirect on update was checked, that was when it used to redirect to the 404 github page

QuadWord
1 Sep, 2023, 16:02

I have the same issue. Documentation says: "Check the Redirect on update box under the Post installation section."

If i do this then Github tries to redirect after successful installation to: https://[Domain]/console/project-[Project-ID]/functions?from=github&to=cover but fails and finally shows the 404 URL SenZi was posting.

which has nothing to do with the callback links defined a bit higher.

It fails with 404 to redirect back.

Drake
1 Sep, 2023, 16:02

under this, there's a "Request user authorization..." checkbox. would you please check that and try again?

also, you set the permissions as such right: https://appwrite.io/docs/configuration#repository-permission

Drake
1 Sep, 2023, 16:03

@khushbooverma any idea why a user would be redirected to this?

SenZi
1 Sep, 2023, 16:07

yes the permissions are set exactly as mentioned

Drake
1 Sep, 2023, 16:07

@SenZi make sure to do this

QuadWord
1 Sep, 2023, 16:14

I checked the "Request authorisation ...".

Now there is a redirect and it shows the wollowing on the Appwrite side:

Error 500 Signing key cannot be empty Type general_unknown

but it is now using the first callback link: http://[HOSTNAME_OR_IP]/v1/vcs/github/callback

SenZi
1 Sep, 2023, 16:20

Logs

SenZi
1 Sep, 2023, 16:28

Sorry this log was just when i refreshed the same url.

SenZi
1 Sep, 2023, 16:28

This is the log i get when i get redirected to appwrite instance from github

SenZi
1 Sep, 2023, 21:56

Issue Solved! _APP_VCS_GITHUB_PRIVATE_KEY= needed the entire contents in the private-key.pem file, including the new line and double quotes. https://discord.com/channels/564160730845151244/1147235730599460915/1147283157251538954

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more