I am not sure what's going on. If I understood it right, I should be able to call my function through the domain I have set to it, but It doesn't work.
I am always getting the error above.
No idea of what I am supposed to do, may you help me pls?
Summary
User is experiencing an "Execution error: general_argument_invalid" when trying to call a function through the domain. They are unsure of what to do. They also noticed that when deploying a new version of a function, the execute access roles are lost. User sets execution access to any role and the function responds as expected. User then runs `docker-compose down` and `docker-compose up -d` but the issue persists. It is discovered that the _APP_DOMAIN_FUNCTIONS environment variable is empty. Fixed by setting the env _APP_DOMAIN_FUNCTIONS=*.mydomain.com. Another user is experiencing the same issue on a Ubuntu 22.04
Drake
Jan 5, 2024, 05:20
What did you pass for the body?
Drake
Jan 5, 2024, 20:16
that env var should not match your custom function domain
Drake
Jan 5, 2024, 20:21
can you try running this on your server where your docker-compose.yml file is?
Bash
CONTAINER=appwrite-mariadb
docker exec -it $CONTAINER sh -c 'mysql -uroot -p$MYSQL_ROOT_PASSWORD $MYSQL_DATABASE -e "select projectId as \"Project ID\", domain as \"Domain\", resourceType as \"Resource\", resourceId as \"Resource ID\" from _console_rules;"'
Lucas Reis
Rank 2: Process
Jan 5, 2024, 20:23
Drake
Jan 5, 2024, 20:30
hmm that's all correct
Drake
Jan 5, 2024, 20:31
do you have a reverse proxy in front of appwrite?
Lucas Reis
Rank 2: Process
Jan 5, 2024, 20:33
no
Lucas Reis
Rank 2: Process
Jan 5, 2024, 20:33
there's only appwrite running on a Ubuntu 22.04 server
SenZi
Rank 3: Container
Jan 6, 2024, 08:04
Having the same issue here
SenZi
Rank 3: Container
Jan 6, 2024, 08:09
Nvm, Fixed it by setting the env _APP_DOMAIN_FUNCTIONS=*.mydomain.com
Drake
Jan 6, 2024, 17:20
@Lucas Reis, what's the domain functions env var if you run docker compose exec appwrite vars?
Lucas Reis
Rank 2: Process
Jan 7, 2024, 03:16
interesting, it's empty even though I have it set in my .env file
Drake
Jan 7, 2024, 03:17
Did you run docker compose up -d to apply the changes?
Lucas Reis
Rank 2: Process
Jan 7, 2024, 03:17
docker-compose restart
Lucas Reis
Rank 2: Process
Jan 7, 2024, 03:19
so now I run docker-compose down and then docker-compose up -d
Drake
Jan 7, 2024, 03:19
This won't apply changes
Drake
Jan 7, 2024, 03:19
This does
Lucas Reis
Rank 2: Process
Jan 7, 2024, 03:19
now I see it set as _APP_DOMAIN_FUNCTIONS=*.appwrite.ssw.lol
Lucas Reis
Rank 2: Process
Jan 7, 2024, 03:19
lemme make a request to see what happens
Lucas Reis
Rank 2: Process
Jan 7, 2024, 03:24
awesome, now I have got "Execution error: No permissions provided for action 'execute'", and as expected after I set execution access to any role it responded as expected 😄
Lucas Reis
Rank 2: Process
Jan 8, 2024, 04:09
I just noticed when I deploy a new version of a function it loses the execute access roles. Is it the expected behaviour?
Drake
Jan 8, 2024, 04:27
Are you deploying with the CLI like appwrite deploy function?