You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Appwrite v:0.13.2.302 in docker
And running Appwrite cli v0.15.0
Create function with (node-16.0 runtime):
appwrite init function
Deploy function without editing it
appwrite deploy function
Open the created function in the function tab of the Appwrite UI
Click on Execute Now without any custom data
Go to Logs tab
Click on the Errors button at the right of the execution's list item
Then you get the below described error.
👍 Expected behavior
The function should run
👎 Actual Behavior
I get this error : "
An internal curl error has occurred within the executor! Error Msg: Could not resolve host: 622bb6f3725e4422610e-622d226c1a20e10fc330
"
When taking a closer look the host is comprised of 2 parts :
622bb6f3725e4422610e: The project id
622d226c1a20e10fc330: The function deployment id
Both of the parameters seemed to coincide with the ones, visible on the UI.
🎲 Appwrite version
Version 0.13.x
💻 Operating system
MacOS
🧱 Your Environment
I use Docker
👀 Have you spent some time to check if this issue has been raised before?
Hey,
can you check your appwrite-executor logs? (docker logs appwrite-executor)
If you have an error similar to this: Failed to Warmup Node.js 17.0! your issue is related to #2913
Also, let me guess: You are running Ubuntu 20.04?
Hi, I'm having the same problem. I have copied the code of the function and the executor log here but in essence it looks the same as the one by @onceuponacode. My server runs on Ubuntu 21.04, the Appwrite version is 0.13.2.
We are having this issue too , but we are using Docker Desktop running on Windows 10 (on WSL).
We were testing AppWrite 0.12.x and everything was working fine. The problem started after updating to 0.13.x (and it's there even with a fresh install).
Due to this, AppWrite Functions aren't working anymore.
@onceuponacode, you might be executing the function before the runtime is ready. If you wait, do you eventually see logs about the runtime being created? You can also run docker ps to see if the 622bb6f3725e4422610e-622d226c22f4c1a3eb56 container is running.
@stnguyen90 Hi, I'm not @onceuponacode but I just had another look at "my version" of the problem and after several hours of the containers being up I tried to launch the request that triggers my function and this is the resulting executor log (starting from the beginning):
Warming up Node.js 16.0 environment...
Warming up PHP 8.0 environment...
Warming up Ruby 3.0 environment...
Warming up Python 3.9 environment...
Removing orphan runtimes...
Failed to Warmup PHP 8.0!
Failed to Warmup Ruby 3.0!
Failed to Warmup Node.js 16.0!
Failed to Warmup Python 3.9!
Running maintenance task ...
Running maintenance task ...
Running maintenance task ...
Running maintenance task ...
Running maintenance task ...
Running maintenance task ...
Running maintenance task ...
[Error] Type: Exception
[Error] Message: Runtime not found. Please create the runtime.
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 407
Building container : 622db85c73275eca55b2-622eebe9020b8443d8b9
Build failed: File Not Found
[Error] Type: Exception
[Error] Message: File Not Found
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 307
I tried using the CLI to deploy the same function instead of choosing the manual deployment (without changing anything else) and everything seems to work.
There is probably something wrong with the manual deployment.
@yngwi Can you create a new deployment and try again ? It seems we are unable to reproduce this issue.
I tried just now, same results. Maybe the container wiring is not correct? Following the installation procedure I'm using the networks appwrite and runtimes in the docker-compose.yml, but instead of the preconfigured traefik network, I'm using my own. Apart from that everything is the same. Now, the autogenerated env contains the following line: _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimes Is this correct?
Fresh installation of Appwrite v0.13.3.303 on Ubuntu 20.04 with Docker 20.10.7 here. Trying the base Python 3.9 runtime. I've stripped my function code down to the barest of bones and I cannot get functions to execute.
My Python says it's able to warm up, so no issues there. I believe this function should follow the new format of function to export. I've tried with sample code from the Appwrite CLI as well and same thing.
Also using the autogenerated env. Not much changed aside from https enabled by default. Any assistance is appreciated!
Fresh installation of Appwrite v0.13.3.303 on Ubuntu 20.04 with Docker 20.10.7 here. Trying the base Python 3.9 runtime. I've stripped my function code down to the barest of bones and I cannot get functions to execute.
My Python says it's able to warm up, so no issues there. I believe this function should follow the new format of function to export. I've tried with sample code from the Appwrite CLI as well and same thing.
Also using the autogenerated env. Not much changed aside from https enabled by default. Any assistance is appreciated!
Anything in the build or runtime logs? How did you deploy your code? Feel free to join us on discord as it would be easier to troubleshoot there rather than go back and forth on GitHub.
How do I check those logs? I deployed with the CLI via a Windows client, a Ubuntu client, and by uploading the code to the web interface directly. I followed the existing example generated from appwrite init function and in fact that example code does not run successfully either.
With all due respect I've seen similar issues discussed on Discord with no apparent resolution to the problem, I'd prefer to keep the conversation here if that's possible.
Edit: Figured out the runtime logs. That's given me enough info to go on, now I've got the sample function code working.
Hi again, I just tried a completely new local appwrite setup using the docker command from the installation instructions, then I created a simple collection and a function that tries to list the available documents by just copy&pasting code from the documentation. I then created a deployment using the appwrite cli that I also freshly installed in my WSL installation. I then executed the function several times using the CLI and the browser based admin interface, with the same result again:
me@WSL:~/tmp/appwrite$ docker logs appwrite-executor -f
Warming up Node.js 16.0 environment...
Warming up PHP 8.0 environment...
Warming up Ruby 3.0 environment...
Warming up Python 3.9 environment...
Removing orphan runtimes...
Failed to Warmup Ruby 3.0!
Failed to Warmup Node.js 16.0!
Failed to Warmup PHP 8.0!
Failed to Warmup Python 3.9!
Building container : 62336741a47377184a9e-62336809c339a4f8a231
Build Stage completed in 9 seconds
[Error] Type: Exception
[Error] Message: Runtime not found. Please create the runtime.
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 407
Building container : 62336741a47377184a9e-62336809c339a4f8a231
Build Stage completed in 1 seconds
Executing Runtime: 62336741a47377184a9e-62336809c339a4f8a231
[Error] Type: Exception
[Error] Message: An internal curl error has occurred within the executor! Error Msg: Connection refused
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 465
Executing Runtime: 62336741a47377184a9e-62336809c339a4f8a231
Function executed in 0.090941905975342 seconds, status: completed
Executing Runtime: 62336741a47377184a9e-62336809c339a4f8a231
Function executed in 0.0027098655700684 seconds, status: completed
Executing Runtime: 62336741a47377184a9e-62336809c339a4f8a231
Function executed in 0.0022468566894531 seconds, status: completed
Building container : 62336741a47377184a9e-62336957e316b4a0b944
Build Stage completed in 7 seconds
[Error] Type: Exception
[Error] Message: Runtime not found. Please create the runtime.
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 407
Building container : 62336741a47377184a9e-62336957e316b4a0b944
Build Stage completed in 1 seconds
Executing Runtime: 62336741a47377184a9e-62336957e316b4a0b944
[Error] Type: Exception
[Error] Message: An internal curl error has occurred within the executor! Error Msg: Connection refused
[Error] File: /usr/src/code/app/executor.php
[Error] Line: 465
Executing Runtime: 62336741a47377184a9e-62336957e316b4a0b944
Function executed in 15.015694856644 seconds, status: failed
Executing Runtime: 62336741a47377184a9e-62336957e316b4a0b944
Function executed in 15.012204885483 seconds, status: failed
I'm not sure what else I can try to fix function execution for me, this is as vanilla as I can get, I guess. I'm grateful for all pointers.
An internal curl error has occurred within the executor! Error Msg: Could not resolve host: 622bb6f3725e4422610e-622d226c1a20e10fc330
In docker-compose.yml declared networks doesn't have specific names and when you up your containers from docker-compose it creates networks with template as "directory-name-of-compose-location"_"network-in-compose-file".
So, in .env described network is hardcoded as _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimeswhich only work if yourdocker-compose.ymlfile located inappwritedirectory.
To avoid that do the next:
Define specific network names in docker-compose.yml like this (be aware that they must be unique because of docker-host scope):
Try to execute function from UI and after function execution you can find newly created container with name as "project_id"-"deployment_id". Check with docker inspect "container name" that in Networks section there is a network with your defined name.
Reacted by Alberto L. Bonfiglio, Caleb Reyes, Bhagavan Nagaraju and Tom Marx
Has anyone solved this yet? I am still facing same issue with python function. Also there is no clear documenttaion or youtube video about this. may ber the code is broker in appwrite.
Reacted by garvitomer, Dijon van 't Ende and Kecső Tamás
An internal curl error has occurred within the executor! Error Msg: Could not resolve host: 622bb6f3725e4422610e-622d226c1a20e10fc330
In docker-compose.yml declared networks doesn't have specific names and when you up your containers from docker-compose it creates networks with template as "directory-name-of-compose-location"_"network-in-compose-file".
So, in .env described network is hardcoded as _APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimeswhich only work if yourdocker-compose.ymlfile located inappwritedirectory.
To avoid that do the next:
Define specific network names in docker-compose.yml like this (be aware that they must be unique because of docker-host scope):
Try to execute function from UI and after function execution you can find newly created container with name as "project_id"-"deployment_id". Check with docker inspect "container name" that in Networks section there is a network with your defined name.
Tried this but doesn't solve it for me.
Running AppWrite on DigitalOcean as a Droplet through the marketplace, didn't touch anytime except upload my code as .tar (followed the docs) but same error as the rest here. Sad because the rest looks really sleek.
We found a solution for our case, hope works for you appwrite functions createDeployment --functionId=YOUR_FID --entrypoint='src/index.php' --code="functions/Functionname" --activate=true
Previously we got Internal Runtime error. When we just copied
I use this in CLI and it didn't work. I basically restart docker every day to minimize the error. No other solution yet 😞 "$id": "......", "name": "orderMatchingAlgorithmFunction4", "runtime": "dart-2.17", "path": "functions/orderMatchingAlgorithmFunction4", "entrypoint": "lib/main.dart", "ignore": [".packages", ".dart_tool"], "execute": ["role:member"], "events": [], "schedule": "", "timeout": 15
I have run in to this issue working in an environment with no internet connectivity, and have got a workaround by removing the node-appwrite dependency and making all calls through the REST API. I assume that connectivity to internet is required to use the node-appwrite package? (I appreciate that this is a bit of an edge use case and ignores the issue)
Activity
rdmchr commentedon Mar 13, 2022
Hey,
can you check your appwrite-executor logs? (
docker logs appwrite-executor)If you have an error similar to this:
Failed to Warmup Node.js 17.0!your issue is related to #2913Also, let me guess: You are running Ubuntu 20.04?
onceuponacode commentedon Mar 13, 2022
Hi,
You were right for the logs but not the OS version.
I am using OSX 12.2.1, and here are my logs:
Then it loops the last 5 lines several times, and presents the error in the UI.
yngwi commentedon Mar 14, 2022
Hi, I'm having the same problem. I have copied the code of the function and the executor log here but in essence it looks the same as the one by @onceuponacode. My server runs on Ubuntu 21.04, the Appwrite version is 0.13.2.
kazkis commentedon Mar 14, 2022
We are having this issue too , but we are using Docker Desktop running on Windows 10 (on WSL).
We were testing AppWrite 0.12.x and everything was working fine. The problem started after updating to 0.13.x (and it's there even with a fresh install).
Due to this, AppWrite Functions aren't working anymore.
stnguyen90 commentedon Mar 15, 2022
@onceuponacode, you might be executing the function before the runtime is ready. If you wait, do you eventually see logs about the runtime being created? You can also run
docker psto see if the622bb6f3725e4422610e-622d226c22f4c1a3eb56container is running.yngwi commentedon Mar 15, 2022
@stnguyen90 Hi, I'm not @onceuponacode but I just had another look at "my version" of the problem and after several hours of the containers being up I tried to launch the request that triggers my function and this is the resulting executor log (starting from the beginning):
christyjacob4 commentedon Mar 15, 2022
@yngwi Can you create a new deployment and try again ?
It seems we are unable to reproduce this issue.
kazkis commentedon Mar 15, 2022
I created a new project on a freshly installed Ubuntu 21.10 using Docker Engine 20.10.13 and got similar results:
The only thing I added to the project is the python function taken from the AppWrite docs (with manual deployment).
kazkis commentedon Mar 15, 2022
I tried using the CLI to deploy the same function instead of choosing the manual deployment (without changing anything else) and everything seems to work.
There is probably something wrong with the manual deployment.
yngwi commentedon Mar 16, 2022
I tried just now, same results. Maybe the container wiring is not correct? Following the installation procedure I'm using the networks
appwriteandruntimesin thedocker-compose.yml, but instead of the preconfigured traefik network, I'm using my own. Apart from that everything is the same. Now, the autogenerated env contains the following line:_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimesIs this correct?nickduncan7 commentedon Mar 17, 2022
Fresh installation of Appwrite v0.13.3.303 on Ubuntu 20.04 with Docker 20.10.7 here. Trying the base Python 3.9 runtime. I've stripped my function code down to the barest of bones and I cannot get functions to execute.
https://gist.github.com/nickduncan7/d79d8ca04adb2a12391f089d12c84fba
My Python says it's able to warm up, so no issues there. I believe this function should follow the new format of function to export. I've tried with sample code from the Appwrite CLI as well and same thing.
Also using the autogenerated env. Not much changed aside from https enabled by default. Any assistance is appreciated!
stnguyen90 commentedon Mar 17, 2022
Anything in the build or runtime logs? How did you deploy your code? Feel free to join us on discord as it would be easier to troubleshoot there rather than go back and forth on GitHub.
nickduncan7 commentedon Mar 17, 2022
How do I check those logs? I deployed with the CLI via a Windows client, a Ubuntu client, and by uploading the code to the web interface directly. I followed the existing example generated from
appwrite init functionand in fact that example code does not run successfully either.With all due respect I've seen similar issues discussed on Discord with no apparent resolution to the problem, I'd prefer to keep the conversation here if that's possible.
Edit: Figured out the runtime logs. That's given me enough info to go on, now I've got the sample function code working.
yngwi commentedon Mar 17, 2022
Hi again, I just tried a completely new local appwrite setup using the docker command from the installation instructions, then I created a simple collection and a function that tries to list the available documents by just copy&pasting code from the documentation. I then created a deployment using the appwrite cli that I also freshly installed in my WSL installation. I then executed the function several times using the CLI and the browser based admin interface, with the same result again:
I'm not sure what else I can try to fix function execution for me, this is as vanilla as I can get, I guess. I'm grateful for all pointers.
29 remaining items
andreped commentedon Dec 16, 2022
Noticed that this issue has been closed, but I'm still having this issue with manual deployment.
I followed the tutorial on how to setup a simple function and deploy it through appwrite, but it fails during execution.
I have setup appwrite through docker on macOS, with the latest version (
1.1.2).MyWay commentedon Dec 16, 2022
Same here.
BraveDevelopment commentedon Dec 25, 2022
Same here.
memetrusidovski commentedon Jan 1, 2023
having the same issue as the users above
stnguyen90 commentedon Jan 10, 2023
For anyone still having problems, please join us on Discord to troubleshoot since each problem needs to be addressed on a case-by-case basis.
Kvark1205 commentedon Feb 14, 2023
For anyone who have this kind error as TC:
In
docker-compose.ymldeclared networks doesn't have specific names and when you up your containers from docker-compose it creates networks with template as"directory-name-of-compose-location"_"network-in-compose-file".So, in
.envdescribed network is hardcoded as_APP_EXECUTOR_RUNTIME_NETWORK=appwrite_runtimeswhich only work if yourdocker-compose.ymlfile located inappwritedirectory.To avoid that do the next:
docker-compose.ymllike this (be aware that they must be unique because of docker-host scope):"project_id"-"deployment_id". Check withdocker inspect "container name"that inNetworkssection there is a network with your defined name.hemangjoshi37a commentedon Mar 4, 2023
Has anyone solved this yet? I am still facing same issue with python function. Also there is no clear documenttaion or youtube video about this. may ber the code is broker in appwrite.
garvitomer commentedon Mar 5, 2023
I am also facing the same issue since few months now. How to solve this error, it is such a critical bug? Can someone please help
frenchmustard commentedon Apr 11, 2023
Tried this but doesn't solve it for me.
Running AppWrite on DigitalOcean as a Droplet through the marketplace, didn't touch anytime except upload my code as .tar (followed the docs) but same error as the rest here. Sad because the rest looks really sleek.
kecsot commentedon Apr 21, 2023
Same. (1.3.1)
We found a solution for our case, hope works for you
appwrite functions createDeployment --functionId=YOUR_FID --entrypoint='src/index.php' --code="functions/Functionname" --activate=truePreviously we got
Internal Runtime error.When we just copiedgarvitomer commentedon Apr 21, 2023
I use this in CLI and it didn't work. I basically restart docker every day to minimize the error. No other solution yet 😞
"$id": "......", "name": "orderMatchingAlgorithmFunction4", "runtime": "dart-2.17", "path": "functions/orderMatchingAlgorithmFunction4", "entrypoint": "lib/main.dart", "ignore": [".packages", ".dart_tool"], "execute": ["role:member"], "events": [], "schedule": "", "timeout": 15koyapo commentedon Apr 24, 2023
still not working here too its pretty annoying ... im doing like u restarting server every days
koyapo commentedon Apr 25, 2023
@garvitomer do you use return when the response has to be sent in this way ? return res.json({
'message': "hello",
});
@stnguyen90 doing this :
return res.json({
'message': "hello",
});
instead of :
res.json({
'message': "hello",
});
can have some side effect ?
Alex-Fenner commentedon Jul 24, 2023
I have run in to this issue working in an environment with no internet connectivity, and have got a workaround by removing the node-appwrite dependency and making all calls through the REST API. I assume that connectivity to internet is required to use the node-appwrite package? (I appreciate that this is a bit of an edge use case and ignores the issue)
t0mm4rx commentedon Aug 22, 2023
I think this issue should be re-open as it could stilll happen during the 1.3.7 -> 1.3.8 migration.