Rank 1: Thread
Oh man I have been trying this trick for whole week and it didn't work LOL
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 1: Thread
Oh man I have been trying this trick for whole week and it didn't work LOL
LMAO sadddd
i'm still trying to think if I missed a step lol
also just to be sure, you are using the appwrite cli right?
Rank 1: Thread
yes
Rank 1: Thread
As I said, I do all the same steps in cloud.appwrite.com and It works as it should. Only when I try in this self-hosted doesn't work
since you are on self hosted version. What does docker compose logs say ? after executing the function
Rank 1: Thread
I just asked the guy who has access to the server to check and will get back to you as soon he msg back
Can you also check if there's a firewall enabled on the server? If so, try testing with the firewall disabled
Rank 1: Thread
Executing Runtime: luna-648d7a3b4bf0c404552c
[Error] Type: Exception
[Error] Message: An internal curl error has occurred within the executor! Error Msg: Operation timed out
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 544
Rank 1: Thread
They told me that there is no firewall active, and they didn’t change a lot from the standard config.
Also there is a reveres proxy in front of the server for ssl cert.
Other API calls from your client app work right?
Rank 1: Thread
If I understood your question correctly, yes for example flutter developers they can access the api calls also if I use postman and make a call directly with endpoints it works but when i deploy the function and execute with php sdk or node sdk i dosent work
Oh right you said postman works
Can you try to wrap your code in a try catch and don't forget to call res->json() in your catch before returning.
Then, increase your function timeout to 5 minutes.
Hopefully, you'll see an error after that
Rank 1: Thread
Response: {"message":"Error!","result":[]}
Rank 1: Thread
I change the catch Class to Exception
and got this response
{"message":"Error!","result":"Failed to connect to domainoftheerver.eu port 443 after 130149 ms: Couldn't connect to server"}
Awesome! So maybe it's a networking or routing or firewall issue 🧐
Some ways to test and troubleshoot this are to see if a request is success from the server itself and then from the runtime container
Rank 1: Thread
Is this normal for example to work for postman calls etc but not for functions calls
not sure tbh, as whenever I got curl errors on function executions, they get fixed after a few trial and errors lmao
Not really. Usually, this is a firewall problem
Rank 1: Thread
I'm still having the same problem. I asked the guy and he told me firewall is disabled also he reconfigred the ssl, nowhttp redirects to https.
Also if a make a function that returns for examle string it works fine $res->json("test), but not these others
so how is checking for firewall?
Rank 1: Thread
yeah makes sense! I have one question maybe is stupide. When I execute the function who (url ) makes the call to this Database, Is it not the server itself (https:// .../v1)?
It's a container on the server