Back

Cannot assign null to property Appwrite\Auth\OAuth2\Github::$user of type array

  • 0
  • Self Hosted
  • Functions
  • Flutter
ideclon
15 Dec, 2023, 15:10

Huh. And docker compose exec appwrite ping api.github.com -c 4?

TL;DR
Cannot assign null to property Appwrite\Auth\OAuth2\Github::$user of type array; - User had an issue with DNS configuration and was advised to manually configure DNS to 1.1.1.1 and 1.0.0.1, which solved the initial issue. - User encountered a new issue with build failing and logs showing a "Could not resolve host: api.github.com" error. It was suggested to check the DNS configuration in the executor container. - It was mentioned that any customization should be done in a `docker-compose.override.yml` file to avoid it being wiped during upgrades. - User confirmed that
arun
15 Dec, 2023, 15:55

ping: bad address 'api.github.com'

Drake
15 Dec, 2023, 15:56

ya something seems weird with DNS

arun
15 Dec, 2023, 15:59

is there any workaround to rectify this issue, this seams to be out of my knowledge. even i have added DNS is docker engine but no luck πŸ™‚ . here is what i have in docker engine : "dns": [ "1.1.1.1", "1.0.0.1", "10.0.0.2", "8.8.8.8" ],

Drake
15 Dec, 2023, 16:09

what is 10.0.0.2?

arun
15 Dec, 2023, 16:16

this was default dns i have added only cloudflare dns

Drake
15 Dec, 2023, 16:23

maybe remove it?

Drake
15 Dec, 2023, 16:24

can you also try running this:

TypeScript
docker run --rm alpine nslookup api.github.com
arun
15 Dec, 2023, 16:26

@Drake i have done the following changes in docker-compose.yml and successfully configured the Gitapps , appwrite: image: appwrite/appwrite:1.4.13 dns: 8.8.8.8 container_name: appwrite i have added dns

arun
15 Dec, 2023, 16:29

Server: 192.168.65.7 Address: 192.168.65.7:53

Non-authoritative answer: Name: api.github.com Address: 20.207.73.85

*** Can't find api.github.com: No answer

Drake
15 Dec, 2023, 17:14

And this?

TypeScript
docker run --rm alpine apk add curl && curl https://api.github.com
Drake
15 Dec, 2023, 17:15

if that fails, it's a docker problem and not an appwrite problem. what's your server's OS?

arun
15 Dec, 2023, 18:37

Just Dm you the response as message was long and win is the os

arun
15 Dec, 2023, 18:45

is there any issue if i add dns: 8.8.8.8 in appwrite image like i mentioned above ?

Drake
15 Dec, 2023, 19:10

ok the curl works...

Drake
15 Dec, 2023, 19:11

without any modifications in the docker-compose.yml, does it still not work?

Drake
15 Dec, 2023, 19:11

also, in general, you shouldn't modify the docker-compose.yml file from Appwrite because it will be wiped when you upgrade

arun
15 Dec, 2023, 19:13

nope, is not working without modification

Drake
15 Dec, 2023, 19:31

weird....so it works with the modification?

arun
15 Dec, 2023, 19:37

Yes, its working with modification only πŸ™‚

Drake
15 Dec, 2023, 19:49

weiiiird. Anyways...if you need to customize the docker-compose.yml file, use a docker-compose.override.yml file so that your changes won't be wiped after an upgrade

arun
15 Dec, 2023, 19:51

But its not over :), now while creating function build is getting fail, here are the logs : Could not resolve host: api.github.com with status code 0

Drake
15 Dec, 2023, 20:59

you'll need to add that DNS config to the executor container too

arun
15 Dec, 2023, 21:02

Is it openruntimes-executor. right ?

arun
15 Dec, 2023, 22:53

@Drake here is the last update, my host was obtaining DNS automatically, now i have manually configured the DNS to 1.1.1.1 and 1.0.0.1. Which solved the issue.

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