Back

[SOLVED] Error 500 Cannot assign null to property Utopia\VCS\Adapter\Git\GitHub::$accessToken

  • 0
  • General
Nour
3 Oct, 2023, 07:23

I send it to you.

TL;DR
Title: [SOLVED] Error 500 Cannot assign null to property Utopia\VCS\Adapter\Git\GitHub::$accessToken Summary: The user experienced an Error 500 related to assigning null to a property called `$accessToken` in the GitHub adapter. After some troubleshooting, it was discovered that the system time was slightly ahead, causing the issue. Adjusting the time resolved the problem. Solution: Adjust the system time to match the correct time.
Drake
3 Oct, 2023, 14:38

Hmm looks okay.

Maybe the client secret is incorrect though?

Drake
3 Oct, 2023, 14:42

Does docker compose exec appwrite vars match your env file?

Nour
4 Oct, 2023, 12:16

Yes, it does

Nour
4 Oct, 2023, 12:19

I tried to add incorrect client secret key and it showed me the next error:

Nour
4 Oct, 2023, 12:20
Nour
4 Oct, 2023, 12:21

So, I think the problem is other stuff

Drake
5 Oct, 2023, 01:28

any chance you can modify the source code to try and dump more info? You would need to

  1. run docker compose exec appwrite vi /usr/src/code/vendor/utopia-php/vcs/src/VCS/Adapter/Git/GitHub.php
  2. go to line 294
  3. add var_dump($res['body']);
  4. save and quit vi
  5. run docker compose restart appwrite to apply the changes

Then, test again. The logs should then dump the response from GitHub and maybe it will give more info as to why the token response from GitHub is null

Nour
5 Oct, 2023, 06:01

Ok, I completed the previous steps and the result is as follows:

Nour
5 Oct, 2023, 06:02
Nour
5 Oct, 2023, 06:02
Nour
5 Oct, 2023, 06:18

After this, I tried to search for these logs, and I asked the AI chat about it and it says:

Nour
5 Oct, 2023, 06:18
Drake
5 Oct, 2023, 12:15

Whoa weird...is the time on your system correct? Maybe it's ahead a little bit?

Nour
8 Oct, 2023, 06:36

Yeah, it’s actually correct, but I’m using a VPN when I work, so it was, as you said, ahead a little bit.

Nour
8 Oct, 2023, 09:11

I corrected the time and tested it again. It’s working now. Thank you for your support.

Nour
9 Oct, 2023, 09:18

]Error 500 Cannot assign null to property Utopia\VCS\Adapter\Git\GitHub::$accessToken of type string

Nour
9 Oct, 2023, 09:18

Error 500 Cannot assign null to property Utopia\VCS\Adapter\Git\GitHub::$accessToken of type string

Nour
9 Oct, 2023, 09:19

[SOLVED] Error 500 Cannot assign null to property Utopia\VCS\Adapter\Git\GitHub::$accessToken

Adson
16 Oct, 2023, 15:34

However, I installed it with Coolify on a remote server.

Adson
16 Oct, 2023, 15:37

I ran cmd docker exec appwrite-agg44c8 vars and everything is the same as the variables set in the Coolify service.

Adson
16 Oct, 2023, 15:40

When viewing the logs of the appwrite service container

Adson
16 Oct, 2023, 15:42

My Github App

Adson
16 Oct, 2023, 15:53

@Steven you give me some help?

Drake
16 Oct, 2023, 16:53

Please create a new post instead of posting in an old thread. In addition, please don't tag people as it can be disruptive

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